Allow for four digit segments

This commit is contained in:
zinduolis
2024-10-29 20:31:53 +10:00
parent 6976117e9f
commit 147137bd15

View File

@@ -46,7 +46,7 @@ module BeEF
return false if has_non_printable_char?(str)
return true if str.eql? 'UNKNOWN'
return true if str.eql? 'ALL'
return false if !nums_only?(str) and !str.match(/\A(0|[1-9][0-9]{0,3})(\.(0|[1-9][0-9]{0,2})){0,3}\z/)
return false if !nums_only?(str) and !str.match(/\A(0|[1-9][0-9]{0,3})(\.(0|[1-9][0-9]{0,3})){0,3}\z/)
return false if str.length > 20
true