Skip to content

Commit fe33e88

Browse files
Add files via upload
1 parent ae07cd1 commit fe33e88

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2153
-23
lines changed

CODE/APIGen.py

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
import os
2+
import tkinter as tk
3+
from tkinter import messagebox
4+
5+
# Initialize the main window
6+
root = tk.Tk()
7+
root.title("VPN API Key Request")
8+
9+
10+
# Instructions for obtaining the API key
11+
instructions = """
12+
Please visit https://vpnapi.io/dashboard to create an account and obtain your API key. Once you have your API key,
13+
please enter it below and click 'Submit'.
14+
15+
We do apologise but for IP analysis we had to use this method, we ensure you its safe, if you are still in doubt you may use this pre-generated API key {c6048787b83f44b18d4ce50e5c8869ed}
16+
17+
The KEY should not include the {} given, the key has a limit of 1000 requests a day, so its recommended to use your own API key, Thank you and we apologise for this inconvenience, to skip the API function type API-NO as your key.
18+
"""
19+
20+
# Label to display instructions
21+
instruction_label = tk.Label(root, text=instructions)
22+
instruction_label.pack(pady=20)
23+
24+
# Entry widgets for the user to input the API key
25+
api_key_entry = tk.Entry(root)
26+
api_key_entry.pack(pady=10)
27+
28+
# Entry widget for the user to re-enter the API key for double-entry validation
29+
api_key_entry_confirm = tk.Entry(root)
30+
api_key_entry_confirm.pack(pady=10)
31+
32+
33+
def submit_api_key():
34+
api_key = api_key_entry.get().strip()
35+
api_key_confirm = api_key_entry_confirm.get().strip()
36+
37+
# Enhanced error check for empty inputs
38+
if not api_key or not api_key_confirm:
39+
messagebox.showerror(title="Error", message="Both fields must be filled out.")
40+
return
41+
42+
# Validate the API key format (example: minimum length of 32 characters)
43+
if len(api_key) < 32:
44+
messagebox.showerror(title="Error", message="API key must be at least 32 characters long.")
45+
return
46+
47+
# Double-entry validation
48+
if api_key != api_key_confirm:
49+
messagebox.showwarning(title="Warning", message="The API keys do not match. Please try again.")
50+
return
51+
52+
# Check if the API.KEY file already exists and read its content
53+
if os.path.exists('SYSTEM/API.KEY'):
54+
try:
55+
with open('SYSTEM/API.KEY', 'r') as f:
56+
existing_key = f.read().strip()
57+
if existing_key == api_key:
58+
messagebox.showinfo(title="Info", message="The same API key is already used. No action needed.")
59+
return
60+
except Exception as e:
61+
messagebox.showerror(title="Error", message=f"Failed to read existing API key: {str(e)}")
62+
return
63+
64+
# Proceed to create/update the API.KEY file with the submitted API key
65+
try:
66+
parent_dir = os.path.dirname(os.getcwd())
67+
system_dir = os.path.join(parent_dir, "SYSTEM")
68+
os.makedirs(system_dir, exist_ok=True)
69+
70+
with open(os.path.join(system_dir, 'API.KEY'), 'w') as f:
71+
f.write(api_key + "\n")
72+
73+
messagebox.showinfo(title="Success", message="API key saved to API.KEY.")
74+
except Exception as e:
75+
messagebox.showerror(title="Error", message=f"Failed to save API key: {str(e)}")
76+
77+
root.destroy()
78+
79+
80+
# Submit button for the user to finalize the API key submission
81+
submit_button = tk.Button(root, text="Submit", command=submit_api_key)
82+
submit_button.pack(pady=10)
83+
84+
# Start the application
85+
root.mainloop()

CODE/API_IP_Scraper.py

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
import requests
2+
import os
3+
import colorlog
4+
5+
# Configure colorlog for logging messages with colors
6+
logger = colorlog.getLogger()
7+
logger.setLevel(colorlog.INFO) # Set the log level to INFO to capture all relevant logs
8+
9+
handler = colorlog.StreamHandler()
10+
formatter = colorlog.ColoredFormatter(
11+
"%(log_color)s%(levelname)-8s%(reset)s %(blue)s%(message)s",
12+
datefmt=None,
13+
reset=True,
14+
log_colors={
15+
'DEBUG': 'cyan',
16+
'INFO': 'green',
17+
'WARNING': 'yellow',
18+
'ERROR': 'red',
19+
'CRITICAL': 'red,bg_white',
20+
}
21+
)
22+
handler.setFormatter(formatter)
23+
logger.addHandler(handler)
24+
25+
26+
def get_public_ip():
27+
"""
28+
Fetches the public IP address using the ipify API.
29+
30+
Returns:
31+
str: Public IP address as a string.
32+
None: If there's an error fetching the IP.
33+
"""
34+
try:
35+
response = requests.get('https://api.ipify.org?format=json')
36+
response.raise_for_status() # Raises an HTTPError if the response was unsuccessful
37+
return response.json()['ip']
38+
except requests.exceptions.RequestException as e:
39+
logger.error(f"Error fetching public IP: {e}")
40+
return None
41+
42+
43+
def save_to_file(filename, content):
44+
"""
45+
saves the provided content to a file.
46+
47+
Args:
48+
filename (str): Name of the file to save to.
49+
content (str): Content to write to the file.
50+
51+
Raises:
52+
IOError: If there's an issue writing to the file.
53+
"""
54+
try:
55+
with open(filename, 'w') as file:
56+
file.write(content)
57+
except IOError as e:
58+
logger.error(f"Error writing to file: {e}")
59+
60+
61+
def main():
62+
script_dir = os.path.dirname(os.path.realpath(__file__))
63+
parent_dir = os.path.join(script_dir, '..')
64+
api_key_file_path = os.path.join(parent_dir, 'SYSTEM', 'API.KEY')
65+
66+
# Check if the API key file exists before proceeding
67+
if not os.path.exists(api_key_file_path):
68+
logger.error("Exiting: The API.KEY file does not exist.")
69+
return
70+
71+
# Read the API key from the file
72+
with open(api_key_file_path, 'r') as file:
73+
api_key = file.read().strip()
74+
if api_key == "API-NO":
75+
exit()
76+
77+
# Attempt to fetch the public IP
78+
public_ip = get_public_ip()
79+
if not public_ip:
80+
logger.error("Exiting: Could not fetch your public IP address.")
81+
return
82+
83+
# Construct the URL for the request
84+
url = f'https://vpnapi.io/api/{public_ip}?key={api_key}'
85+
86+
# Make the request to the VPNAPI service
87+
try:
88+
response = requests.get(url)
89+
response.raise_for_status() # Raises an HTTPError if the response was unsuccessful
90+
except requests.exceptions.HTTPError as e:
91+
logger.error(f"Exiting: Failed to retrieve data from VPNAPI. Error: {e}")
92+
return
93+
94+
# Parse the JSON response
95+
data = response.json()
96+
97+
# Format the output string
98+
output = (
99+
f"Country: {data['location']['country']}\n"
100+
f"City: {data['location']['city']}\n"
101+
f"ISP: {data['network']['autonomous_system_organization']}\n"
102+
f"Organization: {data['network']['autonomous_system_organization']}\n\n"
103+
f"VPN Used: {'Yes' if data['security']['vpn'] else 'No'}\n"
104+
f"Proxy Used: {'Yes' if data['security']['proxy'] else 'No'}\n"
105+
f"Tor Used: {'Yes' if data['security']['tor'] else 'No'}\n"
106+
)
107+
108+
# Save the formatted output to a file
109+
save_to_file('API_Output.txt', output)
110+
logger.info("Operation completed successfully.")
111+
112+
113+
if __name__ == "__main__":
114+
main()

CODE/Browser_Policy_Miner.ps1

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Define the list of source paths with placeholders
2+
$sourcePaths = @(
3+
"C:\Users\{}\AppData\Local\Microsoft\Edge\User Data\Default\Network",
4+
"C:\Users\{}\AppData\Local\Google\Chrome\User Data\Default\Network",
5+
"C:\Users\{}\AppData\Roaming\Mozilla\Firefox\Profiles",
6+
"C:\Users\{}\AppData\Roaming\Opera Software\Opera Stable\Network",
7+
"C:\Users\{}\AppData\Roaming\Opera Software\Opera GX Stable\Network",
8+
'C:\\WINDOWS\\system32\\config\\SAM',
9+
'C:\\Windows\\System32\\config',
10+
'C:\\Windows\\System32\\GroupPolicy',
11+
'C:\\Windows\\System32\\GroupPolicyUsers',
12+
'C:\\Windows\\System32\\winevt\\Logs'
13+
)
14+
15+
# Define the list of identifiers for renaming
16+
$identifiers = @(
17+
"Edge",
18+
"Chrome",
19+
"Firefox",
20+
"OperaStable",
21+
"OperaGXStable",
22+
"SAM",
23+
"SystemConfig",
24+
"GroupPolicy",
25+
"GroupPolicyUsers",
26+
"WindowsEventLogs"
27+
)
28+
29+
# Get the current user's name
30+
$currentUser = $env:USERNAME
31+
32+
# Define the base directory for the destination
33+
$baseDirectory = "DATA"
34+
35+
# Function to check if a path exists and is accessible
36+
function Test-PathAndAccess($path) {
37+
return Test-Path $path -PathType Container -ErrorAction SilentlyContinue
38+
}
39+
40+
# Loop through each source path
41+
foreach ($sourcePath in $sourcePaths) {
42+
# Replace the placeholder with the current user's name
43+
$fullSourcePath = $sourcePath -replace '\{\}', $currentUser
44+
45+
# Enhanced error checking for source path existence and accessibility
46+
if (-not (Test-PathAndAccess $fullSourcePath)) {
47+
Write-Host "WARNING: Source path $fullSourcePath does not exist or cannot be accessed."
48+
continue
49+
}
50+
51+
# Extract the identifier from the source path
52+
$identifier = $sourcePath.Split('\')[-1].Split('\\')[-1]
53+
54+
# Define the destination path
55+
$destinationPath = Join-Path -Path $baseDirectory -ChildPath "USER_$identifier"
56+
57+
# Enhanced error checking for destination directory existence
58+
if (-not (Test-PathAndAccess $destinationPath)) {
59+
New-Item -ItemType Directory -Path $destinationPath -Force | Out-Null
60+
}
61+
62+
# Attempt to copy the folder to the DATA directory and rename it
63+
try {
64+
Copy-Item -Path $fullSourcePath -Destination $destinationPath -Recurse -Force -ErrorAction SilentlyContinue
65+
# Print the success message to the console
66+
Write-Host "INFO: Successfully copied $fullSourcePath to $destinationPath"
67+
} catch {
68+
# Detailed error handling
69+
Write-Host "ERROR: An error occurred while copying $fullSourcePath to $destinationPath. Error: $_"
70+
}
71+
}

CODE/CMD_Disabled_Bypass.py

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
import pyautogui
2+
import time
3+
import colorlog
4+
5+
# Create a logger
6+
logger = colorlog.getLogger()
7+
logger.setLevel(colorlog.INFO) # Set the log level
8+
9+
# Define a handler that outputs logs to console
10+
handler = colorlog.StreamHandler()
11+
formatter = colorlog.ColoredFormatter(
12+
"%(log_color)s%(levelname)-8s%(reset)s %(blue)s%(message)s",
13+
datefmt=None,
14+
reset=True,
15+
log_colors={
16+
'DEBUG': 'cyan',
17+
'INFO': 'green',
18+
'WARNING': 'yellow',
19+
'ERROR': 'red',
20+
'CRITICAL': 'red,bg_white',
21+
}
22+
)
23+
handler.setFormatter(formatter)
24+
logger.addHandler(handler)
25+
26+
27+
# Function to simulate pressing Win+R to open the Run dialog
28+
def press_win_r():
29+
try:
30+
pyautogui.hotkey('win', 'r')
31+
logger.info("Simulated pressing Win+R to open the Run dialog.")
32+
except Exception as e:
33+
logger.error(f"Failed to simulate pressing Win+R: {e}")
34+
35+
36+
# Function to type the command to enable the command prompt
37+
def type_command():
38+
try:
39+
pyautogui.write(
40+
'cmd.exe /k "REG add HKCU\\Software\\Policies\\Microsoft\\Windows\\System /v DisableCMD /t REG_DWORD /d 0 /f"')
41+
logger.info("Typed the command to attempt to enable command prompt.")
42+
except Exception as e:
43+
logger.error(f"Failed to type the command: {e}")
44+
45+
46+
# Function to press Enter to execute the command
47+
def press_enter():
48+
try:
49+
pyautogui.press('enter')
50+
logger.info("Pressed Enter to execute the command.")
51+
except Exception as e:
52+
logger.error(f"Failed to press Enter: {e}")
53+
54+
55+
# Function to simulate pressing Alt+F4 to close the command prompt window
56+
def press_alt_f4():
57+
try:
58+
pyautogui.hotkey('alt', 'f4')
59+
logger.info("Simulated pressing Alt+F4 to close the command prompt window.")
60+
except Exception as e:
61+
logger.error(f"Failed to simulate pressing Alt+F4: {e}")
62+
63+
64+
# Main execution flow
65+
if __name__ == "__main__":
66+
# Wait a bit to ensure the script is ready to run
67+
time.sleep(2)
68+
69+
press_win_r()
70+
71+
# Wait a bit for the Run dialog to appear
72+
time.sleep(1)
73+
74+
type_command()
75+
76+
press_enter()
77+
78+
# Wait a bit for the command to execute and the command prompt to open
79+
time.sleep(2)
80+
81+
press_alt_f4()
82+
83+
logger.info(
84+
"Command executed to enable the command prompt and the window has been closed.")

0 commit comments

Comments
 (0)