xerotic

Untitled

Mar 17th, 2020
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.21 KB | None | 0 0
  1. import os, bz2, string, shutil
  2.  
  3.  
  4. def Hide():
  5.     Already = raw_input('Use "E"xisting folder or "N"ew folder? (E/N):  ')
  6.     Already1 = string.upper(Already)
  7.     if Already1 == 'N':
  8.         FolderName = raw_input('What do you want your new folder name to be?  ')
  9.         os.makedirs(FolderName)
  10.         Password = raw_input('Choose password:  ')
  11.         try:
  12.             os.makedirs('xerotic1')
  13.             os.popen('attrib +H +S +R xerotic1')
  14.         except:
  15.             pass
  16.         try:
  17.             os.rename(FolderName, 'Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}')
  18.             os.popen('attrib +H +S "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"')
  19.             f=open("xerotic1/xerotic.log", "w")
  20.             f.write(bz2.compress(Password))
  21.             f.close()
  22.             Begin()
  23.         except:
  24.             print 'There is already a hidden folder in this directory or that folder name is in use.\n\n'
  25.             Begin()
  26.     elif Already1 == 'E':
  27.         FolderName = raw_input('Name of folder?  ')
  28.         Password = raw_input('Choose password:  ')
  29.         try:
  30.             os.makedirs('xerotic1')
  31.             os.popen('attrib +H +S +R xerotic1')
  32.         except:
  33.             pass
  34.         try:
  35.             os.rename(FolderName, 'Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}')
  36.             os.popen('attrib +H +S "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"')
  37.             f=open("xerotic1/xerotic.log", "w")
  38.             f.write(bz2.compress(Password))
  39.             f.close()
  40.             Begin()
  41.         except:
  42.             print 'There is already a hidden folder in this directory\n\n'
  43.             Begin()
  44.     else:
  45.         print 'Invalid Option....'
  46.         Hide()
  47.  
  48.  
  49. def Decrypt():
  50.     PasswordAsk = raw_input('What is the password:  ')
  51.     w = open("xerotic1/xerotic.log", "r")
  52.     StoredPass = bz2.decompress(w.read())
  53.     w.close()
  54.     if PasswordAsk == StoredPass:
  55.         FolderName1 = raw_input('What do you want to name the folder to:  ')
  56.         os.popen('attrib -H -S "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"')
  57.         os.rename('Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}', FolderName1)
  58.         Begin()
  59.     else:
  60.         print 'Incorrect Password'
  61.         Decrypt()
  62.  
  63.  
  64. def Begin():
  65.     Ask = raw_input('\nWould you like to encrypt and "H"ide a folder or "S"how a folder or\n"D"estroy all traces of this program? (H/S/D):  ')
  66.     Ask1 = string.upper(Ask)
  67.     if Ask1 == 'H':
  68.         Hide()
  69.     elif Ask1 == 'S':
  70.         Decrypt()
  71.     elif Ask1 == 'D':
  72.         Destroy()
  73.     else:
  74.         print 'Invalid Option\n'
  75.         Begin()
  76.  
  77.  
  78. def Destroy():
  79.     print 'Make sure all folders are unlocked first!!!'
  80.     Dest = raw_input('Would you like to remove all traces of this program? (Y/N):  ')
  81.     Dest1 = string.upper(Dest)
  82.     if Dest1 == 'Y':
  83.         try:
  84.             os.popen('attrib -H -S -R xerotic1')
  85.             shutil.rmtree('xerotic1')
  86.             print 'Now you just have to delete this file, and all will be gone.\n\n'
  87.         except:
  88.             print 'There are no traces except this file.'
  89.         Begin()
  90.     elif Dest1 == 'N':
  91.         Begin()
  92.     else:
  93.         print 'Invalid Option'
  94.         Destroy()
  95.  
  96. Begin()
Add Comment
Please, Sign In to add comment