Hacker Simulator

Hacker Simulator

Not enough ratings
Credit goes to Corporal Punishment for this. Python Code for decrypting non hex
By Andurr Kahn
This is the code that can help you solve non-hex to hex. I wanted to comment on the code to Corporal Punishments original post but it had to many characters.
   
Award
Favorite
Favorited
Unfavorite
The Python Code
All you have to do is just Copy and Paste the code into Visual Studio Code. It works well and has a loop feature so you don't have to keep rerunning the code manually.


import re
import pyperclip

while True:
# Description
print("\nThis is a tool to 'decrypt' a non-hex string into a hex string for HS\n")

# Input the NON-hex string at the prompt. Length is not important. Example strings:
# ZZ:73:E7:6Y
# ZZ:73:E7:6Y:CB:X4:X4
# ZZ:73:E7:6Y:CB:X4:E7:6Y:CB:X4:E7:6Y:CB:X4
string = input("Enter the NON-hex string: ")

# Split the string into a list of objects:
arr = string.split(':')

# Initialize output
output = ''

# Loop through the objects in arr, add matching objects to output and add a ':'
for arr_obj in arr:
if re.match('[A-F0-9][A-F0-9]', arr_obj):
output = output + arr_obj + ':'

# If output string is not empty, remove the ':' at the end of the output string, copy it to the clipboard and show message.
# If output string is empty, only display custom message.
if output:
output = output[:-1]
pyperclip.copy(output)
print(f'\n{output} copied to the clipboard!\n')
else:
print("\nNOTHING copied to the clipboard! None of the objects match hex strings.\n")

# Ask the user if they want to run the tool again
run_again = input("Do you want to run the tool again? (yes/no): ")

# If the user enters anything other than "yes", exit the loop
if run_again.lower() != 'yes':
break
2 Comments
Andurr Kahn  [author] 19 Nov, 2023 @ 11:30pm 
Here is a link [github.com] m to my github if you want this in application form.
Andurr Kahn  [author] 19 Nov, 2023 @ 10:53pm 
Edit: Install pyperclip to make this work.

In the terminal, you can input pip install pyperclip. :j7: