Advertisement
FlyFar

version.py

Mar 29th, 2023
671
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.36 KB | Cybersecurity | 0 0
  1. R = '\033[31m'
  2. G = '\033[32m'
  3. C = '\033[36m'
  4. W = '\033[0m'
  5.  
  6. import time
  7. import os
  8.  
  9. import random
  10. import sys
  11. import json
  12. import argparse
  13. import requests
  14. import subprocess as subp
  15.  
  16. import time
  17. import os
  18.  
  19. row = []
  20. info = ''
  21. result = ''
  22. systemR = '1.6.7'
  23.  
  24. def sys_check():
  25.     print(G + '[>]' + C + ' Checking for system configurations....', end='')
  26.     sys_url = 'https://raw.githubusercontent.com/mishakorzik/Email-Spammer/main/src/.version'
  27.     try:
  28.         sys_rqst = requests.get(sys_url)
  29.         sys_sc = sys_rqst.status_code
  30.         if sys_sc == 200:
  31.             github_sys = sys_rqst.text
  32.             github_sys = github_sys.strip()
  33.  
  34.             if systemR == github_sys:
  35.                 print(C + '[' + G + ' Up-To-Date ' + C +']')
  36.                 print(G + '[+] ' + C + 'Successfully checked, no updates!')
  37.             else:
  38.                 print(C + '[' + R + ' Available : {} '.format(github_sys) + C + ']')
  39.                 print(R + '[-] ' + C + 'Please update the system! reinstall repository...')
  40.                 print(R + '[-] ' + C + 'Command to update:  python src/update.py')
  41.                 time.sleep(3)
  42.         else:
  43.             print(C + '[' + R + ' Status : {} '.format(sys_sc) + C + ']' + '\n')
  44.             print(R + '[-] ' + C + 'The system failed to start!')
  45.             print(R + '[-] ' + C + 'Error code: 401 the server cannot boot')
  46.     except Exception as e:
  47.         print('\n' + R + '[-]' + C + ' Critical Error code: 105 Maybe you dont have internet - Exception : ' + W + str(e))
  48.  
  49. sys_check()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement