Guest User

Untitled

a guest
Jun 16th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. print "Configuration file does not exist."
  2. print "Let's create it now."
  3. host = raw_input("SSH Server -> ")
  4. port = raw_input("Tunnel Port -> ")
  5. user = raw_input("SSH User -> ")
  6. password = getpass.getpass("SSH Password If it is not going to be used, write none -> ")
  7. conf.add_section("serverinfo")
  8. conf.set("serverinfo", "host", host)
  9. conf.set("serverinfo", "port", port)
  10. conf.set("serverinfo", "user", user)
  11. conf.set("serverinfo", "pass", password)
  12. # Write to config file
  13. open('g_variables.config_path', 'wb')
  14. conf.write(g_variables.config_path)
  15. exit()
Add Comment
Please, Sign In to add comment