Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print "Configuration file does not exist."
- print "Let's create it now."
- host = raw_input("SSH Server -> ")
- port = raw_input("Tunnel Port -> ")
- user = raw_input("SSH User -> ")
- password = getpass.getpass("SSH Password If it is not going to be used, write none -> ")
- conf.add_section("serverinfo")
- conf.set("serverinfo", "host", host)
- conf.set("serverinfo", "port", port)
- conf.set("serverinfo", "user", user)
- conf.set("serverinfo", "pass", password)
- # Write to config file
- open('g_variables.config_path', 'wb')
- conf.write(g_variables.config_path)
- exit()
Add Comment
Please, Sign In to add comment