Current time: 12-13-2017, 12:18 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
.pcap to .har conversion
12-12-2014, 06:30 PM (This post was last modified: 12-12-2014 06:49 PM by deivanaixyz.)
Post: #1
.pcap to .har conversion
can main.py in mobile>pcap2har be used from command line to convert a .pcap file to .har format?

When run from command line, it shows the following error

File "main.py", line 47
print __file__, "[options] <pcap file> [<har file>]"
^
SntaxError: invalid syntax

How should it be run?

Your help is much appreciated

can main.py in www>mobile>pcap2har be used from command line to convert a .pcap file to .har format?

When run from command line, it shows the following error

File "main.py", line 47
print __file__, "[options] <pcap file> [<har file>]"
^
SyntaxError: invalid syntax

How should it be run from command line?
I run this on a Win 8 system.
Input: .pcap file captured using wireshark
Expected output: .har file

Or can I use pcap2har.php ?

Your help is much appreciated
Find all posts by this user
Quote this message in a reply
12-12-2014, 07:24 PM
Post: #2
RE: .pcap to .har conversion
I tend to use the online converter - https://pcapperf.appspot.com/ or AT&T's ARO but that just shows a waterfall and doesn't export a pcap

Andy

Using WebPageTest - http://usingwpt.com/
Visit this user's website Find all posts by this user
Quote this message in a reply
12-12-2014, 11:47 PM
Post: #3
RE: .pcap to .har conversion
The actual pcap2har project is here: https://github.com/andrewf/pcap2har (and it's what the online converter uses as well).
Visit this user's website Find all posts by this user
Quote this message in a reply
12-16-2014, 04:40 PM
Post: #4
RE: .pcap to .har conversion
I get the following error when I run main.py from command line

C:\Python27\pcap2har-master>main.py
Traceback (most recent call last):
File "C:\Python27\pcap2har-master\main.py", line 13, in <module>
from pcap2har import pcap
File "C:\Python27\pcap2har-master\pcap2har\pcap.py", line 5, in <module>
from pcaputil import *
File "C:\Python27\pcap2har-master\pcap2har\pcaputil.py", line 6, in <module>
import resource
ImportError: No module named resource


How could this be fixed?
Find all posts by this user
Quote this message in a reply
12-16-2014, 11:28 PM
Post: #5
RE: .pcap to .har conversion
You should file an issue in the github project and ask. It's a separate utility from WebPagetest and we were just using it (for a while, it is no longer used).
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)