Jump to content
Jako

[Python] Pony gate extractor

Recommended Posts

import argparse
import validators

def get_gate(f):
   gate = ''
   pe = f.read()
   print len(pe)
   if len(pe) >= 63000 and len(pe) <= 100000:
       i = pe.find('YUIPWDFILE0YUIPKDFILE0YUICRYPTED0YUI1.0') - 3

       if i > 0:
           while pe[i] != '\x00' and i >= 0:
               gate = pe[i] + gate
               i   -= 1

   return gate

parser = argparse.ArgumentParser(description='Extract Pony binary gate.')
parser.add_argument('FILE', type=argparse.FileType('rb'), help='Pony binary')
args = parser.parse_args()

gate = get_gate(args.FILE)

if validators.url(gate):
   print gate
else:
print 'Gate not found!'

VB6 version:

Please login or register to see this link.

 

demo:

Please login or register to see this link.

  • Upvote 2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×