Last active
March 9, 2023 17:30
-
-
Save Lobbyra/6e3d24f165594717b5c8742d1ca72311 to your computer and use it in GitHub Desktop.
42_to_\x4\x2.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# DONE BY gemaroul & jecaudal | |
import sys | |
sys.stderr.write("becarefull to enter an odd hex\n") | |
arr = [] | |
for i, v in enumerate(sys.argv[1]): | |
if i % 2: | |
arr.append(sys.argv[1][i - 1] + sys.argv[1][i]) | |
arr.reverse() | |
res = '\\x'.join(arr) | |
res = '\\x' + res | |
print(res) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment