Created
December 20, 2014 18:54
-
-
Save jstnkndy/d98015dc5b6f79395df4 to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/python | |
import sys, requests | |
def usage(): | |
print 'Usage: python %s ' % sys.argv[0] | |
def main(): | |
if len(sys.argv) != 5: | |
usage() | |
sys.exit(1) | |
host, username, password, email = sys.argv[1:] | |
session = requests.Session() | |
paramsPost = { | |
"InstallerConfigForm[adminLoginName]": username, | |
"InstallerConfigForm[adminLoginPwd]": password, | |
"InstallerConfigForm[confirmPwd]": password, | |
"InstallerConfigForm[adminName]":"Administrator", | |
"InstallerConfigForm[adminEmail]": email, | |
"InstallerConfigForm[siteName]":"LimeSurvey", | |
"InstallerConfigForm[surveylang]":"en", | |
"yt0":"Next"} | |
response = session.post(host+"/index.php/installer/optional", data=paramsPost) | |
if "Integrity" in response.text: | |
print "Success" | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment