Fix "ALL" comparison for browser and os

The correct is to check if the *rule.browser* has the tag "ALL", not if the browser was identified as "ALL", which of course never happen.
Before this fix, using "ALL" in a ARE rule makes it be never called.
This commit is contained in:
Atila Romero
2015-10-06 11:01:30 -03:00
parent 277c87db5b
commit 8626b1b275

View File

@@ -403,8 +403,8 @@ module BeEF
# os_ver without checks as it can be very different or even empty, for instance on linux/bsd)
# check if the browser and OS types do match
next unless browser == 'ALL' || browser == rule.browser
next unless os == 'ALL' || os == rule.os
next unless rule.browser == 'ALL' || browser == rule.browser
next unless rule.os == 'ALL' || os == rule.os
# check if the browser version match
browser_version_match = compare_versions(browser_version.to_s, b_ver_cond, b_ver.to_s)