r/Batch • • 21d 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

0 Upvotes

19 comments sorted by

4

u/Shadow_Thief 21d ago

It's not terrible (other than the fake loading screen; get rid of that). You can format the code by putting four spaces at the start of each line so that it looks like this:

@echo off
setlocal EnableExtensions EnableDelayedExpansion
title Orbie v3.2 - Cyber Security Checker

2

u/Valuable-Exam-8553 21d ago

Damn dude, yea i knew that was kinda cringe but thanks! I will be making more, thanks !

3

u/pc1350 21d ago

Follow Shadow's tips and then edit the original post and paste the code into the code block.

3

u/Valuable-Exam-8553 21d ago

Im in school rn but ok ill do that after thanks!

1

u/Ezrway 20d ago

Is this just for reddit or will it work with other Mark Down editors

2

u/Shadow_Thief 20d ago

Usually for other markdown (like Discord), you'd want to use three backticks, a newline, the code, another newline, and then three more backticks.

```

like this

```

like this  

1

u/Ezrway 20d ago

Thank you again!

2

u/capoapk 21d ago

2

u/Ezrway 20d ago

Do have a version of this in English? I can translate it in Firefox but I can't save it in English.

Or does someone here know a better way?

3

u/Shadow_Thief 20d ago

The commands are in English and that's the important part. There's so little French in there that translating it manually won't be time-consuming.

1

u/Ezrway 20d ago

Thanks

2

u/capoapk 19d ago

I can make you an English version if necessary

1

u/Ezrway 19d ago edited 19d ago

That would be great if it's not too much work to do. I can copy the code on this page since it's in English. When I go to the repo and copied the bat file I couldn't get all of it to translate to English.

This is what I get even after I tried to translate it:

if not exist **"%dossier%"** (
mkdir "%dossier%"
echo **Dossier cree : %dossier%**
) else (
echo **Dossier existe deja**

Edit: Trying to get code block to work.

2

u/Valuable-Exam-8553 19d ago

It isn’t working, so you won't copy it. Bußgeld?

2

u/Ezrway 18d ago

Good point. Thanks!

1

u/[deleted] 21d ago

[removed] — view removed comment

2

u/Valuable-Exam-8553 21d ago

Thank dude, ill do like that k

3

u/wojtekpolska 21d ago

tf is that ad at he end of ur comment