Created
April 30, 2018 12:36
-
-
Save pajswigger/f0caac124a02d94aa1ebbc46921d84ea to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys, pexpect.popen_spawn, signal | |
if len(sys.argv) != 3: | |
print('Usage: license-burp [yes/no] [license-file]') | |
sys.exit(1) | |
if sys.argv[1] != 'yes': | |
print('You must accept the license to use Burp') | |
sys.exit(1) | |
license = open(sys.argv[2]).read() | |
base = "c:/Program Files/BurpSuitePro" | |
child = pexpect.popen_spawn.PopenSpawn('%s/jre/bin/java -Djava.awt.headless=true -jar "%s/burpsuite_pro.jar"' % (base, base), encoding='cp437') | |
#child.logfile = sys.stdout | |
child.expect('Do you accept the license agreement\\? \\(y/n\\)') | |
child.sendline('y') | |
child.expect('please paste your license key below.') | |
child.sendline(license) | |
child.expect('Enter preferred activation method') | |
child.sendline('o') | |
child.expect('Your license is successfully installed and activated.') | |
child.kill(signal.SIGTERM) | |
print('Your license is successfully installed and activated.') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment