Advertisement
xample

Random gui code python

Jun 24th, 2018
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.89 KB | None | 0 0
  1. ## Tkinter Project ##
  2.  
  3. ## Python 2.7.15 ##
  4.  
  5. ## Just a script for when im bored ##
  6.  
  7. # Needed mods if ur not turning this into exe is colorama tkinter and stuff like that im too lazy to list
  8.  
  9. from colorama import *
  10. init()
  11. whitelistPUBIP = 'WhiteListed PUB IP here'
  12. whitelistMAINIP = 'MAIN IP here'
  13. whitelistHOSTNAME = 'Host name of PC here'
  14. import os
  15. os.system ('title Error Console Output')
  16.  
  17. import tkMessageBox
  18. print (Fore.RED + "=============================== DO NOT CLOSE THIS CONSOLE ===============================")
  19. ShowMessage = tkMessageBox.showinfo('Welcome', "Press 'OK' to contiune")
  20. print (Fore.GREEN + "Showed welcome box, loading whitelist script...")
  21.  
  22. import tkSimpleDialog
  23.  
  24. EnterCode = tkSimpleDialog.askstring('Enter Key', 'Ket your whitelisted code below.')
  25.  
  26. if EnterCode == 'key': # If im bored again ill probably connect the key entering feature to a database so it's not only 1 key lol
  27. print (Fore.CYAN + "Checking key..." + Fore.GREEN + " OK!")
  28. print (Fore.WHITE + "The system now will be checking your vaildation.")
  29. else:
  30. print (Fore.CYAN + "Checking key..." + Fore.RED + " INVAILD!")
  31. print (Fore.WHITE + "Key is invaild, shutting program in 5 seconds, please try again later...")
  32. import time
  33. time.sleep(5)
  34. raise SystemExit('Invaild key')
  35.  
  36. print (Fore.WHITE + "Proccessing step 1...")
  37. from urllib2 import urlopen
  38. my_ip = urlopen('http://ip.42.pl/raw').read() #gets PUB IP from this website that has the raw feature
  39. if my_ip == whitelistPUBIP:
  40. print (Fore.CYAN + "[*] Checking the public IP Address (" + my_ip + ")" + "..." + Fore.GREEN + " WHITELISTED!")
  41. else:
  42. print (Fore.CYAN + "[*] Checking the public IP Address (" + my_ip + ")" + "..." + Fore.RED + " POSSIBLE EERORS : BLACKLISTED! / NOT REGISTERD")
  43. print (Fore.WHITE + "Your PUB IP seems to be Blacklisted. Shutting system in 5 seconds.")
  44. import time
  45. time.sleep(5)
  46. raise SystemExit('BLACKLISTED PUB IP')
  47.  
  48. print (Fore.WHITE + "Proccessing step 2...")
  49. import socket
  50. def getNetworkIp():
  51. s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
  52. s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
  53. s.connect(('<broadcast>', 0))
  54. return s.getsockname()[0] # Gets main IP
  55.  
  56.  
  57. if (getNetworkIp()) == whitelistMAINIP:
  58. print (Fore.CYAN + "[*] Checking the main IP Address (" + (getNetworkIp()) + ")" + Fore.GREEN + " WHITELISTED!")
  59. else:
  60. print (Fore.CYAN + "[*] Checking the main IP Address (" + (getNetworkIp()) + ")" + Fore.RED + " POSSIBLE ERRORS : BLACKLISTED! / NOT REGISTERD")
  61. import time
  62. print (Fore.WHITE + "Your main IP seems to be Blacklisted. Shutting system in 5 seconds.")
  63.  
  64. time.sleep(5)
  65. raise SystemExit('BLACKLISTED MAIN IP ADDRESS')
  66. print (Fore.WHITE + "Proccessing step 3 (FINAL)...")
  67.  
  68. import platform
  69.  
  70. h = platform.uname()[1] # Gets host name
  71.  
  72. if h == whitelistHOSTNAME:
  73. print (Fore.CYAN + "[*] Checking Host Name (" + h + ")" + Fore.GREEN + " WHITELISTED!")
  74. else:
  75. print (Fore.CYAN + "[*] Checking Host Name (" + h + ")" + Fore.RED + " POSSIBLE ERROS : BLACKLISTED! / CHANGED / REGISTERD")
  76. print (Fore.WHITE + "IMPORTANT MESSAGE : Seems like you made it through step 1 & 2.")
  77. print (Fore.WHITE + "You may changed your host name, if you did, contact the moderators your new host name.")
  78. print (Fore.RED + "[*] Exiting System in 8 seconds...")
  79. import time
  80. time.sleep(8)
  81. raise SystemExit('BLACKLISTED / INVAILD HOST NAME')
  82.  
  83. print (Fore.WHITE + "Finishing steps...")
  84.  
  85. print (Fore.WHITE + "Finished!")
  86.  
  87. ## Starting SnoopieV2 + Checkings with announcements. ##
  88.  
  89. print (Fore.CYAN + "~~ Launching SnoopieV2 ~~")
  90. from urllib2 import urlopen
  91. announce = urlopen('https://pastebin.com/raw/9qShvf7V').read() # Read this random announcement lol
  92. from Tkinter import *
  93. root = Tk()
  94.  
  95. root.title('!! ~~ Last Check \ Announcements ~~ !!')
  96. FirstText = Text(root, height= 20, width= 60)
  97. FirstText.pack()
  98. FirstText.insert(END, "Checking Step 1 ... OK!\nChecking Step 2 ... OK!\nChecking Step 3 ... OK!\nReady to use!\n___________________________________\nAnnouncements Printed Below : \n" + announce)
  99. print (Fore.BLUE + "Printed Announcements / CHECKINGS")
  100.  
  101. def ERROR():
  102. SecondText.insert(END, "ERROR!\n") # Functions aren't added yet like again lol this i made this bcuz im bored lolz
  103. # Need to add full lua DLL to inject into the game so it's useable
  104.  
  105. ## Master Tkinter GUI ##
  106. master = Tk()
  107. master.title ('SnoopieV2')
  108. SecondText = Text(master, height= 20, width= 60)
  109. SecondText.pack()
  110. L1 = Label(master, text = "Injected and ready to use!", anchor = 'nw', fg = 'green')
  111. L1.pack()
  112. B1 = Button(master, text = "EXECUTE SCRIPT", command = ERROR) # Adding Full Lua DLL Later
  113. B1.pack()
  114. print (Fore.GREEN + "All things are and now it's ready to use!")
  115. master.mainloop()
  116. root.mainloop()
  117.  
  118. ## User Support ##
  119.  
  120. # User support doesn't have the Email Feature yet bcuz now im lazy and bored
  121.  
  122. askuser = raw_input (Fore.CYAN + "Do you need support [Y/N] : ")
  123. if askuser == 'Y':
  124. print ("Script .getgo")
  125. print ("Loading help console.")
  126. else:
  127. loopiedope = True
  128. if loopiedope == True:
  129. raw_input("DONT CLOSE THIS CONSOLE YOU CHOOSE YOU DIDN'T NEED SUPPORT.")
  130. print (Fore.CYAN + "Everything seems to be ready, this console is now support console.")
  131.  
  132. os.system('title Support Console')
  133. print (Fore.RED + "This does not mean you can close this console, keep it open even if you're not using!")
  134. print (Fore.CYAN + """The following commands are supported at the momment :
  135. [1] EmailSupport
  136. [2] HelpWithErrors
  137. More coming soon.""")
  138.  
  139. SupportChoice = raw_input (Fore.WHITE + "If you need support please enter from the menu above : ")
  140. master2 = Tk()
  141. master2.title('Helping Screen')
  142. TextNumber = Text(master2, height= 20, width= 90)
  143. TextNumber.pack()
  144. TextNumber.insert(END, "Hello, welcome to the helping screen. \nPlease choose the problem that is shown in the console.")
  145.  
  146. if SupportChoice == 'HelpWithErrors':
  147. print (Fore.WHITE + "You choose %s, loading Helping script / screen"% (SupportChoice))
  148. print (Fore.CYAN + """Here are your options :
  149. [1] Is this full lua executor? You Type 'LuaInfo'
  150. [2] Can someone else use my key while I'm using it? You type 'KeyLogging'
  151. [3] What if my key gets leaked? You type 'LeakedKey'
  152. [4] What if I lost my key? You type 'LostKey'
  153. [5] If your question isn't listed contact us by typing 'SendSupportEmail'""")
  154. UserChoice111 = raw_input("Type the question here from the options above : " + Fore.WHITE)
  155. if UserChoice111 == 'LuaInfo':
  156. print (Fore.WHITE + "Printing the answer to the GUI...")
  157. TextNumber.insert(END, "\n Yes it's a full lua execution command.")
  158. master2.mainloop()
  159. print (Fore.WHITE + "Printed!")
  160. elif UserChoice111 == 'KeyLogging':
  161. print (Fore.CYAN + "Printing the answer to the GUI...")
  162. TextNumber.insert(END, "\n NO. Even if you're offline it will detect the IP doesn't belong to this PC. NEVER SHARE.")
  163. master2.mainloop()
  164. elif UserChoice111 == 'LeakedKey':
  165. print (Fore.RED + "Printing the answer to the GUI...")
  166. TextNumber.insert(END, "\nIf your key go leaked, that's your fault. TOS says no refunds. Also it said take care of your key and be careful with it.")
  167. master2.mainloop()
  168. elif UserChoice111 == 'LostKey':
  169. print (Fore.GREEN + "Printing the answer to the GUI")
  170. TextNumber.insert (END, "\nIf you got your key lost it's okay. if you enterd the correct Discord ID go to the #bot channel and type !getkey")
  171. master2.mainloop()
  172. elif UserChoice111 == 'SendSupportEmail':
  173. print (Fore.WHITE + "Loading support email script.")
  174. master2.mainloop()
  175. else:
  176. print (Fore.WHITE + "Oh uh! You enterd an invaild command please try again later.")
  177. raw_input ("User support ended.")
  178.  
  179.  
  180. x12 = raw_input("OK.")
  181.  
  182.  
  183. # Discord username : Sad Pepe#2993
  184. # Made by Sad Pepe on v3rmillion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement