[Info] new fritzcap.py version 2.3

jeroenp

Neuer User
Mitglied seit
24 Jun 2017
Beiträge
9
Punkte für Reaktionen
4
Punkte
3
new fritzcap.py version 2.3 that fixes these issues:

- #1 can capture from Fritz!Boxes other than named fritz.box
- #2 can logon to Fritz!Boxes configured for named login (not just root)
- #3 .gitignore bytecode and log files
- #4 supports Mac OS X / MacOS in addition to Linux and Windows
- #5 allows capture from non-router Fritz!Boxes by specifying --capture_interface
- #6 with --show_interface parameter to list which interfaces a Fritz!Box can capture from

https://github.com/jpluimers/fritzcap/releases/tag/v2.3

Note that Python 3 is not yet supported, see https://github.com/jpluimers/fritzcap/issues/7

The master branch has a start of documentation as well: https://github.com/jpluimers/fritzcap

Please report issues at https://github.com/jpluimers/fritzcap/issues
 
Zuletzt bearbeitet:
Hi!

I installed this on an ubuntu machine (Ubuntu 16.04.2 LTS).

when I start fritzcap via

sudo python fritzcap.py -m -p MYPASSWORD

it throws this:

2017-07-07 14:50:28,761 - FritzCap version 2.3 started.
2017-07-07 14:50:28,765 - Connect to the call monitor service on fritz.box:1012.
2017-07-07 14:50:28,771 - Connected to the call monitor service on fritz.box:1012.



But when a call goes out/comes in this happends:

Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/home/couchdb/fritzcap/fritzcap/core/call_monitor.py", line 150, in run
self.capture_monitor.set_data("callevent.name", command)
AttributeError: 'NoneType' object has no attribute 'set_data'



Is this a bug or did I do something wrong?

greetz
duffy6
 
Hi duffy6,

I've not bumped into this error myself before so I'd like to reproduce it.

Can you post this as an issue to https://github.com/jpluimers/fritzcap/issues including:

- the date at which you got it from the master branch (see
https://github.com/jpluimers/fritzcap/network for the history of commits and branch merges)
- the command-line and configuration file used to start fritzcap (replace username and password with fake ones)
- the redacted copy (attach to the issue) of
log_debug_fritzcap.txt (inside the file, replace username and password with fake ones)
- your Fritz!Box model
- a link to this thread

For my own reference:

- https://github.com/jpluimers/fritzcap/blob/master/core/call_monitor.py#L150 crashes on accessing self.capture_monitor
- https://github.com/jpluimers/fritzcap/blob/master/core/call_monitor.py#L52 sets self.capture_monitor and logs an entry containing CallMonitor(capture_monitor
- on my production system (Raspberry Pi 1B with opensuse Tumbleweed) Thread-1 usually is bound to capfile_worker::run

Thanks for your help: much appreciated!

--jeroen
 
This commit should fix it: https://github.com/jpluimers/fritzcap/commit/940430828f9af97f6164049d7ecf02176ea54e82

Fixes #11 and use semantic versioning

- when there is monitoring, but no capture, indicate so in `fritzcap.py` main script
- new threading base class `ExceptionLoggingThread` that logs exceptions during `run`: all thread classes now descend from `ExceptionLoggingThread`
- in `call_monitor`, when there is no `capture_monitor`: prevent exceptions and ensure the intended logic still works
- semantic versioning http://semver.org/

```
2017-07-09 10:33:21,889 - FritzCap version 2.3.1 started.
2017-07-09 10:33:21,889 - Note: -m or --monitor_calls without -c or --capture_files does monitoring without capture.
2017-07-09 10:33:21,890 - Connect to the call monitor service on 192.168.124.23:1012.
2017-07-09 10:33:21,897 - Connected to the call monitor service on 192.168.124.23:1012.
2017-07-09 10:33:37,816 - Ring (ID:0, ActiveCalls.:1, Caller:xxxxxxxxxx, DialedNumber:yyyyyyyyyy, LinePort:SIP0)
2017-07-09 10:33:43,075 - Disconnect (ID:0, ActiveCalls.:0, Caller:xxxxxxxxxx, DialedNumber:yyyyyyyyyy, LinePort:SIP0)
2017-07-09 10:33:58,084 - Connection to the call monitor service on 192.168.124.23:1012 stopped.
2017-07-09 10:33:58,084 - FritzCap version 2.3.1 finished.
```

Please let me know in https://github.com/jpluimers/fritzcap/issues/11 if you can test this out yourself . When not I will merge https://github.com/jpluimers/fritzc...or_without_capture_but_do_not_throw_exception into the `master` branch for you first.
 
Hi! Thx for this solution!

I am not that kind of professional to test this out. Can you merge it to the master branch?

Thx!

greetz
duffy6
 
Thank you! It's working like a charm!

Would it be possible to implement an option to delete all captured .cap files and unmuxed wav files?
I would like to keep just the muxed wave files.

Even better of course would be an option to encode the muxed stream in MP3.

Uuuhmmm....and perhaps an option to run fritzcap in daemon mode.

Do you think this is possible?

When I can help with my non-existing python knowledge: let me know :)

Greetz

Duffy6
 
Hi, what's the String to save the cap with dialed number and Caller number?

cap_file = capture_%(dialed)%(caller).cap

doesn't work.

pls Help. Thank you
 
Hi,

some providers of mobile telephony provide „WIFI calling“ (sometimes also called „WLAN call“ ), which meand that calls from mobile telephony are routed via wifi.

would it be possible to implement automated call capturing of these wifi calls?

Greetz
duffy6
 
Hi,
after chage of Box from 7490 to AVM 7590 wirh OS7 (up to date) fritzcap dosn`t work.
the Message is:
2018-08-14 18:20:17,572 - FritzCap version 2.3.1 started.
2018-08-14 18:20:17,575 - Connect to the call monitor service on fritz.box:1012.
2018-08-14 18:20:19,594 - Cannot create connection to the call monitor service on fritz.box:1012.
2018-08-14 18:20:19,977 - FritzCap version 2.3.1 finished.

is this is Port Failure?

Regards
Andi

Habe eine Lösung gefunden!!!!!
vorher den port 1012 freischalten.Am Telefon zum einschalten wählen:#96*5*
ist also erledigt!
 
Zuletzt bearbeitet:
Are you sure, you've activated the CallMonitor port using the appropriate dial-code sequence from a phone?
 
Hi,
nächstes Problem
1.) WAV Files werden nicht wie vorher automatisch erstellt.
2.) Speichern der Telefon Nummern in dem Dateinamen funktioniert nicht
3.) Cap Datei ist nur 1kb groß (keine Aufzeichnung)

update:
habe nun die Python auf 2.7.15 gebracht:
Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

Aber es wird nicht besser sondern nur interessanter:

Code:
C:\fritzcap>c:\python27\python fritzcap.py -c -d -m
2018-08-14 19:29:50,344 - FritzCap version 2.3.1 started.
2018-08-14 19:29:50,345 - Connect    to the call monitor service on fritz.box:1012.
2018-08-14 19:29:50,351 - Connected  to the call monitor service on fritz.box:1012.
2018-08-14 19:30:56,177 - Call       (ID:1, ActiveCalls.:1, Caller:xxxxxxxxxx, DialedNumber:xxxxxxxxx, LinePort:SIP2)
2018-08-14 19:30:56,493 - Exception in `run`
Traceback (most recent call last):
  File "C:\fritzcap/core/exception_logging_thread.py", line 48, in run
    self.run_logic()
  File "C:\fritzcap/core/capture_monitor.py", line 125, in run_logic
    self.sub_start_capture()
  File "C:\fritzcap/core/capture_monitor.py", line 245, in sub_start_capture
    self.init_capture_file()
  File "C:\fritzcap/core/capture_monitor.py", line 228, in init_capture_file
    file = StringHelper.parse_string(self.cap_file, self.data_map)
  File "C:\fritzcap/core/string_helper.py", line 77, in parse_string
    value = StringHelper.parse_dates(matchObj.group(2), matchObj.group(3), data_map)
  File "C:\fritzcap/core/string_helper.py", line 101, in parse_dates
    str = (work_time.strftime(time_format))
ValueError: Invalid format string
Exception in thread Thread-3:
Traceback (most recent call last):
  File "c:\python27\lib\threading.py", line 801, in __bootstrap_inner
    self.run()
  File "C:\fritzcap/core/exception_logging_thread.py", line 48, in run
    self.run_logic()
  File "C:\fritzcap/core/capture_monitor.py", line 125, in run_logic
    self.sub_start_capture()
  File "C:\fritzcap/core/capture_monitor.py", line 245, in sub_start_capture
    self.init_capture_file()
  File "C:\fritzcap/core/capture_monitor.py", line 228, in init_capture_file
    file = StringHelper.parse_string(self.cap_file, self.data_map)
  File "C:\fritzcap/core/string_helper.py", line 77, in parse_string
    value = StringHelper.parse_dates(matchObj.group(2), matchObj.group(3), data_map)
  File "C:\fritzcap/core/string_helper.py", line 101, in parse_dates
    str = (work_time.strftime(time_format))
ValueError: Invalid format string

2018-08-14 19:31:05,957 - Connect    (ID:1, ActiveCalls.:1, Caller:xxxxxxxx, DialedNumber:xxxxxxxxx, LinePort:SIP2)
2018-08-14 19:31:13,040 - Disconnect (ID:1, ActiveCalls.:0, Caller:xxxxxxxxx, DialedNumber:xxxxxxxxxxxx, LinePort:SIP2)


Die xxxxxx wurden von mir eingefügt damit die nummer hier nicht im Forum landet :)

### Zusammenführung Doppelpost by stoney ###

Ich habe jetzt die allerneuste Python 3.7.0 installiert

Code:
C:\>python
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:06:47) [MSC v.1914 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

Dazu die C:\fritzcap-2.3.1> installiert im vorgeschlagenen Verzeichniss!
und starte mit python fritzcap.py -c -d -m

in der fritzcap.conf habe ich das Passwort und fritz.box eingetragen. Aber es läuft nicht

Ich habe cmd als Administrator gestartet um in die Dos Box als Admin zu gelangen (nur für alle Fälle)

Bin in das Verzeichniss C:\fritzcap-2.3.1 gewechselt und habe dort python fritzcap.py -c -d -m eingegeben
Als Meldung erschein:

Code:
C:\fritzcap-2.3.1>python fritzcap.py -c -d -m
Traceback (most recent call last):
  File "fritzcap.py", line 39, in <module>
    import argparse
ModuleNotFoundError: No module named 'ConfigParser'

Weiss jemand evtl ne Lösung.

Gruß Andi

//edit by stoney: [CODE] TAGs [/CODE] gesetzt

### Zusammenführung Doppelpost ###

Jetzt habe ich alles wieder gelöscht und bin von vorne angefangen:
Python 2.7 installiert im Verzeichnis Python27
Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:25:58) [MSC v.1500 64 bit (AMD64)] on win32
Fritcap 2.3.1 installiert im Verzeichniss Fritzcap
in der fritzcap.conf datei das PW und die Adresse fritz.box eingetragen bzw aktiviert durch löschen der # Zeichen
Wechsel in eine DOS Box über cmd
ins verzeichniss c:\fritzcap gewechselt
hier im Verzeichniss fritzcap folgendes eingegeben:
Code:
c:\python27\python fritzcap.py -c -d -m
So weit so gut es kommt keine Fehler Meldung 
Es sieht so aus als wenn alles läuft
C:\fritzcap>c:\python27\python fritzcap.py -c -d -m
2018-08-15 23:36:24,979 - FritzCap version 2.3.1 started.
2018-08-15 23:36:24,980 - Connect    to the call monitor service on fritz.box:1012.
2018-08-15 23:36:24,986 - Connected  to the call monitor service on fritz.box:1012.

Der eingehende Anruf wird erkannt!
Code:
C:\fritzcap>c:\python27\python fritzcap.py -c -d -m
2018-08-15 23:36:24,979 - FritzCap version 2.3.1 started.
2018-08-15 23:36:24,980 - Connect    to the call monitor service on fritz.box:1012.
2018-08-15 23:36:24,986 - Connected  to the call monitor service on fritz.box:1012.
2018-08-15 23:37:16,880 - Ring       (ID:0, ActiveCalls.:1, Caller:________, DialedNumber:_________, LinePort:SIP2)
2018-08-15 23:37:17,111 - Start capture (capture_file:'captures/2018-08-15/233717/capture_20180815233717.cap').
2018-08-15 23:37:18,134 - Connect    (ID:0, ActiveCalls.:1, Caller:__________, DialedNumber:__________, LinePort:SIP2)
2018-08-15 23:37:33,500 - Disconnect (ID:0, ActiveCalls.:0, Caller:______________, DialedNumber:__________, LinePort:SIP2)
2018-08-15 23:37:44,779 - Capture finished (capture_file:'captures/2018-08-15/233717/capture_20180815233717.cap').
2018-08-15 23:37:44,779 - Decode process started  (worker_id:1, file:'captures/2018-08-15/233717/capture_20180815233717.cap')
2018-08-15 23:37:44,780 - Decode process finished (worker_id:1, file:'captures/2018-08-15/233717/capture_20180815233717.cap')

aber so bleibt alles stehen es läuft nicht mehr weiter! Und die erstellte cap Datei ist 1kb gross und leer.

wer kann mir helfen?
 
Zuletzt bearbeitet von einem Moderator:
Hi,
what are the parameters for
capture_files =
decode_files =
monitor_calls =
true/false yes/no 0/1 fail.
 
Hi dm4im,
the parameter are:

Code:
[settings]
# capture_files        =
# decode_files         =
# monitor_calls        =
password             = _____________

# logging_config       =
# box_name             = fritz.box
# call_service_port    = 1012
# login_not_required   =
# protocol             = http
cap_folder             = captures/%(tcaps.Y-m-d/HMS)/
cap_file               = capture_%(tcaps.YmdHMS).cap
# after_capture_time   = 10
# decode_workers_count = 2

default_login   = getpage=../html/de/menus/menu2.html&errorpage=../html/index.html&var:lang=de&var:pagename=home&var:menu=home&=&login:command/password=%s
sid_challenge   = getpage=../html/login_sid.xml
sid_login       = login:command/response=%s&getpage=../html/login_sid.xml
start_str       = ?start=1&start1=Start
stop_str        = ?stop=1&stop1=Stop

VG Andi

//edit by stoney: [CODE] TAG [/CODE] gesetzt
 
Zuletzt bearbeitet von einem Moderator:
Ok,
wrong question, my fault.
# capture_files =
# decode_files =
# monitor_calls =
What are the VALUES for these parameters?
If i start with python fritzcap.py -c -d -m while boxname is in the config
like boxname=192.168.0.1 , the program starts normaly. With values after capture_files etc. like yes or no , true or false, i get errors.

I'd like to put values for -c -m -d into config, so i don't have to remember / type them on every start.
 
Zuletzt bearbeitet:
ANY help appreciated

Hi,

fritzcap is running fine, but it looks like only for first recording.
Second and later recordings are not saved... (no cap file).
fritzcap debug log:
Code:
2018-10-19 06:01:56,714 [  Thread-4::140147691005696] [DEBUG   ] [    call_monitor::run_logic         ] Telnet:'19.10.18 06:01:56;CALL;1;4;4XXXXXXX;0XXXXXXXXXX;SIP1;'
2018-10-19 06:01:56,714 [  Thread-4::140147691005696] [INFO    ] [    call_monitor::run_logic         ] Call       (ID:1, ActiveCalls.:1, Caller:4XXXXXXX(ZuHause), DialedNumber:0XXXXXXXXXX(NoSuchUser), LinePort:SIP1)
2018-10-19 06:01:56,715 [  Thread-4::140147691005696] [DEBUG   ] [    call_monitor::run_logic         ] There is at least 1 active call. Send start_capture event to the CaptureMonitor.
2018-10-19 06:01:56,715 [  Thread-4::140147691005696] [DEBUG   ] [ capture_monitor::start_capture     ] start_capture called.
2018-10-19 06:01:56,715 [  Thread-4::140147691005696] [DEBUG   ] [    call_monitor::run_logic         ] Wait for call monitor status change.
2018-10-19 06:01:56,715 [  Thread-3::140147682612992] [DEBUG   ] [ capture_monitor::run_logic         ] pre_capture wait() finished.
2018-10-19 06:01:56,715 [  Thread-3::140147682612992] [DEBUG   ] [ capture_monitor::run_logic         ] pre_capture release lock.
2018-10-19 06:01:56,716 [  Thread-3::140147682612992] [DEBUG   ] [ capture_monitor::run_logic         ] pre_capture release lock finished.
2018-10-19 06:01:56,716 [  Thread-3::140147682612992] [DEBUG   ] [ capture_monitor::init_login        ] Login attempt to the the FritzBox (box_name:192.168.178.1)
2018-10-19 06:01:56,716 [  Thread-3::140147682612992] [DEBUG   ] [ capture_monitor::init_login        ] Call the challange token url (url:'http://192.168.178.1/login_sid.lua')
2018-10-19 06:01:57,148 [  Thread-3::140147682612992] [DEBUG   ] [ capture_monitor::init_login        ] SID HTTP result:200
2018-10-19 06:01:57,149 [  Thread-3::140147682612992] [DEBUG   ] [ capture_monitor::init_login        ] Call the read seed token url (url:'http://192.168.178.1/login_sid.lua?username=someuser&response=bbc71146-05594c46ee8fc293e745e2466996fbc0', data:'login:command/response=bbc71146-05594c46ee8fc293e745e2466996fbc0&getpage=../html/login_sid.xml').
2018-10-19 06:01:57,428 [  Thread-3::140147682612992] [DEBUG   ] [ capture_monitor::init_login        ] Login HTTP result:200
2018-10-19 06:01:57,429 [  Thread-3::140147682612992] [DEBUG   ] [ capture_monitor::init_login        ] Login OK (SID: 2dc912c65c4614c5)
2018-10-19 06:01:57,429 [  Thread-3::140147682612992] [DEBUG   ] [ capture_monitor::sub_start_capture ] data_map:{'dialed.numbername': '0XXXXXXXXXX(NoSuchUser)', 'callpartner.name': 'NoSuchUser', 'tcape': datetime.datetime(2018, 10, 18, 15, 1, 37, 827116), 'me.name': 'ZuHause', 'pbook_name.ZuHause': '4XXXXXXX', 'me.numbername': '4XXXXXXX(ZuHause)', 'tcaps': datetime.datetime(2018, 10, 19, 6, 1, 57, 429226), 'pbook_name.NoSuchUser': '0XXXXXXXXXX', 'dialed.number': '0XXXXXXXXXX', 'dialed.name': 'NoSuchUser', 'pbook_number.3096212': 'ZuHause', 'callpartner.numbername': '0XXXXXXXXXX(NoSuchUser)', 'tdisc': datetime.datetime(2018, 10, 18, 15, 1, 36, 37576), 'pbook_number.0XXXXXXXXXX': 'NoSuchUser', 'callpartner.number': '0XXXXXXXXXX', 'tcall': datetime.datetime(2018, 10, 19, 6, 1, 56, 713991), 'caller.number': '4XXXXXXX', 'tstart': datetime.datetime(2018, 10, 17, 11, 58, 26, 814034), 'caller.numbername': '4XXXXXXX(ZuHause)', 'caller.name': 'ZuHause', 'acalls.number': 1, 'todisc': time.struct_time(tm_year=2018, tm_mon=10, tm_mday=18, tm_hour=15, tm_min=1, tm_sec=36, tm_wday=3, tm_yday=291, tm_isdst=-1), 'tconn': datetime.datetime(2018, 10, 18, 13, 57, 26, 616368), 'tocall': time.struct_time(tm_year=2018, tm_mon=10, tm_mday=19, tm_hour=6, tm_min=1, tm_sec=56, tm_wday=4, tm_yday=292, tm_isdst=-1), 'callevent.name': 'CALL', 'pbook_number.4XXXXXXX': 'ZuHause', 'toconn': time.struct_time(tm_year=2018, tm_mon=10, tm_mday=18, tm_hour=13, tm_min=57, tm_sec=26, tm_wday=3, tm_yday=291, tm_isdst=-1), 'lineport.name': 'SIP1', 'me.number': '4XXXXXXX'}
2018-10-19 06:01:57,429 [  Thread-3::140147682612992] [DEBUG   ] [ capture_monitor::init_capture_file ] Initialize capture file (folder:captures/2018-10-19/060157/, file:capture_20181019060157.cap).
2018-10-19 06:01:57,429 [  Thread-3::140147682612992] [DEBUG   ] [ capture_monitor::init_capture_file ] Destination folder:'captures/2018-10-19/060157/' not exists. Create.
2018-10-19 06:01:57,430 [  Thread-3::140147682612992] [INFO    ] [ capture_monitor::sub_start_capture ] Start capture (capture_file:'captures/2018-10-19/060157/capture_20181019060157.cap').
2018-10-19 06:01:57,430 [  Thread-3::140147682612992] [DEBUG   ] [ capture_monitor::sub_start_capture ] Send capture start request to the box          (url:'http://192.168.178.1/cgi-bin/capture_notimeout?start=1&start1=Start&ifaceorminor= &sid=2dc912c65c4614c5', capture_file:'captures/2018-10-19/060157/capture_20181019060157.cap').
2018-10-19 06:01:57,430 [  Thread-3::140147682612992] [DEBUG   ] [exception_logging_thread::__init__          ] ExceptionLoggingThread().
2018-10-19 06:01:57,431 [  Thread-8::140147601438464] [DEBUG   ] [          tracer::run_logic         ] Trace started  (url:'http://192.168.178.1/cgi-bin/capture_notimeout?start=1&start1=Start&ifaceorminor= &sid=2dc912c65c4614c5', filename:'captures/2018-10-19/060157/capture_20181019060157.cap')
2018-10-19 06:01:57,431 [  Thread-3::140147682612992] [DEBUG   ] [ capture_monitor::sub_start_capture ] Send capture start request to the box finished (url:'http://192.168.178.1/cgi-bin/capture_notimeout?start=1&start1=Start&ifaceorminor= &sid=2dc912c65c4614c5', capture_file:'captures/2018-10-19/060157/capture_20181019060157.cap').
2018-10-19 06:01:57,431 [  Thread-3::140147682612992] [DEBUG   ] [ capture_monitor::run_logic         ] post_capture acquire lock.
2018-10-19 06:01:57,431 [  Thread-3::140147682612992] [DEBUG   ] [ capture_monitor::run_logic         ] post_capture acquire lock finished.
2018-10-19 06:01:57,431 [  Thread-3::140147682612992] [DEBUG   ] [ capture_monitor::run_logic         ] post_capture wait().
2018-10-19 06:02:10,493 [  Thread-4::140147691005696] [DEBUG   ] [    call_monitor::run_logic         ] Telnet:'19.10.18 06:02:10;CONNECT;1;4;0XXXXXXXXXX;'
2018-10-19 06:02:10,494 [  Thread-4::140147691005696] [INFO    ] [    call_monitor::run_logic         ] Connect    (ID:1, ActiveCalls.:1, Caller:4XXXXXXX(ZuHause), DialedNumber:0XXXXXXXXXX(NoSuchUser), LinePort:SIP1)
2018-10-19 06:02:10,494 [  Thread-4::140147691005696] [DEBUG   ] [    call_monitor::run_logic         ] Wait for call monitor status change.
2018-10-19 06:02:58,803 [  Thread-8::140147601438464] [DEBUG   ] [          tracer::run_logic         ] Could not open Trace (url:'http://192.168.178.1/cgi-bin/capture_notimeout?start=1&start1=Start&ifaceorminor= &sid=2dc912c65c4614c5', filename:'captures/2018-10-19/060157/capture_20181019060157.cap')
2018-10-19 06:09:53,840 [  Thread-4::140147691005696] [DEBUG   ] [    call_monitor::run_logic         ] Telnet:'19.10.18 06:09:53;DISCONNECT;1;464;'
2018-10-19 06:09:53,840 [  Thread-4::140147691005696] [INFO    ] [    call_monitor::run_logic         ] Disconnect (ID:1, ActiveCalls.:0, Caller:4XXXXXXX(ZuHause), DialedNumber:0XXXXXXXXXX(NoSuchUser), LinePort:SIP1)
2018-10-19 06:09:53,840 [  Thread-4::140147691005696] [DEBUG   ] [    call_monitor::run_logic         ] There is no more active calls. Send stop_capture event to the CaptureMonitor.
2018-10-19 06:09:53,840 [  Thread-4::140147691005696] [DEBUG   ] [ capture_monitor::stop_capture      ] stop_capture called.
2018-10-19 06:09:53,840 [  Thread-4::140147691005696] [DEBUG   ] [    call_monitor::run_logic         ] Wait for call monitor status change.
2018-10-19 06:09:53,840 [  Thread-3::140147682612992] [DEBUG   ] [ capture_monitor::run_logic         ] post_capture wait() finished.
2018-10-19 06:09:53,840 [  Thread-3::140147682612992] [DEBUG   ] [ capture_monitor::run_logic         ] post_capture wait(0.999711).
2018-10-19 06:09:54,840 [  Thread-3::140147682612992] [DEBUG   ] [ capture_monitor::run_logic         ] post_capture wait(0.999711) finished.
2018-10-19 06:09:54,841 [  Thread-3::140147682612992] [DEBUG   ] [ capture_monitor::run_logic         ] post_capture release lock.
2018-10-19 06:09:54,841 [  Thread-3::140147682612992] [DEBUG   ] [ capture_monitor::run_logic         ] post_capture release lock finished.
2018-10-19 06:09:54,841 [  Thread-3::140147682612992] [DEBUG   ] [ capture_monitor::init_login        ] Login attempt to the the FritzBox (box_name:192.168.178.1)
2018-10-19 06:09:54,841 [  Thread-3::140147682612992] [DEBUG   ] [ capture_monitor::init_login        ] Call the challange token url (url:'http://192.168.178.1/login_sid.lua')
2018-10-19 06:09:55,116 [  Thread-3::140147682612992] [DEBUG   ] [ capture_monitor::init_login        ] SID HTTP result:200
2018-10-19 06:09:55,116 [  Thread-3::140147682612992] [DEBUG   ] [ capture_monitor::init_login        ] Call the read seed token url (url:'http://192.168.178.1/login_sid.lua?username=someuser&response=58190781-747263f4b6693719103bdb187d2d1d03', data:'login:command/response=58190781-747263f4b6693719103bdb187d2d1d03&getpage=../html/login_sid.xml').
2018-10-19 06:09:55,386 [  Thread-3::140147682612992] [DEBUG   ] [ capture_monitor::init_login        ] Login HTTP result:200
2018-10-19 06:09:55,386 [  Thread-3::140147682612992] [DEBUG   ] [ capture_monitor::init_login        ] Login OK (SID: aaef2fb7084b3cea)
2018-10-19 06:09:55,386 [  Thread-3::140147682612992] [DEBUG   ] [ capture_monitor::sub_stop_capture  ] Send capture stop request to the box           (url:'http://192.168.178.1/cgi-bin/capture_notimeout?stop=1&stop1=Stop&ifaceorminor= &sid=aaef2fb7084b3cea', capture_file:'captures/2018-10-19/060157/capture_20181019060157.cap').
2018-10-19 06:09:55,507 [  Thread-3::140147682612992] [DEBUG   ] [ capture_monitor::sub_stop_capture  ] Send capture stop request to the box finished  (url:'http://192.168.178.1/cgi-bin/capture_notimeout?stop=1&stop1=Stop&ifaceorminor= &sid=aaef2fb7084b3cea', capture_file:'captures/2018-10-19/060157/capture_20181019060157.cap').
2018-10-19 06:09:55,508 [  Thread-3::140147682612992] [INFO    ] [ capture_monitor::sub_stop_capture  ] Capture finished (capture_file:'captures/2018-10-19/060157/capture_20181019060157.cap').
2018-10-19 06:09:55,508 [  Thread-3::140147682612992] [DEBUG   ] [ capture_monitor::sub_stop_capture  ] Add captured file 'captures/2018-10-19/060157/capture_20181019060157.cap' to the decoding work queue.
2018-10-19 06:09:55,508 [  Thread-3::140147682612992] [DEBUG   ] [ capture_monitor::run_logic         ] pre_capture acquire lock.
2018-10-19 06:09:55,508 [  Thread-1::140147593045760] [INFO    ] [  capfile_worker::process           ] Decode process started  (worker_id:0, file:'captures/2018-10-19/060157/capture_20181019060157.cap')
2018-10-19 06:09:55,508 [  Thread-1::140147593045760] [ERROR   ] [exception_logging_thread::run               ] Exception in `run`
Traceback (most recent call last):
  File "/home/fritzcap-master/core/exception_logging_thread.py", line 48, in run
    self.run_logic()
  File "/home/fritzcap-master/core/capfile_worker.py", line 69, in run_logic
    self.process(filename)
  File "/home/fritzcap-master/core/capfile_worker.py", line 79, in process
    PcapParser(filename, g711.decode).parse()
  File "/home/fritzcap-master/core/pcap_parse.py", line 46, in __init__
    self.f = open(filename, 'rb')
IOError: [Errno 2] No such file or directory: 'captures/2018-10-19/060157/capture_20181019060157.cap'
2018-10-19 06:09:55,509 [  Thread-3::140147682612992] [DEBUG   ] [ capture_monitor::run_logic         ] pre_capture acquire lock finished.
2018-10-19 06:09:55,509 [  Thread-3::140147682612992] [DEBUG   ] [ capture_monitor::run_logic         ] pre_capture wait().



CONFIG:
FritzBox 7490 V7.01
Ubuntu 16.04.1
Python 2.7.13
I am running fritzcap.py as normal user!

//edit by stoney: [CODE] TAG [/CODE] gesetzt
 
Zuletzt bearbeitet:
  • Like
Reaktionen: dm4im
Diesen Thread habe ich leider erst kurz nach meinem Post gefunden. Er scheint aber nicht mein Problem zu lösen. Ich habe payload probleme ;)
Nun erhoffe ich hilfe HIER in dem alten. Ist das in Ordnung ?
 
Hi,

just searching now for a while, and did not really find a usable solution. Now I see here a project which have some possibilities maybe as a basis ;)
What I search: a tool, which uses the packet-capture information from the fritz-box, to generate a overview of the traffic of all connected devices, separated for each device. I know this could be done by analyzing the pcap with whireshak, but this has some disadvantages:
- if you want to have a overview for a longer time the storaged files are quite big (just for the traffic the files don't need to be hat big, as not the transferred data itself needs to be stored)
- the analyzing process needs some knowledge
- automated process could maybe also include warning notices via mal for specific things...

So what do you think, could be there a way to include in the tool also a Traffic monitor system? Or did you hear maybe from a tool which does it that way which I could not found up to now?

BR and many thanks
SP
 
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.