added tips to lamer.bash help
[mirrors/Programs.git] / php / skripty / bdscan.php
CommitLineData
8de51304
H
1#!/usr/bin/php\r
2<?php\r
3//BDScan\r
4//Harvie 2oo7\r
5\r
6///SETTINGS////////////////////////////////////////////\r
7$host = "localhost";\r
8//$host = "192.168.2.1";\r
9$timeout = 0.9;\r
10\r
11if(isset($argv[1])) $host = $argv[1]; //Host\r
12if(isset($argv[2])) $timeout = $argv[2]; //Timeout\r
13\r
14///PORTLIST////////////////////////////////////////////\r
15$ports = array (\r
16//#PORT => "CLASS.Name",\r
17 21 => "SRV.FTP Service",\r
18 22 => "SRV.Secure Shell Service",\r
19 23 => "SRV.Telnet Service",\r
20 24 => "BD.Harvie's NetCat BackDoor",\r
21 80 => "SRV.HTTP Service",\r
22 8080 => "SRV.HTTP Service",\r
23 \r
24 113 => "WRM.Korgo.F",\r
25 903 => "BD.NetDevil",\r
26 1080 => "WRM.MyDoom.B, MyDoom.F, MyDoom.G, MyDoom.H",\r
27 2283 => "WRM.Dumaru.Y",\r
28 2535 => "WRM.Beagle.W, Beagle.X, other Beagle/Bagle variants",\r
29 2745 => "WRM.Bagle",\r
30 3067 => "WRM.Korgo.F",\r
31 3127 => "WRM.My_Doom.A",\r
32 3128 => "WRM.MyDoom.B",\r
33 3140 => "BD.OptixPro.13 and variants",\r
34 5554 => "WRM.Sasser through Sasser.C, Sasser.F",\r
35 6129 => "RM.DameWare",\r
36 8866 => "WRMBeagle.B",\r
37 9898 => "WRM.Dabber.A and Dabber.B",\r
38 9996 => "WRM.Sasser",\r
39 10000 => "WRM.Dumaru.Y",\r
40 10080 => "WRM.MyDoom.B",\r
41 12345 => "BD.NetBus",\r
42 16661 => "BD.HaxDoor",\r
43 17300 => "BD.Kuang, Kuang2",\r
44 27347 => "BD.SubSeven",\r
45 27374 => "BD.SubSeven",\r
46 65506 => "BOT.PhatBot, Agobot, Gaobot"\r
47 );\r
48\r
49///SCAN///////////////////////////////////////////////////////\r
50echo("Harvie's BackDoor PortScanner\n");\r
51echo("[u] Usage: bdscan [host] [timeout]\n");\r
52echo("[i] Timeout is set to $timeout s\n");\r
53echo("[i] Scanning $host for backdoors and basic services...\n\n");\r
54\r
55foreach($ports as $port => $bd) {\r
56 $sock = @pfsockopen($host, $port, $errno, $err, $timeout);\r
57 if($sock) {\r
58 echo("[!] $port : $bd\n");\r
59 $found = true;\r
60 } else {\r
61 //echo("[-] $port : $bd\n");\r
62 }\r
63}\r
64\r
65if(isset($found)) {\r
66 echo("\n[!] Services listed above found...\n");\r
67} else {\r
68 echo("[i] No BackDoors/services found...\n");\r
69}\r
70echo("[i] Finished...\n");\r
71\r
72///SUX_PARSER/////////////////////////////////////////////////\r
73/*\r
74$fp = fopen("bdports.txt", "r");\r
75while(!feof($fp)) {\r
76 $line = trim(fgets($fp));\r
77 $line = explode("\t", $line, 2);\r
78 $line[0] = trim($line[0]);\r
79 $line[1] = trim($line[1]);\r
80 //print_r($line);\r
81 echo(" ".$line[0]." => \"".$line[1]."\",\r\n");\r
82}\r
83*/\r
This page took 0.420186 seconds and 4 git commands to generate.