From 655c1ee99dccc9e29de02c871b62e8706982ca6f Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Sun, 5 Apr 2015 08:11:06 +0200 Subject: [PATCH 1/3] added a quit mode quiet mode (-q/--quiet) without any display output, only Logfiles --- boswatch.py | 47 ++++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/boswatch.py b/boswatch.py index f10dec6..b33736d 100644 --- a/boswatch.py +++ b/boswatch.py @@ -32,7 +32,7 @@ def curtime(format="%Y-%m-%d %H:%M:%S"): def log(msg, level="log"): log_entry = curtime("%H:%M:%S")+" ["+level.upper()+"] "+msg - if not level == "log" or args.verbose: + if not level == "log" and not args.quiet or args.verbose: print log_entry bos_log = open("log_bos.txt", "a") @@ -66,6 +66,7 @@ try: parser.add_argument("-a", "--demod", help="Demodulation Functions", choices=['FMS', 'ZVEI', 'POC512', 'POC1200', 'POC2400'], required=True, nargs="+") parser.add_argument("-s", "--squelch", help="Level of Squelch", type=int, default=0) parser.add_argument("-v", "--verbose", help="Shows more Information", action="store_true") + parser.add_argument("-q", "--quiet", help="Shows no Information. Only Logfiles", action="store_true") args = parser.parse_args() except: log("cannot parse Args","error") @@ -81,42 +82,42 @@ try: print "" freq = args.freq - print "Frequency: "+freq - - #channel = args.channel - #print "Frequency: ",channel - device = args.device - print "Device-ID: "+str(device) - error = args.error - print "Error in PPM: "+str(error) - + demodulation = "" - print "Active Demods: "+str(len(args.demod)) if "FMS" in args.demod: demodulation += "-a FMSFSK " - print "- FMS" if "ZVEI" in args.demod: demodulation += "-a ZVEI2 " - print "- ZVEI" if "POC512" in args.demod: demodulation += "-a POCSAG512 " - print "- POC512" if "POC1200" in args.demod: - demodulation += "-a POCSAG1200 " - print "- POC1200" + demodulation += "-a POCSAG1200 " if "POC2400" in args.demod: demodulation += "-a POCSAG2400 " - print "- POC2400" - + squelch = args.squelch - print "Squelch: "+str(squelch) - if args.verbose: - print "Verbose Mode!" - - print "" + if not args.quiet: #only if not quiet mode + print "Frequency: "+freq + print "Device-ID: "+str(device) + print "Error in PPM: "+str(error) + print "Active Demods: "+str(len(args.demod)) + if "FMS" in args.demod: + print "- FMS" + if "ZVEI" in args.demod: + print "- ZVEI" + if "POC512" in args.demod: + print "- POC512" + if "POC1200" in args.demod: + print "- POC1200" + if "POC2400" in args.demod: + print "- POC2400" + print "Squelch: "+str(squelch) + if args.verbose: + print "Verbose Mode!" + print "" #ConfigParser log("reading config file") From 7cccf66cd413c41e0425233c4b5d9569ad8defa4 Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Sun, 5 Apr 2015 19:20:42 +0200 Subject: [PATCH 2/3] quiet mode bug dont show BOSWatch Header text in quiet mode --- boswatch.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/boswatch.py b/boswatch.py index b33736d..d16b3a8 100644 --- a/boswatch.py +++ b/boswatch.py @@ -71,16 +71,7 @@ try: except: log("cannot parse Args","error") - #Read Data from Args, Put it into working Variables and Display them - print " ____ ____ ______ __ __ __ " - print " / __ )/ __ \/ ___/ | / /___ _/ /______/ /_ b" - print " / __ / / / /\__ \| | /| / / __ `/ __/ ___/ __ \ e" - print " / /_/ / /_/ /___/ /| |/ |/ / /_/ / /_/ /__/ / / / t" - print " /_____/\____//____/ |__/|__/\__,_/\__/\___/_/ /_/ a" - print " German BOS Information Script " - print " by Bastian Schroll " - print "" - + #Read Data from Args, Put it into working Variables freq = args.freq device = args.device error = args.error @@ -100,6 +91,15 @@ try: squelch = args.squelch if not args.quiet: #only if not quiet mode + print " ____ ____ ______ __ __ __ " + print " / __ )/ __ \/ ___/ | / /___ _/ /______/ /_ b" + print " / __ / / / /\__ \| | /| / / __ `/ __/ ___/ __ \ e" + print " / /_/ / /_/ /___/ /| |/ |/ / /_/ / /_/ /__/ / / / t" + print " /_____/\____//____/ |__/|__/\__,_/\__/\___/_/ /_/ a" + print " German BOS Information Script " + print " by Bastian Schroll " + print "" + print "Frequency: "+freq print "Device-ID: "+str(device) print "Error in PPM: "+str(error) From ef288a6f7f6cf0e9c04a96e07cc526372387c7a7 Mon Sep 17 00:00:00 2001 From: Schrolli91 Date: Sun, 5 Apr 2015 22:22:06 +0200 Subject: [PATCH 3/3] Update README.md --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index b8fb0a0..fe544ee 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,11 @@ Python Script to Recive and Decode German BOS Information with rtl_fm and multimon-NG +### Note: +**This software is for illustrative purposes only and may be used only by authorized persons.** + +**The intercept of the German BOS radio is strictly prohibited !!!** + **Please** only use Code from **master**-Branch - thats **the only stable!** unless you are developer you can use the develop-Branch - may be unstable!