Monday, March 4, 2013

Decode ASCII CharCode to ASCII

Needed to create an ASCII decoder thought I would set it aside for later use:

#!/bin/bash

cat $1 | sed 's/48,/0/g' | sed 's/49,/1/g' | sed 's/50,/2/g' | sed 's/51,/3/g' | sed 's/52,/4/g' | sed 's/53,/5/g' | \
         sed 's/54,/6/g' | sed 's/55,/7/g' | sed 's/56,/8/g' | sed 's/57,/9/g' | sed 's/65,/A/g' | sed 's/66,/B/g' | \
         sed 's/67,/C/g' | sed 's/68,/D/g' | sed 's/69,/E/g' | sed 's/70,/F/g' | sed 's/71,/G/g' | sed 's/72,/H/g' | \
         sed 's/73,/I/g' | sed 's/74,/J/g' | sed 's/75,/K/g' | sed 's/76,/L/g' | sed 's/77,/M/g' | sed 's/78,/N/g' | \
         sed 's/79,/O/g' | sed 's/80,/P/g' | sed 's/81,/Q/g' | sed 's/82,/R/g' | sed 's/83,/S/g' | sed 's/84,/T/g' | \
         sed 's/85,/U/g' | sed 's/86,/V/g' | sed 's/87,/W/g' | sed 's/88,/X/g' | sed 's/89,/Y/g' | sed 's/90,/Z/g' | \
         sed 's/97,/a/g' | sed 's/98,/b/g' | sed 's/99,/c/g' | sed 's/100,/d/g' | sed 's/101,/e/g' | sed 's/102,/f/g' | \
         sed 's/103,/g/g' | sed 's/104,/h/g' | sed 's/105,/i/g' | sed 's/106,/j/g' | sed 's/107,/k/g' | sed 's/108,/l/g' | \
         sed 's/109,/m/g' | sed 's/110,/n/g' | sed 's/111,/o/g' | sed 's/112,/p/g' | sed 's/113,/q/g' | sed 's/114,/r/g' | \
         sed 's/115,/s/g' | sed 's/116,/t/g' | sed 's/117,/u/g' | sed 's/118,/v/g' | sed 's/119,/w/g' | sed 's/120,/x/g' | \
         sed 's/121,/y/g' | sed 's/122,/z/g' | sed 's/32,/ /g'  | sed 's/40,/(/g'  | sed 's/41,/)/g'  | sed 's/123,/{/g' | \
         sed 's/125,/}/g' | sed 's/13,10,/\n/g'                 | sed 's/61,/=/g'  | sed 's/46,/./g'  | sed 's/44,/,/g'  | \
         sed 's/34,/"/g'  | sed 's/59,/;/g'  | sed 's/33,/!/g'  | sed 's/45,/-/g'  | sed 's/63,/?/g'  | sed 's/38,/\&/g'  | \
         sed 's/58,/:/g'  | sed 's/43,/+/g'  | sed 's/124,/|/g' | sed 's/47,/\//g' | sed 's/36,/$/g'  | sed 's/95,/_/g'

No comments:

Post a Comment

Powershell - Gather Mapped Drives from a List of Computer Names

I created the following Powershell script to gather remotely the mapped drives that users had in their profiles.  I had to create the script...