Skip to content

Commit

Permalink
Add hhstrip (#26)
Browse files Browse the repository at this point in the history
* Update CHANGELOG with hhstrip
  • Loading branch information
NexSabre committed May 20, 2021
1 parent 32ee11d commit e2bfd99
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -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

Expand Down
18 changes: 18 additions & 0 deletions scapy_helper/utils/hhstrip.py
Original file line number Diff line number Diff line change
@@ -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()
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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=[
Expand Down Expand Up @@ -38,6 +38,7 @@
entry_points={
'console_scripts': [
'hstrip = scapy_helper.utils.hstrip:hstrip',
'hhstrip = scapy_helper.utils.hhstrip:hhstrip'
],
},
)

0 comments on commit e2bfd99

Please sign in to comment.