NAT pinning. now uses the new bind/unbind socket methods of the AssetHandler. No need to use netcat anymore ;)

This commit is contained in:
antisnatchor
2012-07-23 18:31:54 +01:00
parent 71fb6ae089
commit d5606c9bf4

View File

@@ -15,10 +15,9 @@
#
class Irc_nat_pinning < BeEF::Core::Command
#todo antisnatchor: reverted for now
#def pre_send
# BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.bind_socket("IRC", "0.0.0.0", 6667)
#end
def pre_send
BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.bind_socket("IRC", "0.0.0.0", 6667)
end
def self.options
return [
@@ -32,8 +31,9 @@ class Irc_nat_pinning < BeEF::Core::Command
return if @datastore['result'].nil?
save({'result' => @datastore['result']})
#todo antisnatchor: how long should we leave it open? Maybe default timeout of 30 seconds?
#BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.unbind_socket("IRC")
# wait 30 seconds before unbinding the socket. The HTTP connection will arrive sooner than that anyway.
sleep 30
BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.unbind_socket("IRC")
end