diff --git a/CHANGELOG b/CHANGELOG index 50e0822..40c2ab2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,9 @@ +v0.12.1 +* Add more information to the hhstrip command + +v0.12 +* Add a hhstrip. Similar like a `hstrip` it loads hexdump from the clipboard and prepare link to the PacketHelper.com + v0.11.1 * Fix test to run correctly w/GitHub Actions diff --git a/scapy_helper/utils/hhstrip.py b/scapy_helper/utils/hhstrip.py new file mode 100644 index 0000000..833e4b5 --- /dev/null +++ b/scapy_helper/utils/hhstrip.py @@ -0,0 +1,18 @@ +from scapy_helper.utils.hstrip import hstrip + + +def hhstrip(*args, **kwargs): + try: + one_line_hex = hstrip(raw=False) + if one_line_hex: + print(one_line_hex) + print("More information about packet @ PacketHelper.com\nhttps://www.packethelper.com/hex/{}".format( + one_line_hex.replace(" ", "") + )) + except Exception as e: + print(e) + print("Copy correctly hexdump and try again or go to https://www.packethelper.com") + + +if __name__ == "__main__": + hhstrip() diff --git a/setup.py b/setup.py index 574982c..b56a98a 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ long_description_content_type="text/markdown", author="Nex Sabre", author_email="nexsabre@protonmail.com", - version="0.11.1", + version="0.12.1", url="https://github.com/NexSabre/scapy_helper", packages=find_packages(), classifiers=[ @@ -38,6 +38,7 @@ entry_points={ 'console_scripts': [ 'hstrip = scapy_helper.utils.hstrip:hstrip', + 'hhstrip = scapy_helper.utils.hhstrip:hhstrip' ], }, )