Skip to content

Commit

Permalink
fix an issue with the 'outfile' object
Browse files Browse the repository at this point in the history
  • Loading branch information
SkypLabs committed Feb 6, 2018
1 parent a7f8baf commit a7bf335
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions sniff-probe-req
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,14 @@ if __name__ == "__main__":
if args["output"]:
outfile = writer(args["output"], delimiter=";")

def write_csv(probe_req):
outfile.writerow([probe_req.timestamp, probe_req.s_mac, probe_req.s_mac_oui, probe_req.essid])
else:
write_csv = lambda p: None

def display_probe_req(probe_req):
print(probe_req)

def write_csv(probe_req):
outfile.writerow([probe_req.timestamp, probe_req.s_mac, probe_req.s_mac_oui, probe_req.essid])

print("[*] Start sniffing probe requests...")

try:
Expand Down

0 comments on commit a7bf335

Please sign in to comment.