Skip to content

Instantly share code, notes, and snippets.

@zeroSteiner
Created August 12, 2020 18:13
Show Gist options
  • Save zeroSteiner/2e2669c80e25af225765f88dc3f27b62 to your computer and use it in GitHub Desktop.
Save zeroSteiner/2e2669c80e25af225765f88dc3f27b62 to your computer and use it in GitHub Desktop.
Example of a proxy shim for external Metasploit modules
if __name__ == "__main__":
env = dict(os.environ)
if 'LD_PRELOAD' in env:
module.run(metadata, run)
else:
env['LD_PRELOAD'] = 'libproxychains4.so'
os.execve(os.path.realpath(__file__), sys.argv, env)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment