Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iso timestamp gives type object 'datetime.datetime' has no attribute 'datetime' #7

Open
Dmeowmixer opened this issue Jul 1, 2017 · 4 comments

Comments

@Dmeowmixer
Copy link

$ sudo python probemon.py -i wlan0 -t iso -o probemon.log -f -s -r
Traceback (most recent call last):
File "probemon.py", line 96, in
main()
File "probemon.py", line 93, in main
sniff(iface=args.interface, prn=built_packet_cb, store=0)
File "/usr/local/lib/python2.7/dist-packages/scapy/sendrecv.py", line 620, in sniff
r = prn(p)
File "probemon.py", line 36, in packet_callback
log_time = datetime.datetime.now().isoformat()
AttributeError: type object 'datetime.datetime' has no attribute 'datetime'

unix working fine, not sure if this is a local problem.

@prylypko
Copy link

prylypko commented Jul 9, 2017

I have same error on Kali

@prylypko
Copy link

prylypko commented Jul 9, 2017

@Dmeowmixer this fixes the problem c4920db

@mflannery
Copy link

On line 36 remove the second datetime:

log_time = datetime.now().isoformat()

This works but the date and time is messed up.

@pawmendi
Copy link

The following line 36:

log_time = datetime.fromtimestamp(int(time.time())).strftime('%Y-%m-%d %H:%M:%S')

works with the correct date and time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants