Skip to content

Commit f9a9009

Browse files
author
foreverneilyoung
committed
SID value is now used for start/stop correctly
1 parent afb638d commit f9a9009

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

fritzcap.py

+13-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/python
22
# -*- coding: iso-8859-1 -*-
3-
################################################################################# Simple FritzCap python port
3+
#################################################################################
4+
# Simple FritzCap python port
45
# Simplifies generation and examination of traces taken from AVM FritzBox and/or SpeedPort
56
# Traces can be examined using WireShark
67
# (c) neil.young 2010 (spongebob.squarepants in http://www.ip-phone-forum.de/)
@@ -46,6 +47,8 @@ def main():
4647
capture = True # Audio debug shortcut
4748
extract_audio = True # Extract audio if available
4849

50+
SID = '' # Required later
51+
4952
if capture:
5053

5154
# Attempt to login
@@ -97,12 +100,19 @@ def main():
97100
os.makedirs(folder)
98101

99102
# Start tracer thread, wait for console input to stop
100-
Tracer(protocol + '://' + boxname + '/cgi-bin/capture_notimeout' + start, capfile).start()
103+
if SID != '':
104+
Tracer(protocol + '://' + boxname + '/cgi-bin/capture_notimeout' + start + "&sid=%s" % SID, capfile).start()
105+
else:
106+
Tracer(protocol + '://' + boxname + '/cgi-bin/capture_notimeout' + start, capfile).start()
107+
101108
print 'Trace started, abandon with <ENTER>'
102109
raw_input()
103110
# Clean stop
104111
print 'Stopping trace'
105-
urllib.urlopen(protocol + '://' + boxname + '/cgi-bin/capture_notimeout' + stop)
112+
if SID != '':
113+
urllib.urlopen(protocol + '://' + boxname + '/cgi-bin/capture_notimeout' + stop)
114+
else:
115+
urllib.urlopen(protocol + '://' + boxname + '/cgi-bin/capture_notimeout' + stop + "&sid=%s" % SID)
106116
print 'Capture done'
107117

108118
# Parse the captured file

0 commit comments

Comments
 (0)