Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #46720 > unrolled thread
| Started by | bakbakinfo123@gmail.com |
|---|---|
| First post | 2013-06-02 11:19 -0700 |
| Last post | 2013-06-02 13:47 -0700 |
| Articles | 4 — 2 participants |
Back to article view | Back to comp.lang.python
Arp cache poisoning using scapy bakbakinfo123@gmail.com - 2013-06-02 11:19 -0700
Re: Arp cache poisoning using scapy Dan Stromberg <drsalists@gmail.com> - 2013-06-02 12:16 -0700
Re: Arp cache poisoning using scapy bakbakinfo123@gmail.com - 2013-06-02 13:46 -0700
Re: Arp cache poisoning using scapy bakbakinfo123@gmail.com - 2013-06-02 13:47 -0700
| From | bakbakinfo123@gmail.com |
|---|---|
| Date | 2013-06-02 11:19 -0700 |
| Subject | Arp cache poisoning using scapy |
| Message-ID | <609f0450-4ab7-4489-87c6-5926bb09d1fd@googlegroups.com> |
I am trying to get the arp cache poisoning working with scapy and python but having problems
The python script itself is very simple:
root@ubuntu:/home/joker/Downloads/scapy-2.2.0/scripts# cat arp_poison.py
#!/usr/bin/env python
import sys
from scapy.all import *
arpcachepoison("00:22:fa:98:5e:04", "192.168.1.131")
The error I am getting is illegal IP address. How do I fix it?
root@ubuntu:/home/joker/Downloads/scapy-2.2.0/scripts# python arp_poison.py
WARNING: No route found for IPv6 destination :: (no default route?)
Traceback (most recent call last):
File "arp_poison.py", line 7, in <module>
arpcachepoison("00:22:fa:98:5e:04", "192.168.1.131")
File "/usr/lib/python2.7/dist-packages/scapy/layers/l2.py", line 440, in arpcachepoison
tmac = getmacbyip(target)
File "/usr/lib/python2.7/dist-packages/scapy/layers/l2.py", line 53, in getmacbyip
tmp = map(ord, inet_aton(ip))
socket.error: illegal IP address string passed to inet_aton
root@ubuntu:/home/joker/Downloads/scapy-2.2.0/scripts#
root@ubuntu:/home/joker/Downloads/scapy-2.2.0/scripts#
[toc] | [next] | [standalone]
| From | Dan Stromberg <drsalists@gmail.com> |
|---|---|
| Date | 2013-06-02 12:16 -0700 |
| Message-ID | <mailman.2557.1370200593.3114.python-list@python.org> |
| In reply to | #46720 |
[Multipart message — attachments visible in raw view] — view raw
On Sun, Jun 2, 2013 at 11:19 AM, <bakbakinfo123@gmail.com> wrote:
>
> I am trying to get the arp cache poisoning working with scapy and python
> but having problems
>
> The python script itself is very simple:
> root@ubuntu:/home/joker/Downloads/scapy-2.2.0/scripts# cat arp_poison.py
> #!/usr/bin/env python
>
> import sys
>
> from scapy.all import *
>
> arpcachepoison("00:22:fa:98:5e:04", "192.168.1.131")
>
> The error I am getting is illegal IP address. How do I fix it?
>
It looks to me like arpcachepoison wants two IP's, not a MAC and an IP.
[toc] | [prev] | [next] | [standalone]
| From | bakbakinfo123@gmail.com |
|---|---|
| Date | 2013-06-02 13:46 -0700 |
| Message-ID | <9404d1dc-c584-4797-b5d4-f25cec0fa09c@googlegroups.com> |
| In reply to | #46720 |
On Sunday, June 2, 2013 11:19:46 AM UTC-7, bakbak...@gmail.com wrote:
> I am trying to get the arp cache poisoning working with scapy and python but having problems
>
>
>
> The python script itself is very simple:
>
> root@ubuntu:/home/joker/Downloads/scapy-2.2.0/scripts# cat arp_poison.py
>
> #!/usr/bin/env python
>
>
>
> import sys
>
>
>
> from scapy.all import *
>
>
>
> arpcachepoison("00:22:fa:98:5e:04", "192.168.1.131")
>
>
>
> The error I am getting is illegal IP address. How do I fix it?
>
>
>
>
>
>
>
> root@ubuntu:/home/joker/Downloads/scapy-2.2.0/scripts# python arp_poison.py
>
> WARNING: No route found for IPv6 destination :: (no default route?)
>
> Traceback (most recent call last):
>
> File "arp_poison.py", line 7, in <module>
>
> arpcachepoison("00:22:fa:98:5e:04", "192.168.1.131")
>
> File "/usr/lib/python2.7/dist-packages/scapy/layers/l2.py", line 440, in arpcachepoison
>
> tmac = getmacbyip(target)
>
> File "/usr/lib/python2.7/dist-packages/scapy/layers/l2.py", line 53, in getmacbyip
>
> tmp = map(ord, inet_aton(ip))
>
> socket.error: illegal IP address string passed to inet_aton
>
> root@ubuntu:/home/joker/Downloads/scapy-2.2.0/scripts#
>
> root@ubuntu:/home/joker/Downloads/scapy-2.2.0/scripts#
This works. Although it shouldn't.
The documentation should be changed to reflect this. As per document:
arpcachepoison
arpcachepoison(target,victim,interval=60)
Poison target’s cache with (your MAC,victim’s IP)
It makes more sense to assign a MAC to the vitim ip to falsly claim and poison the network so ideally the documentation is correct the the command does not work as such. However the command with 2 IPs does the thing correctly. So change documentation? How do one go about it?
Also all the items in () need to have "" or it gives syntax error. Is that how it should work?
[toc] | [prev] | [next] | [standalone]
| From | bakbakinfo123@gmail.com |
|---|---|
| Date | 2013-06-02 13:47 -0700 |
| Message-ID | <737720e6-67df-4e2a-87a6-f2416e42531e@googlegroups.com> |
| In reply to | #46720 |
On Sunday, June 2, 2013 11:19:46 AM UTC-7, bakbak...@gmail.com wrote:
> I am trying to get the arp cache poisoning working with scapy and python but having problems
>
>
>
> The python script itself is very simple:
>
> root@ubuntu:/home/joker/Downloads/scapy-2.2.0/scripts# cat arp_poison.py
>
> #!/usr/bin/env python
>
>
>
> import sys
>
>
>
> from scapy.all import *
>
>
>
> arpcachepoison("00:22:fa:98:5e:04", "192.168.1.131")
>
>
>
> The error I am getting is illegal IP address. How do I fix it?
>
>
>
>
>
>
>
> root@ubuntu:/home/joker/Downloads/scapy-2.2.0/scripts# python arp_poison.py
>
> WARNING: No route found for IPv6 destination :: (no default route?)
>
> Traceback (most recent call last):
>
> File "arp_poison.py", line 7, in <module>
>
> arpcachepoison("00:22:fa:98:5e:04", "192.168.1.131")
>
> File "/usr/lib/python2.7/dist-packages/scapy/layers/l2.py", line 440, in arpcachepoison
>
> tmac = getmacbyip(target)
>
> File "/usr/lib/python2.7/dist-packages/scapy/layers/l2.py", line 53, in getmacbyip
>
> tmp = map(ord, inet_aton(ip))
>
> socket.error: illegal IP address string passed to inet_aton
>
> root@ubuntu:/home/joker/Downloads/scapy-2.2.0/scripts#
>
> root@ubuntu:/home/joker/Downloads/scapy-2.2.0/scripts#
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web