Skip to content

fixing datetime call in tools/zbfind - #165

Merged
rmspeers merged 3 commits into
riverloopsec:release/2.7.1from
SrEdeu:patch-1
Mar 24, 2019
Merged

fixing datetime call in tools/zbfind#165
rmspeers merged 3 commits into
riverloopsec:release/2.7.1from
SrEdeu:patch-1

Conversation

@SrEdeu

@SrEdeu SrEdeu commented Mar 18, 2019

Copy link
Copy Markdown
Contributor

No description provided.

@rmspeers
rmspeers changed the base branch from master to release/2.7.1 March 24, 2019 15:17
@rmspeers
rmspeers merged commit db44650 into riverloopsec:release/2.7.1 Mar 24, 2019
@rmspeers

Copy link
Copy Markdown
Contributor

@SrEdeu upon merging this I looked and realized this appears to not work on Python 2.7 at least:

$ python -V
Python 2.7.10
$ python
Python 2.7.10 (default, Aug 17 2018, 19:45:58) 
[GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.0.42)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import datetime
>>> datetime.datetime.now()
datetime.datetime(2019, 3, 24, 11, 24, 56, 974321)
>>> datetime.now()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'now'

Which version are you on that you see issues with the way it was done? Can you send similar output as to the above?

rmspeers pushed a commit that referenced this pull request Mar 24, 2019
… correct on Python 2.7, updated dates in README
@SrEdeu

SrEdeu commented Mar 25, 2019

Copy link
Copy Markdown
Contributor Author

@rmspeers I'm also working on Python 2.7, and having same outputs as you.
When I execute zbfind I get the following.

$ sudo python zbfind -c 26
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "zbfind", line 1040, in run
    nowstr = str(datetime.datetime.now())
AttributeError: type object 'datetime.datetime' has no attribute 'datetime'

I assumed that it was because datetime was imported as
from datetime import datetime
but is not.. So I don't know why I'm getting this error, as datetime.now() is working fine for me without any other modification.

@SrEdeu
SrEdeu deleted the patch-1 branch April 10, 2019 11:39
@SrEdeu
SrEdeu restored the patch-1 branch April 10, 2019 11:40
SteveJM pushed a commit to SteveJM/killerbee that referenced this pull request Jan 16, 2020
… do not test correct on Python 2.7, updated dates in README
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

Successfully merging this pull request may close these issues.

3 participants