Git Product home page Git Product logo

pat's Introduction

Customizable Exploit Pattern Utility

Old C Version. (It uses a different locating method.)

Installation

pip install pat works, elevate privilege if necessary.

Usage

./pat.py --help
Usage: pat.py [OPTIONS] ARGUMENT [SETS]...

  Customizable Exploit Pattern Utility.

Options:
  -V, --version          Show the version and exit.
  -O, --optimal INTEGER  Use the optimal profile in this position.
  -o, --output FILENAME  Write to this file.
  -c, --clipboard        Output to the clipboard.
  -h, --help             Show this message and exit.

Examples

  • Create a pattern of length 100 using the default profile.

    ./pat.py 100
    Aa0Aa1Aa2Aa3Aa4Aa5Aa6Aa7Aa8Aa9Ab0Ab1Ab2Ab3Ab4Ab5Ab6Ab7Ab8Ab9Ac0Ac1Ac2Ac3Ac4Ac5Ac6Ac7Ac8Ac9Ad0Ad1Ad2A
  • Locate the pattern Cz9 in the default profile.

    ./pat.py Cz9
    2337
  • Locate the pattern in hex, 0x5a6232, using the default profile.

    ./pat.py 0x5a6232
    19536
  • Create a pattern of length 200 in optimal 3-position profile.

    ./pat.py 200 ABCDEFGHIJKLMNOPQRSTU VWXYZabcdefghijklmnop qrstuvwxyz0123456789
    AVqAVrAVsAVtAVuAVvAVwAVxAVyAVzAV0AV1AV2AV3AV4AV5AV6AV7AV8AV9AWqAWrAWsAWtAWuAWvAWwAWxAWyAWzAW0AW1AW2AW3AW4AW5AW6AW7AW8AW9AXqAXrAXsAXtAXuAXvAXwAXxAXyAXzAX0AX1AX2AX3AX4AX5AX6AX7AX8AX9AYqAYrAYsAYtAYuAYvAY
  • Search for pattern vAY in optimal 3-position profile.

    ./pat.py vAY ABCDEFGHIJKLMNOPQRSTU VWXYZabcdefghijklmnop qrstuvwxyz0123456789
    197

Mathematical Background

Simply speaking, it is a string of continuous numbers in some special positional numeral systems, where symbols in each position are mutually unique, often with a big radix.

It can be created by taking the needed count of characters from the Cartesian product of chosen character sets.

Profiles

Default Profile

  • Three-position: The most popular choice

    • Maximum Length: 20280 B = 19 KiB.
    ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789

Optimal Profiles

Suppose that we have a limited set of characters, e.g. alphanumeric ones, in which there are 62 characters available.

According to the inequality of arithmetic and geometric means, fixed radix systems will achieve the best length.

Three-position

  • Maximum Length: 26460 B = 25 KiB
ABCDEFGHIJKLMNOPQRSTU VWXYZabcdefghijklmnop qrstuvwxyz0123456789

Four-position

  • Maximum Length: 230400 B = 225 KiB
ABCDEFGHIJKLMNOP QRSTUVWXYZabcdef ghijklmnopqrstu vwxyz0123456789

Eight-position

  • Maximum Length: 102760448 B = 98 MiB
ABCDEFGH IJKLMNOP QRSTUVWX YZabcdef ghijklmn opqrstuv wxyz012 3456789

pat's People

Contributors

novicelive 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.