Skip to content

Latest commit

 

History

History
99 lines (70 loc) · 2.31 KB

README.md

File metadata and controls

99 lines (70 loc) · 2.31 KB

GitHub Issues GitHub tag Go Version License Go Report Card

Golang port for Metasploit's pattern_create and pattern_offset.
Based on haxpattern

Usage

$ gottern help 
Pattern Offset Seeker and Pattern Creator

Usage:
  Gottern [command]

Available Commands:
  create      Create the pattern
  help        Help about any command
  offset      Search for an offset
  version     Prints current Gottern version

Flags:
  -h, --help   help for Gottern

Use "Gottern [command] --help" for more information about a command.

Create a pattern

Create a pattern using the create flag with the size (-l) of the pattern to be created.

$ gottern create -h
Create the pattern

Usage:
 Gottern create [flags]

Flags:
 -h, --help         help for create
 -l, --length int   Lenght of the string to be created

$ gottern create -l 200
Aa0Aa1Aa2Aa3Aa4A[...]g1Ag2Ag3Ag4Ag5Ag

Look for an offset

Search an offset using the offset flag with the query to perform (-q) of the pattern to be created. Use -b for big endian search.

$ gottern offset -h
Search for an offset

Usage:
  Gottern offset [flags]

Flags:
  -b, --bigendian      Search for Big Endian Offset
  -h, --help           help for offset
  -q, --query string   Query the following pattern. Minimum 4 bytes.

Examples:

# ASCII 
$ gottern offset -q 6Aj7
[*] 290
# Plain HEX
$ gottern offset -q 0x36416a37
[*] 290
# Little Endian HEX
$ gottern offset -q 376a4136
[*] 290
# Big Endian HEX
$ gottern offset -q 36416a37 -b
[*] 290

Benchmarks

Some benchmarks using hyperfine.

Create a Pattern

Find an offset