From 4f091094258f5ccfa3f254ad784fc252bdc68dfc Mon Sep 17 00:00:00 2001 From: Oros Date: Thu, 14 Dec 2017 23:47:18 +0100 Subject: [PATCH] Fix output order --- simple_IMSI-catcher.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/simple_IMSI-catcher.py b/simple_IMSI-catcher.py index 3757738..993317d 100644 --- a/simple_IMSI-catcher.py +++ b/simple_IMSI-catcher.py @@ -97,7 +97,7 @@ class tracker: def set_ouput_function(self, new_ouput_function): # New ouput function need this field : - # cpt, tmsi1, tmsi2, imsi, imsibrand, imsicountry, imsioperator, mcc, mnc, lac, cell, packet=None + # cpt, tmsi1, tmsi2, imsi, imsicountry, imsibrand, imsioperator, mcc, mnc, lac, cell, packet=None self.ouput_function=new_ouput_function def track_this_imsi(self, imsi_to_track): @@ -200,8 +200,8 @@ class tracker: # FIXME Figure out proper SQL type for each attribute self.sqlcon.execute("CREATE TABLE IF NOT EXISTS observations(stamp datetime, tmsi1 text, tmsi2 text, imsi text, imsicountry text, imsibrand text, imsioperator text, mcc integer, mnc integer, lac integer, cell integer);") - def ouput(self, cpt, tmsi1, tmsi2, imsi, imsibrand, imsicountry, imsioperator, mcc, mnc, lac, cell, packet=None): - print((u"{:7s} ; {:10s} ; {:10s} ; {:17s} ; {:12s} ; {:10s} ; {:21s} ; {:4s} ; {:5s} ; {:6s} ; {:6s}".format(str(cpt), tmsi1, tmsi2, imsi, imsibrand, imsicountry, imsioperator, str(mcc), str(mnc), str(lac), str(cell))).encode("utf-8")) + def ouput(self, cpt, tmsi1, tmsi2, imsi, imsicountry, imsibrand, imsioperator, mcc, mnc, lac, cell, packet=None): + print((u"{:7s} ; {:10s} ; {:10s} ; {:17s} ; {:12s} ; {:10s} ; {:21s} ; {:4s} ; {:5s} ; {:6s} ; {:6s}".format(str(cpt), tmsi1, tmsi2, imsi, imsicountry, imsibrand, imsioperator, str(mcc), str(mnc), str(lac), str(cell))).encode("utf-8")) def pfields(self, cpt, tmsi1, tmsi2, imsi, mcc, mnc, lac, cell, packet=None): imsicountry="" @@ -211,7 +211,7 @@ class tracker: imsi, imsicountry, imsibrand, imsioperator = self.str_imsi(imsi, packet) else: imsi="" - self.ouput_function(cpt, tmsi1, tmsi2, imsi, imsibrand, imsicountry, imsioperator, mcc, mnc, lac, cell, packet) + self.ouput_function(cpt, tmsi1, tmsi2, imsi, imsicountry, imsibrand, imsioperator, mcc, mnc, lac, cell, packet) if self.sqlcon: now = datetime.datetime.now() if tmsi1 == "":