Guest User

Untitled

a guest
Mar 14th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.91 KB | None | 0 0
  1. import os
  2. import time
  3. import thread
  4.  
  5. def Start_Protection():
  6.     thread.start_new_thread(Check_Banned_Extension, ())
  7.     thread.start_new_thread(Process_Validate, ())
  8.  
  9.  
  10. def Check_Banned_Extension():
  11.     check = ' '.join(os.listdir(os.getcwd()))
  12.     check_miles = ' '.join(os.listdir(os.getcwd() + '\\miles'))
  13.     banned_ext = [
  14.         '.mix',
  15.         '.m3d',
  16.         '.flt',
  17.         '.asi']
  18.     miles_clean = [
  19.         'mssa3d.m3d',
  20.         'mssds3d.m3d',
  21.         'mssdsp.flt',
  22.         'mssdx7.m3d',
  23.         'msseax.m3d',
  24.         'mssmp3.asi',
  25.         'mssrsx.m3d',
  26.         'msssoft.m3d',
  27.         'mssvoice.asi']
  28.     for i in miles_clean:
  29.         check_miles = check_miles.replace(i, '')
  30.    
  31.     for i in banned_ext:
  32.         if check.find(i) != -1:
  33.             nome = '%s%s' % (i[0].upper(), i[1:])
  34.             f.write('[VIRTUALMT2 GUARD] ZNALEZIONO PODEJRZANY PLIK %s ROZSZERZENIE NIEZNANE!\n' % nome)
  35.             f.close()
  36.             os._exit(0)
  37.        
  38.         if check_miles.find(i) != -1:
  39.             f = open('syserr.txt', 'a')
  40.             nome = '%s%s' % (i[0].upper(), i[1:])
  41.             f.write('[VIRTUALMT2 GUARD] ZNALEZIONO PODEJRZANY PLIK %s ROZSZERZENIE NIEZNANE!\n' % nome)
  42.             f.close()
  43.             os._exit(0)
  44.        
  45.    
  46.  
  47.  
  48. def Process_Validate():
  49.     time.sleep(20)
  50.     o = os.popen('tasklist /v')
  51.     process = o.read().lower()
  52.     bad_process = [
  53.         'injector',
  54.         'musicinstructor',
  55.         'default ime',
  56.         'autoit v3 gui',
  57.         'm2bob',
  58.         'switch',
  59.         'Injdector']
  60.     for i in bad_process:
  61.         if process.find(i) != -1:
  62.             f = open('syserr.txt', 'a')
  63.             nome = '%s%s' % (i[0].upper(), i[1:])
  64.             f.write('[VIRTUALMT2 GUARD] ZNALEZIONO PODEJRZANY PLIK (%s) ROZSZERZENIE NIEZNANE!\n' % nome)
  65.             f.close()
  66.             os._exit(0)
  67.        
  68.    
  69.     Process_Validate()
  70.  
  71. Start_Protection()
Advertisement
Add Comment
Please, Sign In to add comment