rdavydov / pyrit

Automatically exported from code.google.com/p/pyrit
1 stars 0 forks source link

IOError: libpcap-error #211

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Running pyrit and analyze captured file
2. Trying to recover WPA password: #pyrit -b 00:21:00:32:d7:e0 -r 
/home/dem/Desktop/test/targetap_wpa-01.cap -i /home/dem/Desktop/test/*.lst 
attack_passthrough

What is the expected output? What do you see instead?
Expected to see ESSIDs+and 4-way handshake confirmation

Instead i see this:
localhost test # pyrit -b 00:21:00:32:d7:e0 -r 
/home/dem/Desktop/test/targetap_wpa-01.cap -i /home/dem/Desktop/test/*.lst 
attack_passthrough
Pyrit 0.3.1-dev (C) 2008-2010 Lukas Lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3+

WARNING: IPv6 support disabled in Python. Cannot load scapy IPv6 layers.
Parsing file '/home/dem/Desktop/test/targetap_wpa-01.cap' (1/1)...
Traceback (most recent call last):
  File "/usr/bin/pyrit", line 6, in <module>
    pyrit_cli.Pyrit_CLI().initFromArgv()
  File "/usr/lib64/python2.6/site-packages/pyrit_cli.py", line 110, in initFromArgv
    func(self, **options)
  File "/usr/lib64/python2.6/site-packages/pyrit_cli.py", line 148, in new_f
    f(*args, **kwds)
  File "/usr/lib64/python2.6/site-packages/pyrit_cli.py", line 681, in attack_passthrough
    ap = self._fuzzyGetAP(self._getParser(capturefile), bssid, essid)
  File "/usr/lib64/python2.6/site-packages/pyrit_cli.py", line 164, in _getParser
    parser.parse_pcapdevice(dev)
  File "/usr/lib64/python2.6/site-packages/cpyrit/pckttools.py", line 599, in parse_pcapdevice
    for pckt in reader:
  File "/usr/lib64/python2.6/site-packages/cpyrit/pckttools.py", line 499, in next
    pckt = self.read()
  File "/usr/lib64/python2.6/site-packages/cpyrit/pckttools.py", line 487, in read
    r = _cpyrit_cpu.PcapDevice.read(self)
IOError: libpcap-error while reading: truncated dump file; tried to read 1452 
captured bytes, only got 1152

What version of the product are you using? On what operating system?
Pyrit 0.3.1-dev 

Please provide any additional information below.
I saw same bug here - http://code.google.com/p/pyrit/issues/detail?id=192#c1 
and I tried "Strip" command: http://pastebin.com/fEbhp51P
it not gives positive result. Anyway I am able to recover a key by using 
aircrack-ng.  That is my cap file:  http://zalil.ru/29990636 (ESSID: STIPE-TIDE 
pass:reloaded)

Original issue reported on code.google.com by cosmop...@gmail.com on 18 Nov 2010 at 2:09

GoogleCodeExporter commented 8 years ago
Why libcap need 1452 bytes minimum, is it compulsory? I run pyrit on Gentoo 
amd64 2.6.35 GeForce 9800 GTS(laptop), Python 2.6.5

Original comment by cosmop...@gmail.com on 18 Nov 2010 at 2:16

GoogleCodeExporter commented 8 years ago
use stripLive to get a new capture file or repair the original one with 
wireshark

Original comment by lukas.l...@gmail.com on 18 Nov 2010 at 4:53

GoogleCodeExporter commented 8 years ago
Ok, for this instance i'm interesting how to repair original cap-file in 
wireshark. I opened my capture and wireshark reports - "The capture file 
appears to have been cut short in the middle of a packet" Is it means no way to 
repair it ?

Original comment by cosmop...@gmail.com on 18 Nov 2010 at 5:51

GoogleCodeExporter commented 8 years ago
Seems like stripLive method works just fine:
dem@localhost ~/Desktop/test $ pyrit -b 00:19:e0:79:f7:26 -r 
/home/dem/Desktop/test/fffg -i /home/dem/Desktop/test/*.lst attack_passthrough
Pyrit 0.3.1-dev (C) 2008-2010 Lukas Lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3+

WARNING: IPv6 support disabled in Python. Cannot load scapy IPv6 layers.
Parsing file '/home/dem/Desktop/test/fffg' (1/1)...
Parsed 35 packets (35 802.11-packets), got 1 AP(s)

Tried 920046 PMKs so far; 4399 PMKs per second.

The password is 'reloaded'.

Original comment by cosmop...@gmail.com on 18 Nov 2010 at 6:21