Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- echo Select an option:
- echo 1. Text to Hex
- echo 2. Hex to Text
- set /p choice=Enter your choice:
- if "%choice%"=="1" (
- set /p text=Enter the text:
- node -e "const text = process.argv[1]; const hexString = Buffer.from(text, 'utf8').toString('hex'); console.log(hexString);" "%text%"
- ) else if "%choice%"=="2" (
- set /p hexString=Enter the hex string:
- node -e "const hexString = process.argv[1]; const text = Buffer.from(hexString, 'hex').toString('utf8'); console.log(text);" "%hexString%"
- ) else (
- echo Invalid choice.
- )
Advertisement
Add Comment
Please, Sign In to add comment