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

ja3.py: map does not remove items #22

Open
DidierStevens opened this Issue Aug 17, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@DidierStevens

DidierStevens commented Aug 17, 2018

In ja3.py, line 256:

map(remove_items,output)

It does not actually remove items, because map returns an iterator that is not consumed.
Possible solution:
list(map(remove_items,output))

@sysopfb

This comment has been minimized.

Show comment
Hide comment
@sysopfb

sysopfb Sep 22, 2018

Contributor

Yup for python3, also need to account for the bytes type in python3. I originally wrote the code purely for python2 but fixed it shouldn't be a big deal.

        list(map(remove_items,output))

and
"client_hello_pkt": binascii.hexlify(tcp.data).decode('utf-8')}

Seems to work for both python 2.7 and python 3

Contributor

sysopfb commented Sep 22, 2018

Yup for python3, also need to account for the bytes type in python3. I originally wrote the code purely for python2 but fixed it shouldn't be a big deal.

        list(map(remove_items,output))

and
"client_hello_pkt": binascii.hexlify(tcp.data).decode('utf-8')}

Seems to work for both python 2.7 and python 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment