|
1 | 1 | #!/usr/bin/python
|
2 | 2 | # -*- coding: iso-8859-1 -*-
|
3 |
| -################################################################################# Simple FritzCap python port |
| 3 | +################################################################################# |
| 4 | +# Simple FritzCap python port |
4 | 5 | # Simplifies generation and examination of traces taken from AVM FritzBox and/or SpeedPort
|
5 | 6 | # Traces can be examined using WireShark
|
6 | 7 | # (c) neil.young 2010 (spongebob.squarepants in http://www.ip-phone-forum.de/)
|
@@ -46,6 +47,8 @@ def main():
|
46 | 47 | capture = True # Audio debug shortcut
|
47 | 48 | extract_audio = True # Extract audio if available
|
48 | 49 |
|
| 50 | + SID = '' # Required later |
| 51 | + |
49 | 52 | if capture:
|
50 | 53 |
|
51 | 54 | # Attempt to login
|
@@ -97,12 +100,19 @@ def main():
|
97 | 100 | os.makedirs(folder)
|
98 | 101 |
|
99 | 102 | # 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 | + |
101 | 108 | print 'Trace started, abandon with <ENTER>'
|
102 | 109 | raw_input()
|
103 | 110 | # Clean stop
|
104 | 111 | 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) |
106 | 116 | print 'Capture done'
|
107 | 117 |
|
108 | 118 | # Parse the captured file
|
|
0 commit comments