GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Improvements + important fix · KeyAuth/KeyAuth-Python-Example@781297d

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • keyauth.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎keyauth.py‎

Copy file name to clipboardExpand all lines: keyauth.py
+11-8Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
1-
import win32security # get sid
1+
import os
22
import json as jsond # json
3-
43
import time # sleep before exit
5-
64
import binascii # hex encoding
7-
85
from uuid import uuid4 # gen random guid
96
import platform
10-
import os
11-
import requests # https requests
127

138
try:
9+
if os.name == 'nt':
10+
import win32security # get sid (WIN only)
11+
import requests # https requests
1412
from Crypto.Cipher import AES
1513
from Crypto.Hash import SHA256
1614
from Crypto.Util.Padding import pad, unpad
1715
except ModuleNotFoundError:
1816
print("Exception when importing modules")
19-
print("installing necessary modules....")
20-
os.system("pip install pycryptodome")
17+
print("Installing necessary modules....")
18+
if os.path.isfile("requirements.txt"):
19+
os.system("pip install -r requirements.txt")
20+
else:
21+
os.system("pip install pywin32")
22+
os.system("pip install pycryptodome")
23+
os.system("pip install requests")
2124
print("Modules installed!")
2225
time.sleep(1.5)
2326
os._exit(1)

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.