Skip to content

Commit

Permalink
fix Oros42#103 textfile textfilePath
Browse files Browse the repository at this point in the history
  • Loading branch information
Oros42 committed Aug 13, 2020
1 parent ebb6fd5 commit 81359af
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions simple_IMSI-catcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class tracker:
show_all_tmsi = False
mcc_codes = None
sqlcon = None
textfile = None
textfilePath = None

output_function = None

Expand Down Expand Up @@ -157,7 +157,7 @@ def textfile(self, filename):
txt = open(filename, "w")
txt.write("start\n")
txt.close()
self.textfile = filename
self.textfilePath = filename

def mysql_file(self):
global con
Expand Down Expand Up @@ -202,9 +202,9 @@ def pfields(self, cpt, tmsi1, tmsi2, imsi, mcc, mnc, lac, cell, packet=None):
)
self.sqlcon.commit()

if self.textfile:
if self.textfilePath:
now = datetime.datetime.now()
txt = open(self.textfile, "a")
txt = open(self.textfilePath, "a")
txt.write(str(now) + ", " + tmsi1 + ", " + tmsi2 + ", " + imsi + ", " + imsicountry + ", " + imsibrand + ", " + imsioperator + ", " + mcc + ", " + mnc + ", " + lac + ", " + cell + "\n")
txt.close()

Expand Down Expand Up @@ -580,7 +580,7 @@ def find_imsi_from_pkt(p):
imsitracker.sqlite_file(options.sqlite)

if options.txt:
imsitracker.txtfile(options.txt)
imsitracker.textfilePath(options.txt)

if options.mysql:
imsitracker.mysql_file()
Expand Down

0 comments on commit 81359af

Please sign in to comment.