Code Monkey home page Code Monkey logo

xcoder's Introduction

xcoder

A tool for encoding and decoding data in various formats

Synopsis:

Xcoder is a simple script that will take various forms of in put, either statically defined, or from STDIN, and translate it into and from various formats, with pattern encoding / multiple iteration capabilities built in.

Usage:

Refer to the command-line help if you get stuck. Otherwise, the following capabilities are provided with this tool.

Usage: xcoder.py [options]

Options:<br>
  -h, --help            show this help message and exit
  -d, --decode          Decode instead of encode
  -e ENCODING, --encoding=ENCODING
                        Type of encoding [b64|hex|bin]
  -q, --quiet           Only print results of command
  -t TEXT, --text=TEXT  Text to encode/decode -- Only works if [-s/--stdin] is not used
  -s, --stdin           Read data from STDIN
  -p PATTERN, --pattern=PATTERN
                        Pattern to encode/decode with  -- Only works if
                        [-e/--encoding] and [-i/--iterations] is not used --
                        example: -p "b64,hex,bin,bin,hex" will encode/decode
                        consecutively with each item in the pattern
  -i ITERATIONS, --iterations=ITERATIONS
                        Iterations of encoding -- only use when [-p/--pattern] is not used

The first thing to take into account is if you're reading data statically or from STDIN.

STDIN:

et0x@mnstr:~$ echo -n "AAAA" | ./xcoder.py -e hex -q --stdin
41414141

STATIC:

et0x@mnstr:~$ ./xcoder.py -t "AAAA" -e b64 -q
QUFBQQ==

You can also do multiple iterations of encoding/decoding as well as pattern-based encoding/decoding:

et0x@mnstr:~/Desktop/xcoder$ ./xcoder.py -t "AAAA" -i 10 -e b64 -q
Vm0wd2QyVkZOVWRpUm1ScFVtMVNXVll3Wkc5V1ZsbDNXa2M1VjFKdGVEQlpNM0JIVmpGS2RHVkliRmRpVkZaeVZtMHhTMUl5VGtsaVJtUlhUVEZLVFZac1ZtRldNVnBXVFZWV2FHVnFRVGs9


et0x@mnstr:~/Desktop/xcoder$ ./xcoder.py -t     "Vm0wd2QyVkZOVWRpUm1ScFVtMVNXVll3Wkc5V1ZsbDNXa2M1VjFKdGVEQlpNM0JIVmpGS2RHVkliRmRpVkZaeVZtMHhTMUl5VGtsaVJtUlhUVEZLVFZac1ZtRldNVnBXVFZWV2FHVnFRVGs9" -i 10 -e b64 -q -d
AAAA

et0x@mnstr:~$ ./xcoder.py -t "AAAA" -p "hex,hex,b64,bin" -q    
010011010111101001010001011110100100110101010100010011010011000001001101011110100100010101111010010011100100010001001101011110000100110101111010010100010111101001001101010100010011110100111101

et0x@mnstr:~$ echo -n "010011010111101001010001011110100100110101010100010011010011000001001101011110100100010101111010010011100100010001001101011110000100110101111010010100010111101001001101010100010011110100111101" | ./xcoder.py -s -p "bin,b64,hex,hex" -q -d
AAAA

Motivation:

I was working on a boot2root machine a while back that required you to deobfuscate something that was encoded in a iterative/pattern-based fashion 17 times in a row which was a pain to decode, so I figured I'd make something like this. I'm sure there are some other applications as well :)

For those interested, the boot2root machine was called Flick (created by Leonjza) and is located at http://www.vulnhub.com

xcoder's People

Contributors

et0x avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.