Skip to content

Instantly share code, notes, and snippets.

@0xbadjuju
Last active January 27, 2020 20:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0xbadjuju/411b7f54885bb70401a3ebc3e105b16d to your computer and use it in GitHub Desktop.
Save 0xbadjuju/411b7f54885bb70401a3ebc3e105b16d to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use strict;
use warnings;
my $reasm = join("", reverse($ARGV[0] =~ m/../g));
print "Searching for: " . $reasm . "\n";
my $i = 0;
my $dec_start = 286331153;
my $dec_end = 4294967295;
my $count = $dec_start + 5000/8;
my $string = "";
for ($i = $dec_start; $i <= $count; $i++)
{
$string = $string . sprintf("%x",$i);
}
print "Offset at: " . index($string, $reasm) . "\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment