Results 1 to 7 of 7

Thread: hURL - hexadecimal & URL encoder + decoder

Threaded View

  1. #1
    Senior Member fnord0's Avatar
    Join Date
    Jul 2008
    Posts
    144

    Post hURL - hexadecimal & URL encoder + decoder

    while working on the PWB online course, I kept running into the need to do HEX and URL encoding/decoding. I asked on the #offsec iRC channel for a tool in BackTrack to do this, and it was suggested to make use of perl. after a while it became a little cumbersome to use perl one-liners, so I created this perl script to help out. figured I'd share it with others it takes input from the command-line, or from a file. anytime something is ENcoded, the output is placed all on a single line (think file uploads via SQL injection, etc). feel free to leave comments or suggestions

    it can be grabbed from here => github
    git clone git://github.com/fnord0/hURL.git
    code is too long now to paste here =(

    Code:
    .::[ hURL - hexadecimal & URL (en/de)coder v2.1 ]::.
      USAGE: ./hURL [ -flag|--flag ] [ -f <file1>,<file2> ] [ string ]
    
      COMMAND LINE ARGUMENTS
       -M|--menu   => Menu-driven GUI        ;  ./hURL -M
       -U|--URL    => URL encode             ;  ./hURL -U "hello world"
       -u|--url    => uRL decode             ;  ./hURL -u "hello%20world"
       -D|--DURL   => Double URL encode      ;  ./hURL -D "hello world"
       -d|--durl   => double URL decode      ;  ./hURL -d "hello%2520world"
       -B|--BASE64 => Base64 encode          ;  ./hURL -B "hello world"
       -b|--base64 => base64 decode          ;  ./hURL -b "aGVsbG8gd29ybGQ="
       -H|--HTML   => HTML encode            ;  ./hURL -H "<hello world>"
       -h|--html   => hTML decode            ;  ./hURL -h "&lt;hello world&gt;"
       -X|--HEX    => ascii ->  heX          ;  ./hURL -X "hello world"
       -x|--hex    => hex   ->  ascii        ;  ./hURL -x "68656c6c6f20776f726c64"
        --esc   :: output in escaped string        ; "\x00\x01\x02\x03 ..."
        --pair  :: output in hexpair format        ; 00010203 ...
       -I|--INT    => Int   ->  hex          ;  ./hURL -I "10"
       -i|--int    => hex   ->  int          ;  ./hURL -i "0xa"
       -n|--nint   => -int  ->  hex          ;  ./hURL -n -- -77
       -N|--NHEX   => -hex  ->  iNt          ;  ./hURL -N 0xffffffb3
       -T|--INTB   => inT   ->  bin          ;  ./hURL -T 30
       -t|--bint   => bin   ->  int          ;  ./hURL -t 1010
       -F|--FLOATH => Float ->  hex          ;  ./hURL -F 3.33
       -l|--hfloat => hex   ->  float        ;  ./hURL -l 0x40551ed8
       -o|--octh   => octal ->  hex          ;  ./hURL -o 35
       -O|--HOCT   => hex   ->  Octal        ;  ./hURL -O 0x12
       -0|--binh   => bin   ->  hex          ;  ./hURL -0 1100011
       -1|--hexb   => hex   ->  bin          ;  ./hURL -1 0x63
       -2|--SHA1   => SHA1 checksum          ;  ./hURL -2 "hello world"
       -3|--SHA224 => SHA224 checksum        ;  ./hURL -3 "hello world"
       -4|--SHA256 => SHA256 checksum        ;  ./hURL -4 "hello world"
       -5|--SHA384 => SHA384 checksum        ;  ./hURL -5 "hello world"
       -6|--SHA512 => SHA512 checksum        ;  ./hURL -6 "hello world"
       -7|--ROT13  => ROT13 encode           ;  ./hURL -7 "hello world"
       -8|--rot13  => ROT13 decode           ;  ./hURL -8 "uryyb jbeyq"
       -9|--stack  => push string 2 stack (corelan);  ./hURL -9 "hello world"
        --esc   :: output in escaped string        ; "\x00\x01\x02\x03 ..."
        --pair  :: output in hexpair format        ; 00010203 ...
        --ansiC :: output in C format              ; 0x00, 0x01, 0x02, 0x03 ...
       -m|--md5    => md5 digest             ;  ./hURL -m "hello world"
       -e|--net    => int -> hex (net-byte order)   ;  ./hURL -e 4444
       -E|--NET    => hex (nEt-byte order) ->  int  ;  ./hURL -E 5c11
       -w|--wbin   => hex [file] -> binary [file]   ;  ./hURL -w -f <INfile> <OUTfile>
       -r|--rbin   => binary [file] -> hex (corelan);  ./hURL -r -f /tmp/msgbox.bin
        --esc   :: output in escaped string        ; "\x00\x01\x02\x03 ..."
        --pair  :: output in hexpair format        ; 00010203 ...
        --ansiC :: output in C format              ; 0x00, 0x01, 0x02, 0x03 ...
    
       --color|--nocolor  => enable/disable colored output [default is ENABLED]
       --corelan          => display corelan reference
       --help             => displays help
       --man              => displays extended help with examples
       --version          => displays version information
    
       -s                           => suppress (display result only)
       -f|--file <file1>,<file2>    => use file(s) as input
       [string]                     => string as input
    Last edited by fnord0; 07-14-2012 at 11:13 PM. Reason: updated to v2.1
    'see the fnords!'

Similar Threads

  1. PWNtcha - captcha decoder
    By firebits in forum Tool Requests
    Replies: 0
    Last Post: 03-04-2011, 05:48 PM
  2. Shellcode doesnt do what its supposed to! (on any encoder)
    By b3r00tb4ck in forum OLD Pentesting
    Replies: 3
    Last Post: 09-22-2009, 10:20 AM
  3. lzma: Decoder error+wpa_psk-h1kari_renderman
    By Jano in forum OLD General IT Discussion
    Replies: 1
    Last Post: 02-22-2009, 09:06 PM
  4. did somebody test Xplico -Internet Traffic Decoder?
    By abyss in forum OLD General IT Discussion
    Replies: 1
    Last Post: 11-17-2008, 10:06 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •