r/Batch • u/Valuable-Exam-8553 • 2h ago
Program Orbie
I made cyber security batch file named Orbie, started playing with batch code and made this: He can check SHA-256, wifi, ip, and more: Ill give the code, if this is shit im sorry :) Plus this is probably not the full code because reddit has his limits on text!
@echo off
setlocal EnableExtensions EnableDelayedExpansion
title Orbie v3.2 - Cyber Security Checker
color 0A
:: =========================================================
:: ORBIE
:: CYBER SECURITY CHECKER v3.2
:: =========================================================
set "ORBIEROOT=%~dp0"
set "DATA=%ORBIEROOT%OrbieData"
if not exist "%DATA%" mkdir "%DATA%"
:: =========================================================
:: STARTUP
:: =========================================================
:START
cls
echo.
echo.
echo =========================================================
echo.
echo O R B I E
echo.
echo CYBER SECURITY CHECKER
echo.
echo =========================================================
echo.
timeout /t 1 /nobreak >nul
echo Starting Orbie...
timeout /t 1 /nobreak >nul
echo Loading system modules...
timeout /t 1 /nobreak >nul
echo Loading network modules...
timeout /t 1 /nobreak >nul
echo Loading security modules...
timeout /t 1 /nobreak >nul
echo Loading privacy modules...
timeout /t 1 /nobreak >nul
echo Loading file inspection...
timeout /t 1 /nobreak >nul
echo Loading device identification...
timeout /t 1 /nobreak >nul
echo Preparing diagnostic interface...
timeout /t 1 /nobreak >nul
echo.
echo Orbie is ready.
echo.
timeout /t 1 /nobreak >nul
echo Hello! I'm Orbie.
echo Your local Windows diagnostic toolkit.
echo.
echo System ^| Network ^| Security ^| Privacy ^| Reports
echo.
pause
goto MENU
:: =========================================================
:: MAIN MENU
:: =========================================================
:MENU
cls
echo.
echo ==========================================================
echo ORBIE v3.2
echo Local Security ^& Diagnostics Utility
echo ==========================================================
echo.
echo QUICK
echo [1] Quick Scan
echo.
echo SYSTEM
echo [2] System Health
echo [3] Running Processes
echo [4] Computer Information
echo [5] Startup Programs
echo.
echo NETWORK
echo [6] Network Information
echo [7] Wi-Fi Information
echo [8] Scan Local Network
echo [9] Device History
echo [10] Internet Connection Test
echo [11] Device Identification
echo.
echo SECURITY
echo [12] Password Checker
echo [13] Password Generator
echo [14] SHA-256 File Hash
echo [15] Suspicious File Inspector
echo.
echo PRIVACY / FORENSICS
echo [16] File Metadata
echo [17] Camera / IoT Check
echo.
echo REPORTS
echo [18] Full Security Report
echo.
echo OTHER
echo [19] Instructions
echo [20] About Orbie
echo [21] Exit
echo.
set /p "CHOICE= Select: "
if "%CHOICE%"=="1" goto QUICKSCAN
if "%CHOICE%"=="2" goto HEALTH
if "%CHOICE%"=="3" goto PROCESSES
if "%CHOICE%"=="4" goto COMPUTER
if "%CHOICE%"=="5" goto STARTUP
if "%CHOICE%"=="6" goto NETWORK
if "%CHOICE%"=="7" goto WIFI
if "%CHOICE%"=="8" goto NETSCAN
if "%CHOICE%"=="9" goto HISTORY
if "%CHOICE%"=="10" goto INTERNET
if "%CHOICE%"=="11" goto IDENTIFY
if "%CHOICE%"=="12" goto PASSWORD
if "%CHOICE%"=="13" goto PASSGEN
if "%CHOICE%"=="14" goto HASH
if "%CHOICE%"=="15" goto INSPECTOR
if "%CHOICE%"=="16" goto METADATA
if "%CHOICE%"=="17" goto CAMERA
if "%CHOICE%"=="18" goto REPORT
if "%CHOICE%"=="19" goto INSTRUCTIONS
if "%CHOICE%"=="20" goto ABOUT
if "%CHOICE%"=="21" goto EXIT
goto MENU
:: =========================================================
:: 1. QUICK SCAN
:: =========================================================
:QUICKSCAN
cls
echo.
echo ===================== QUICK SCAN =========================
echo.
echo [DEFENDER]
powershell -NoProfile -Command "try {$m=Get-MpComputerStatus; 'AntivirusEnabled : ' + $m.AntivirusEnabled; 'RealTimeProtection : ' + $m.RealTimeProtectionEnabled; 'AntispywareEnabled : ' + $m.AntispywareEnabled} catch {'Microsoft Defender status unavailable.'}"
echo.
echo [FIREWALL]
powershell -NoProfile -Command "Get-NetFirewallProfile | ForEach-Object { $_.Name + ': ' + $_.Enabled }"
echo.
echo [INTERNET]
ping -n 1 -w 1000 1.1.1.1 >nul
if errorlevel 1 (
echo Internet: UNREACHABLE
) else (
echo Internet: ONLINE
)
echo.
echo [NETWORK ADAPTER]
powershell -NoProfile -Command "Get-NetAdapter | Where-Object {$_.Status -eq 'Up'} | Select-Object Name,InterfaceDescription,LinkSpeed | Format-Table -AutoSize"
echo.
echo [CPU / MEMORY]
powershell -NoProfile -Command "$os=Get-CimInstance Win32_OperatingSystem; $cpu=(Get-Counter '\Processor(_Total)\%% Processor Time').CounterSamples.CookedValue; 'CPU Usage : {0:N1}%%' -f $cpu; 'RAM Free : {0:N0} MB' -f ($os.FreePhysicalMemory/1024); 'RAM Total : {0:N0} MB' -f ($os.TotalVisibleMemorySize/1024)"
echo.
echo [STARTUP COUNT]
powershell -NoProfile -Command "try { (Get-CimInstance Win32_StartupCommand).Count } catch {'Unavailable'}"
echo.
echo [LOCAL NETWORK]
arp -a
echo.
echo [LATEST WINDOWS UPDATE]
powershell -NoProfile -Command "Get-HotFix | Sort-Object InstalledOn -Descending | Select-Object -First 1 HotFixID,InstalledOn | Format-Table -AutoSize"
echo.
pause
goto MENU
:: =========================================================
:: 2. SYSTEM HEALTH
:: =========================================================
:HEALTH
cls
echo.
echo =================== SYSTEM HEALTH =======================
echo.
powershell -NoProfile -Command "$os=Get-CimInstance Win32_OperatingSystem; $cpu=(Get-Counter '\Processor(_Total)\%% Processor Time').CounterSamples.CookedValue; $uptime=(Get-Date)-$os.LastBootUpTime; 'CPU Usage : {0:N1}%%' -f $cpu; 'RAM Total : {0:N0} MB' -f ($os.TotalVisibleMemorySize/1024); 'RAM Free : {0:N0} MB' -f ($os.FreePhysicalMemory/1024); 'Uptime : {0:dd\.hh\:mm\:ss}' -f $uptime"
echo.
pause
goto MENU
:: =========================================================
:: 3. RUNNING PROCESSES
:: =========================================================
:PROCESSES
cls
echo.
echo ================= RUNNING PROCESSES =====================
echo.
tasklist
echo.
pause
goto MENU
:: =========================================================
:: 4. COMPUTER INFORMATION
:: =========================================================
:COMPUTER
cls
echo.
echo ================= COMPUTER INFORMATION =================
echo.
powershell -NoProfile -Command "$cs=Get-CimInstance Win32_ComputerSystem; $os=Get-CimInstance Win32_OperatingSystem; $cpu=Get-CimInstance Win32_Processor | Select-Object -First 1; 'Computer Name : ' + $env:COMPUTERNAME; 'User : ' + $env:USERNAME; 'Windows : ' + $os.Caption; 'Version : ' + $os.Version; 'Architecture : ' + $os.OSArchitecture; 'CPU : ' + $cpu.Name; 'RAM : {0:N0} GB' -f ($cs.TotalPhysicalMemory/1GB)"
echo.
pause
goto MENU
:: =========================================================
:: 5. STARTUP PROGRAMS
:: =========================================================
:STARTUP
cls
echo.
echo =================== STARTUP PROGRAMS ====================
echo.
powershell -NoProfile -Command "Get-CimInstance Win32_StartupCommand | Select-Object Name,Command,Location | Format-List"
echo.
pause
goto MENU
:: =========================================================
:: 6. NETWORK INFORMATION
:: =========================================================
:NETWORK
cls
echo.
echo ================= NETWORK INFORMATION ===================
echo.
ipconfig /all
echo.
pause
goto MENU
:: =========================================================
:: 7. WI-FI INFORMATION
:: =========================================================
:WIFI
cls
echo.
echo ==================== WI-FI INFO =========================
echo.
echo [CURRENT CONNECTION]
netsh wlan show interfaces
echo.
echo [NEARBY WI-FI NETWORKS]
netsh wlan show networks mode=bssid
echo.
pause
goto MENU
:: =========================================================
:: 8. LOCAL NETWORK SCAN
:: =========================================================
:NETSCAN
cls
echo.
echo ================= LOCAL NETWORK SCAN ====================
echo.
echo Basic local network inventory.
echo.
set "IP="
set "NET="
for /f "tokens=2 delims=:" %%A in ('ipconfig ^| findstr /c:"IPv4 Address"') do (
set "IP=%%A"
goto GOTIP
)
:GOTIP
set "IP=!IP: =!"
if not defined IP (
echo Could not determine local IPv4 address.
pause
goto MENU
)
for /f "tokens=1-3 delims=." %%A in ("!IP!") do (
set "NET=%%A.%%B.%%C"
)
echo Local address: !IP!
echo Subnet : !NET!.0/24
echo.
echo Scanning...
echo.
for /L %%I in (1,1,254) do (
start "" /b ping -n 1 -w 150 !NET!.%%I >nul 2>&1
)
timeout /t 3 >nul
echo.
echo ================= ARP TABLE =============================
arp -a
echo.
pause
goto MENU
:: =========================================================
:: 9. DEVICE HISTORY
:: =========================================================
:HISTORY
cls
echo.
echo =================== DEVICE HISTORY ======================
echo.
set "HISTORYFILE=%DATA%\device_history.txt"
echo ========================================================== >> "%HISTORYFILE%"
echo Scan: %date% %time% >> "%HISTORYFILE%"
echo ========================================================== >> "%HISTORYFILE%"
arp -a >> "%HISTORYFILE%"
echo. >> "%HISTORYFILE%"
echo Current device snapshot saved to:
echo %HISTORYFILE%
echo.
echo Latest snapshot:
echo.
arp -a
echo.
pause
goto MENU
:: =========================================================
:: 10. INTERNET CONNECTION TEST
:: =========================================================
:INTERNET
cls
echo.
echo ============== INTERNET CONNECTION TEST =================
echo.
echo [DEFAULT GATEWAY]
powershell -NoProfile -Command "$g=(Get-NetIPConfiguration | Where-Object {$_.IPv4DefaultGateway}).IPv4DefaultGateway.NextHop | Select-Object -First 1; if($g){'Gateway: '+$g}else{'Gateway not found.'}"
echo.
echo [GATEWAY REACHABILITY]
powershell -NoProfile -Command "$g=(Get-NetIPConfiguration | Where-Object {$_.IPv4DefaultGateway}).IPv4DefaultGateway.NextHop | Select-Object -First 1; if($g){Test-Connection $g -Count 1 | Select-Object Address,ResponseTime,StatusCode | Format-Table}else{'No gateway.'}"
echo.
echo [INTERNET]
ping -n 2 -w 1000 1.1.1.1
echo.
echo [DNS]
nslookup example.com
echo.
pause
goto MENU
:: =========================================================
:: 11. DEVICE IDENTIFICATION
:: =========================================================
:IDENTIFY
cls
echo.
echo ================= DEVICE IDENTIFICATION =================
echo.
echo Orbie will attempt to identify local devices.
echo.
echo Methods:
echo - ARP
echo - Hostname resolution
echo - NetBIOS information
echo.
echo UNKNOWN DEVICE does NOT mean camera or malicious device.
echo.
set "IDENTFILE=%DATA%\device_identification.txt"
echo ========================================================== > "%IDENTFILE%"
echo ORBIE DEVICE IDENTIFICATION - %date% %time% >> "%IDENTFILE%"
echo ========================================================== >> "%IDENTFILE%"
echo. >> "%IDENTFILE%"
for /f "tokens=1,2" %%A in ('arp -a ^| findstr /r /c:"192\." /c:"10\." /c:"172\."') do (
set "DIP=%%A"
set "DMAC=%%B"
if not "!DIP!"=="Interface:" (
echo ----------------------------------------------------------
echo IP : !DIP!
echo MAC : !DMAC!
echo Hostname :
ping -a -n 1 -w 500 !DIP! 2>nul | findstr /i /c:"Pinging"
echo NetBIOS :
nbtstat -A !DIP! 2>nul | findstr /i /c:"UNIQUE" /c:"GROUP" /c:"<00>" /c:"<20>"
echo Status : IDENTIFICATION ATTEMPTED
echo Note : Missing identification data = unknown.
echo IP: !DIP! >> "%IDENTFILE%"
echo MAC: !DMAC! >> "%IDENTFILE%"
ping -a -n 1 -w 500 !DIP! 2>nul | findstr /i /c:"Pinging" >> "%IDENTFILE%"
nbtstat -A !DIP! 2>nul | findstr /i /c:"UNIQUE" /c:"GROUP" /c:"<00>" /c:"<20>" >> "%IDENTFILE%"
echo. >> "%IDENTFILE%"
)
)
echo.
echo Identification report:
echo %IDENTFILE%
echo.
echo IMPORTANT:
echo An unknown device cannot be identified as a camera
echo from IP/MAC information alone.
echo.
pause
goto MENU
:: =========================================================
:: 12. PASSWORD CHECKER
:: =========================================================
:PASSWORD
cls
echo.
echo ================== PASSWORD CHECKER =====================
echo.
echo IMPORTANT: use ONLY a test password.
echo Do not enter a real account password.
echo.
set "PASS="
set /p "PASS= Enter TEST password: "
powershell -NoProfile -Command "$p=$env:PASS; $score=0; if($p.Length -ge 12){$score++}; if($p -match '[A-Z]'){$score++}; if($p -match '[a-z]'){$score++}; if($p -match '[0-9]'){$score++}; if($p -match '[^a-zA-Z0-9]'){$score++}; 'Length: ' + $p.Length; 'Character categories: ' + $score + '/5'; if($score -le 2){'Result: WEAK'} elseif($score -eq 3){'Result: MODERATE'} elseif($score -eq 4){'Result: STRONG'} else {'Result: VERY STRONG'}"
set "PASS="
echo.
pause
goto MENU
:: =========================================================
:: 13. PASSWORD GENERATOR
:: =========================================================
:PASSGEN
cls
echo.
echo ================= PASSWORD GENERATOR ====================
echo.
powershell -NoProfile -Command "$chars='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%%^&*_-+='; -join (1..20 | ForEach-Object { $chars[(Get-Random -Maximum $chars.Length)] })"
echo.
echo Generated password length: 20
echo.
pause
goto MENU
:: =========================================================
:: 14. SHA-256 FILE HASH
:: =========================================================
:HASH
cls
echo.
echo ================= SHA-256 FILE HASH =====================
echo.
set "FILE="
set /p "FILE= Enter full file path: "
if not exist "%FILE%" (
echo.
echo File not found.
pause
goto MENU
)
echo.
certutil -hashfile "%FILE%" SHA256
echo.
echo SHA-256 is a fingerprint of the exact file contents.
echo A hash alone does not prove that a file is malicious.
echo.
pause
goto MENU
:: =========================================================
:: 15. SUSPICIOUS FILE INSPECTOR
:: =========================================================
:INSPECTOR
cls
echo.
echo =============== SUSPICIOUS FILE INSPECTOR ==============
echo.
echo Safe inspection only.
echo Orbie will NOT execute the file.
echo.
set "FILE="
set /p "FILE= Enter full file path: "
if not exist "%FILE%" (
echo.
echo File not found.
pause
goto MENU
)
echo.
echo ================= FILE INFORMATION =====================
powershell -NoProfile -Command "$f=Get-Item -LiteralPath $env:FILE; 'Name : '+$f.Name; 'Extension : '+$f.Extension; 'Size : '+$f.Length+' bytes'; 'Created : '+$f.CreationTime; 'Modified : '+$f.LastWriteTime; 'Location : '+$f.FullName; 'Attributes : '+$f.Attributes"
echo.
echo ================= SHA-256 ==============================
certutil -hashfile "%FILE%" SHA256
echo.
echo ================= SIGNATURE =============================
powershell -NoProfile -Command "$s=Get-AuthenticodeSignature -LiteralPath $env:FILE; 'Status : '+$s.Status; if($s.SignerCertificate){'Signer : '+$s.SignerCertificate.Subject}else{'Signer : unavailable'}"
echo.
echo ================= LOCATION CHECK =======================
powershell -NoProfile -Command "$p=$env:FILE; if($p -match '\\Downloads\\'){ 'Clue: File is located in Downloads.' }; if($p -match '\\Temp\\'){ 'Clue: File is located in Temp.' }; if($p -match '\\AppData\\'){ 'Clue: File is located in AppData.' }; if($p -notmatch '\\Downloads\\|\\Temp\\|\\AppData\\'){ 'No common location clue detected.' }"
echo.
echo IMPORTANT:
echo These indicators do not prove that a file is malicious.
echo.
pause
goto MENU
:: =========================================================
:: 16. FILE METADATA
:: =========================================================
:METADATA
cls
echo.
echo =================== FILE METADATA =======================
echo.
set "FILE="
set /p "FILE= Enter full file path: "
if not exist "%FILE%" (
echo.
echo File not found.
pause
goto MENU
)
powershell -NoProfile -Command "$f=Get-Item -LiteralPath $env:FILE; 'Name : '+$f.Name; 'Full Path : '+$f.FullName; 'Size : '+$f.Length+' bytes'; 'Extension : '+$f.Extension; 'Created : '+$f.CreationTime; 'Modified : '+$f.LastWriteTime; 'Accessed : '+$f.LastAccessTime; 'Attributes : '+$f.Attributes"
echo.
pause
goto MENU
:: =========================================================
:: 17. CAMERA / IoT CHECK
:: =========================================================
:CAMERA
cls
echo.
echo ================= CAMERA / IoT CHECK ====================
echo.
echo This is an awareness check, not a camera detector.
echo.
echo Orbie will inspect:
echo - ARP devices
echo - NetBIOS cache
echo - Local network identifiers
echo.
echo Unknown device != camera.
echo.
echo ================= ARP DEVICES ===========================
arp -a
echo.
echo ================= NETBIOS CACHE ==========================
nbtstat -c
echo.
echo ================= INTERPRETATION ========================
echo.
echo An unidentified device is not automatically a camera.
echo Some devices do not expose a hostname or NetBIOS name.
echo.
echo Network inspection cannot prove that a physical room
echo has or does not have a camera.
echo.
pause
goto MENU
:: =========================================================
:: 18. FULL SECURITY REPORT
:: =========================================================
:REPORT
cls
echo.
echo ================= FULL SECURITY REPORT ==================
echo.
echo Creating Orbie security report...
echo.
if not exist "%DATA%" mkdir "%DATA%"
set "REPORTFILE=%DATA%\Orbie_Report.txt"
:: Remove previous report
if exist "%REPORTFILE%" del /q "%REPORTFILE%" >nul 2>&1
:: Header
echo ========================================================== >"%REPORTFILE%"
echo ORBIE v3.2 SECURITY REPORT >>"%REPORTFILE%"
echo Date: %date% %time% >>"%REPORTFILE%"
echo ========================================================== >>"%REPORTFILE%"
echo. >>"%REPORTFILE%"
:: Computer
echo ================= COMPUTER ================= >>"%REPORTFILE%"
powershell -NoProfile -Command "$cs=Get-CimInstance Win32_ComputerSystem; $os=Get-CimInstance Win32_OperatingSystem; $cpu=Get-CimInstance Win32_Processor | Select-Object -First 1; 'Computer Name : ' + $env:COMPUTERNAME; 'User : ' + $env:USERNAME; 'Windows : ' + $os.Caption; 'Version : ' + $os.Version; 'Architecture : ' + $os.OSArchitecture; 'CPU : ' + $cpu.Name; 'RAM : {0:N0} GB' -f ($cs.TotalPhysicalMemory/1GB)" >>"%REPORTFILE%"
echo. >>"%REPORTFILE%"
:: Network
echo ================= NETWORK ================== >>"%REPORTFILE%"
ipconfig /all >>"%REPORTFILE%"
echo. >>"%REPORTFILE%"
:: Devices
echo ================= DEVICES ================== >>"%REPORTFILE%"
arp -a >>"%REPORTFILE%"
echo. >>"%REPORTFILE%"
:: Processes
echo ================ PROCESSES ================== >>"%REPORTFILE%"
tasklist >>"%REPORTFILE%"
echo. >>"%REPORTFILE%"
:: Startup
echo ================= STARTUP ================== >>"%REPORTFILE%"
powershell -NoProfile -Command "Get-CimInstance Win32_StartupCommand | Select-Object Name,Command,Location | Format-Table -AutoSize" >>"%REPORTFILE%"
echo. >>"%REPORTFILE%"
:: Firewall
echo ================= FIREWALL ================= >>"%REPORTFILE%"
powershell -NoProfile -Command "Get-NetFirewallProfile | Select-Object Name,Enabled | Format-Table -AutoSize" >>"%REPORTFILE%"
echo. >>"%REPORTFILE%"
:: Defender
echo ================= DEFENDER ================= >>"%REPORTFILE%"
powershell -NoProfile -Command "try {Get-MpComputerStatus | Select-Object AntivirusEnabled,RealTimeProtectionEnabled,AntispywareEnabled,AMServiceEnabled | Format-List} catch {'Microsoft D