hubertf

Writeup - letters2num

Feb 28th, 2025
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. Writeup for letters2num:
  2. [email protected], 2025-02-28
  3.  
  4. #!perl
  5. while(<>) {
  6. chomp();
  7. $n=$_;
  8. $lo = $n & 0xff;
  9. $hi = $n >> 8;
  10. $clo = chr($lo);
  11. $chi = chr($hi);
  12. printf "0x%04x / 0x%02x | 0x%02x / %s%s / %d\n",
  13. $n, $lo, $hi, $chi, $clo, $n;
  14. $flag .= $chi . $clo;
  15. }
  16. print "Flag: $flag\n";
  17.  
  18. Usage:
  19. % perl lnd.pl encflag.txt
Advertisement
Add Comment
Please, Sign In to add comment