This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/usr/bin/env python3 | |
| # DoH Provider Selection Based on Geographic Location | |
| def select_doh_provider(client_ip): | |
| """Select optimal DoH provider based on location""" | |
| # Simplified geo-detection | |
| if client_ip.startswith('192.168.'): | |
| return "https://local-doh.home.arpa/dns-query" | |
| elif is_asian_ip(client_ip): | |
| return "https://dns.google/dns-query" # Better in Asia | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/bin/bash | |
| # DoH Troubleshooting - Common fixes | |
| # 1. Slow Initial Queries | |
| # Implement DNS caching | |
| # For dnsmasq | |
| echo "cache-size=10000" >> /etc/dnsmasq.conf | |
| echo "min-cache-ttl=3600" >> /etc/dnsmasq.conf | |
| # For systemd-resolved | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/usr/bin/env python3 | |
| # DoH Certificate Pinning for Self-Hosted Servers | |
| import ssl | |
| import hashlib | |
| import base64 | |
| class SecureDoHClient: | |
| # ... (additional implementation details) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/usr/bin/env python3 | |
| # DoH Performance Monitoring Tools | |
| import time | |
| import dns.resolver | |
| import requests | |
| from statistics import mean, stdev | |
| # Test using curl | |
| # curl -H 'content-type: application/dns-message' \ | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/bin/bash | |
| # DoH Router Setup - Multiple platform configurations | |
| # Linux (cloudflared) setup | |
| # Install cloudflared | |
| wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb | |
| sudo dpkg -i cloudflared-linux-amd64.deb | |
| # Configure as DNS proxy | |
| # ... (additional implementation details) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/bin/bash | |
| # IoT Security Lab Setup Script | |
| # Combines tools installation, IoTGoat deployment, and firmware analysis toolkit | |
| # Core analysis tools installation | |
| echo "[*] Installing core IoT analysis tools..." | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| wireshark \ | |
| nmap \ | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/usr/bin/env python3 | |
| """ | |
| IoT Network Monitor | |
| Real-time packet monitoring and anomaly detection for IoT devices using scapy | |
| """ | |
| from scapy.all import * | |
| import json | |
| from datetime import datetime | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/usr/bin/env python3 | |
| """ | |
| IoT Vulnerability Testing Toolkit | |
| Combines default credential testing, MQTT discovery, and command injection tests | |
| for OWASP IoTGoat security assessment | |
| """ | |
| import telnetlib | |
| import time | |
| import paho.mqtt.client as mqtt | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/bin/bash | |
| # Bitwarden CLI Client Setup and Usage | |
| # Install Bitwarden CLI | |
| npm install -g @bitwarden/cli | |
| # Configure server | |
| bw config server https://vault.example.com | |
| # Login | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/bin/bash | |
| # Bitwarden Backup Restoration Testing Script | |
| # Decrypt backup | |
| gpg --decrypt bitwarden_20250901_030000.sql.gz.gpg > bitwarden_restore.sql.gz | |
| gunzip bitwarden_restore.sql.gz | |
| # Restore to test database | |
| docker exec -i vaultwarden-db psql -U bitwarden bitwarden < bitwarden_restore.sql | 
NewerOlder