Skip to content

Commit

Permalink
(WIP #39) ARPspoof tests (need to improve).
Browse files Browse the repository at this point in the history
  • Loading branch information
m4n3dw0lf committed Nov 27, 2018
1 parent 1f9a3a4 commit 5ada971
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pythem/modules/arpoisoner.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def get_range(self, targets):
def resolve_mac(self, targetip):
try:
conf.verb = 0
ans, unans = srp(Ether(dst="ff:ff:ff:ff:ff:ff") / ARP(op="who-has", pdst=targetip), timeout=2)
ans, unans = srp(Ether(dst="ff:ff:ff:ff:ff:ff") / ARP(op="who-has", pdst=targetip), timeout=2, iface=self.interface)
for snd, rcv in ans:
return str(rcv[Ether].src)
except socket.gaierror:
Expand Down
5 changes: 3 additions & 2 deletions pythem/modules/redirect.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def start(self, host, port, js):
<head>
<script src="{}"></script>
</head>
""".format(self.js)
""".format(js)
self.response = self.js
self.host = host
self.port = int(port)
Expand Down Expand Up @@ -81,7 +81,7 @@ def server(self, host, port, js):
<head>
<script src="{}"></script>
</head>
""".format(self.js)
""".format(js)
self.response = self.js
self.host = host
self.port = int(port)
Expand Down Expand Up @@ -111,6 +111,7 @@ def server(self, host, port, js):
if self.dnsspoof:
self.dnsspoof.stop()
except AttributeError:
domain = None
pass
try:
connection, client_address = server.accept()
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion pythem/tests/test_redirect_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from time import sleep

class TestModulesObjectsCreation(unittest.TestCase):
def test_redirect_startup(self):
def test_redirect(self):
from pythem.modules.utils import get_myip
myip = get_myip('lo')
from pythem.modules.redirect import Redirect
Expand Down

0 comments on commit 5ada971

Please sign in to comment.