Use anonymous function in setTimeout when executing sequential ARE rules. Added ARE rule for lan fingerprint using common IPs.

This commit is contained in:
antisnatchor
2016-04-04 10:20:09 +02:00
parent 8bcae3e30b
commit dd0a10bda5
2 changed files with 25 additions and 2 deletions

View File

@@ -0,0 +1,23 @@
{"name": "LAN Fingerprint (Common IPs)",
"author": "antisnatchor",
"browser": ["FF", "C"],
"browser_version": "ALL",
"os": "ALL",
"os_version": "ALL",
"modules": [
{"name": "internal_network_fingerprinting",
"condition": null,
"code": null,
"options": {
"ipRange":"common",
"ports":"80,8080",
"threads":"3",
"wait":"5",
"timeout":"10"
}
}
],
"execution_order": [0],
"execution_delay": [0],
"chain_mode": "sequential"
}

View File

@@ -114,14 +114,14 @@ module BeEF
delayed_exec = '' delayed_exec = ''
c = 0 c = 0
while c < mods.length while c < mods.length
delayed_exec += %Q| setTimeout("#{mods[order[c]][:mod_name]}_#{rule_token}();", #{delay[c]}); | delayed_exec += %Q| setTimeout(function(){#{mods[order[c]][:mod_name]}_#{rule_token}();}, #{delay[c]}); |
mod_body = mods[order[c]][:mod_body].to_s.gsub("#{mods[order[c]][:mod_name]}_mod_output", "#{mods[order[c]][:mod_name]}_#{rule_token}_mod_output") mod_body = mods[order[c]][:mod_body].to_s.gsub("#{mods[order[c]][:mod_name]}_mod_output", "#{mods[order[c]][:mod_name]}_#{rule_token}_mod_output")
wrapped_mod = "#{mod_body}\n" wrapped_mod = "#{mod_body}\n"
wrapper += wrapped_mod wrapper += wrapped_mod
c += 1 c += 1
end end
wrapper += delayed_exec wrapper += delayed_exec
print_more "Final Modules Wrapper:\n #{delayed_exec}" if @debug_on print_more "Final Modules Wrapper:\n #{wrapper}" if @debug_on
wrapper wrapper
end end