Пример #1
0
 elif cmd[0].lower() == "download":
     if len(cmd) == 2:
         download_from_pastebot(cmd[1])
     else:
         print("The download command requires a filename afterwards")
 # Upload the valuables/secrets the bot has discovered to pastebot.net
 elif cmd[0].lower() == "upload":
     if len(cmd) == 2:
         upload_valuables_to_pastebot(cmd[1])
     else:
         print("The upload command requires a filename afterwards")
 # Mine for Bitcoins
 # This is far more intensive in the real world, but we'll just pretend ;)
 elif cmd[0].lower() == "mine":
     print("Mining for Bitcoins...")
     bit_addr = bitcoin_mine()
     save_valuable("Bitcoin: %s" % bit_addr)
     print("Mined and found Bitcoin address: %s" % bit_addr)
 # Harvest a user's username and password (userpass)
 elif cmd[0].lower() == "harvest":
     userpass = harvest_user_pass()
     save_valuable("Username/Password: %s %s" % userpass)
     print("Found user pass: %s" % (userpass, ))
 # List files and valuables (secrets such as userpass & bitcoins) the bot has
 elif cmd[0].lower() == "list":
     print("Files stored by this bot: %s" % ", ".join(filestore.keys()))
     print("Valuables stored by this bot: %s" % valuables)
 # Exit command
 elif cmd[0].lower() == "quit" or cmd[0].lower() == "exit":
     break
 else:
Пример #2
0
 elif cmd[0].lower() == "download":
     if len(cmd) == 2:
         download_from_pastebot(cmd[1])
     else:
         print("The download command requires a filename afterwards")
 # Upload the valuables/secrets the bot has discovered to pastebot.net
 elif cmd[0].lower() == "upload":
     if len(cmd) == 2:
         upload_valuables_to_pastebot(cmd[1])
     else:
         print("The upload command requires a filename afterwards")
 # Mine for Bitcoins
 # This is far more intensive in the real world, but we'll just pretend ;)
 elif cmd[0].lower() == "mine":
     print("Mining for Bitcoins...")
     bit_addr = bitcoin_mine()
     save_valuable("Bitcoin: %s" % bit_addr)
     print("Mined and found Bitcoin address: %s" % bit_addr)
 # Harvest a user's username and password (userpass)
 elif cmd[0].lower() == "harvest":
     userpass = harvest_user_pass()
     save_valuable("Username/Password: %s %s" % userpass)
     print("Found user pass: %s" % (userpass,))
 # List files and valuables (secrets such as userpass & bitcoins) the bot has
 elif cmd[0].lower() == "list":
     print("Files stored by this bot: %s" % ", ".join(filestore.keys()))
     print("Valuables stored by this bot: %s" % valuables)
 # Exit command
 elif cmd[0].lower() == "quit" or cmd[0].lower() == "exit":
     break
 else: