CMD (Command Prompt) , Windows'un klasik komut satırı aracıdır. PowerShell kadar güçlü olmasa da hızlı ve basit işlemler için hala kullanılır.
# Dosya ve Dizin
dir # ls
dir /s # Recursive liste
dir *.txt # Filtre
mkdir yeni_dizin
rmdir /s dizin # Sil
copy kaynak.txt hedef.txt
move dosya.txt C:\Yeni\
del dosya.txt
type dosya.txt # cat
find "aranan" dosya.txt # grep
# Sistem Bilgileri
systeminfo
hostname
whoami
ipconfig /all
tasklist
taskkill /PID 1234 /F
# IP Konfigürasyonu
ipconfig
ipconfig /all
ipconfig /release
ipconfig /renew
# DNS
nslookup google.com
nslookup 8.8.8.8
# Ping
ping google.com
ping -t google.com # Sürekli ping
ping -n 10 google.com # 10 ping
# Tracert
tracert google.com
# Netstat
netstat -an
netstat -an | find "ESTABLISHED"
netstat -b # Hangi uygulama hangi port
# ARP
arp -a
# Route
route print
# Port Testi
telnet google.com 80
Test-NetConnection (PowerShell)
# Dosya Arama
dir /s dosya.txt
dir /s *.exe
# Dosya içinde arama
find "aranan" *.txt
findstr "aranan" *.txt
findstr /s /i "password" *.config
# Hash (certutil ile)
certutil -hashfile dosya.txt SHA256
certutil -hashfile dosya.txt MD5
# Güçlü Silme
cipher /w:C:\ # Boş alanı sıfırla
# Disk Bilgisi
wmic diskdrive get model,size
wmic logicaldisk get name,size,freespace
# Service
sc query
sc query state= all
sc start servis_adi
sc stop servis_adi
# Kullanıcı
net user
net user kullanici_adi
net user kullanici_adi /add
net localgroup administrators kullanici_adi /add
# Etkin Kullanıcılar
query user
logoff 1
# Process
tasklist
tasklist /fi "imagename eq chrome.exe"
taskkill /im chrome.exe /f
@Echo off
:: Basic Batch Script
echo ===== Sistem Bilgisi =====
hostname
systeminfo | find "OS Name"
systeminfo | find "System Type"
echo ===== Disk Kullanımı =====
wmic logicaldisk get name,size,freespace
pause
:: IP Tarama
@Echo off
for /L %%i in (1,1,254) do (
ping -n 1 192.168.1.%%i | find "TTL" && echo 192.168.1.%%i aktif
)
:: Port Tarama
@Echo off
for /L %%i in (1,1,1024) do (
telnet 192.168.1.1 %%i 2>nul && echo Port %%i acik
)
CMD Temel Komutlar
cmd# Dosya ve Dizin
dir # ls
dir /s # Recursive liste
dir *.txt # Filtre
mkdir yeni_dizin
rmdir /s dizin # Sil
copy kaynak.txt hedef.txt
move dosya.txt C:\Yeni\
del dosya.txt
type dosya.txt # cat
find "aranan" dosya.txt # grep
# Sistem Bilgileri
systeminfo
hostname
whoami
ipconfig /all
tasklist
taskkill /PID 1234 /F
CMD Ağ Komutları
cmd# IP Konfigürasyonu
ipconfig
ipconfig /all
ipconfig /release
ipconfig /renew
# DNS
nslookup google.com
nslookup 8.8.8.8
# Ping
ping google.com
ping -t google.com # Sürekli ping
ping -n 10 google.com # 10 ping
# Tracert
tracert google.com
# Netstat
netstat -an
netstat -an | find "ESTABLISHED"
netstat -b # Hangi uygulama hangi port
# ARP
arp -a
# Route
route print
# Port Testi
telnet google.com 80
Test-NetConnection (PowerShell)
CMD Dosya İşlemleri
cmd# Dosya Arama
dir /s dosya.txt
dir /s *.exe
# Dosya içinde arama
find "aranan" *.txt
findstr "aranan" *.txt
findstr /s /i "password" *.config
# Hash (certutil ile)
certutil -hashfile dosya.txt SHA256
certutil -hashfile dosya.txt MD5
# Güçlü Silme
cipher /w:C:\ # Boş alanı sıfırla
CMD Disk ve Sistem
cmd# Disk Bilgisi
wmic diskdrive get model,size
wmic logicaldisk get name,size,freespace
# Service
sc query
sc query state= all
sc start servis_adi
sc stop servis_adi
# Kullanıcı
net user
net user kullanici_adi
net user kullanici_adi /add
net localgroup administrators kullanici_adi /add
# Etkin Kullanıcılar
query user
logoff 1
# Process
tasklist
tasklist /fi "imagename eq chrome.exe"
taskkill /im chrome.exe /f
CMD Batch Script Örnekleri
cmd@Echo off
:: Basic Batch Script
echo ===== Sistem Bilgisi =====
hostname
systeminfo | find "OS Name"
systeminfo | find "System Type"
echo ===== Disk Kullanımı =====
wmic logicaldisk get name,size,freespace
pause
:: IP Tarama
@Echo off
for /L %%i in (1,1,254) do (
ping -n 1 192.168.1.%%i | find "TTL" && echo 192.168.1.%%i aktif
)
:: Port Tarama
@Echo off
for /L %%i in (1,1,1024) do (
telnet 192.168.1.1 %%i 2>nul && echo Port %%i acik
)
🔒 Bu içeriği görmek için giriş yapın