Skip to content

Instantly share code, notes, and snippets.

@echo off
cls
color a
SETLOCAL EnableDelayedExpansion
:GeolocatorSubmenu
cls
echo Welcome to the geolocator Submenu what would you like to do today?
echo [1] Geolocate IPs In A file
echo [2] Geolocate Other IPs
echo [3] Geolocate My Public IP
@echo on
setlocal enabledelayedexpansion
:: Create a directory to store output files
set OUTPUT_DIR=%~dp0System_Information
mkdir "%OUTPUT_DIR%"
:: Create subdirectories for categorized outputs
mkdir "%OUTPUT_DIR%\System"
mkdir "%OUTPUT_DIR%\Network"
@Joseph413168
Joseph413168 / "Security Audit.ps1"
Created December 11, 2024 10:12
Powershell Security Audit (Important note : power does not allow execution of .ps1 scripts which will result in this error when the file is attempted to be executed through powershell PS C:\Users\yousu\Desktop\projects> .\"Security Audit.ps1" .\Security Audit.ps1 : File C:\Users\yousu\Desktop\projects\Security Audit.ps1 cannot be loaded because …
# Function to log results to a file
function Log-Results {
param (
[string]$logMessage
)
$logFilePath = "C:\Users\yousu\Desktop\projects\SecurityAuditResults.txt"
$timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
$logMessage = "$timestamp - $logMessage"
Add-Content -Path $logFilePath -Value $logMessage
}
@Joseph413168
Joseph413168 / gist:02ca70d5c5c8b5a346833ddaec510e55
Created December 9, 2024 11:26
Encryption Algorithm (Python)
# Each letter is assigned a color and converted to HEX then converted to its decimal mathematical operation is preformed on it
# Then the numbers are converted to letters
import random
def generate_random_color():
"""Generates a random color in hex."""
return "#{:06x}".format(random.randint(0, 0xFFFFFF))
def color_to_decimal(hex_color):
"""Converts a hex color to a decimal value."""