diff options
| author | Root THC | 2026-02-24 12:42:47 +0000 |
|---|---|---|
| committer | Root THC | 2026-02-24 12:42:47 +0000 |
| commit | c9cbeced5b3f2bdd7407e29c0811e65954132540 (patch) | |
| tree | aefc355416b561111819de159ccbd86c3004cf88 /other/b-scan/tmp/include/bscan/bscan.h | |
| parent | 073fe4bf9fca6bf40cef2886d75df832ef4b6fca (diff) | |
initial
Diffstat (limited to 'other/b-scan/tmp/include/bscan/bscan.h')
| -rw-r--r-- | other/b-scan/tmp/include/bscan/bscan.h | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/other/b-scan/tmp/include/bscan/bscan.h b/other/b-scan/tmp/include/bscan/bscan.h new file mode 100644 index 0000000..c1ad9bb --- /dev/null +++ b/other/b-scan/tmp/include/bscan/bscan.h | |||
| @@ -0,0 +1,94 @@ | |||
| 1 | /* | ||
| 2 | * bscan, lame (and hopefully fast) banner scanner [port 21,25,110,...] | ||
| 3 | * | ||
| 4 | * "<es> skyper its a cool idea" | ||
| 5 | * "<es> i'd like to see the k0ad when ur finished" | ||
| 6 | * HI ES :) | ||
| 7 | * greetings to all my !el8 brothers :)) | ||
| 8 | */ | ||
| 9 | |||
| 10 | #include <stdio.h> | ||
| 11 | #include <stdarg.h> | ||
| 12 | #include <sys/socket.h> | ||
| 13 | #include <sys/wait.h> | ||
| 14 | #include <pthread.h> | ||
| 15 | #ifndef __FAVOR_BSD | ||
| 16 | #define __FAVOR_BSD | ||
| 17 | #endif | ||
| 18 | #ifndef __USE_BSD | ||
| 19 | #define __USE_BSD | ||
| 20 | #endif | ||
| 21 | #ifndef __BSD_SOURCE | ||
| 22 | #define __BSD_SOURCE | ||
| 23 | #endif | ||
| 24 | #include "arpg.h" | ||
| 25 | #include "network_raw.h" | ||
| 26 | |||
| 27 | |||
| 28 | #define SPF_SMAC "\x00\x20\xAF\xA3\x13\x37" | ||
| 29 | |||
| 30 | #define OPT_VERB 0x1 | ||
| 31 | #define OPT_RESERV1 0x2 | ||
| 32 | #define OPT_SETARP 0x4 | ||
| 33 | #define OPT_SPREADSCAN 0x8 | ||
| 34 | #define OPT_OUTONLY 0x10 | ||
| 35 | |||
| 36 | #define OPT_ABRT 0x20 | ||
| 37 | #define OPT_REST 0x40 | ||
| 38 | #define OPT_HOSTFILE 0x80 | ||
| 39 | #define OPT_W8SEMA 0x100 | ||
| 40 | |||
| 41 | |||
| 42 | struct _opt | ||
| 43 | { | ||
| 44 | int (*getnextip) (); | ||
| 45 | int sox; | ||
| 46 | u_char *packet; | ||
| 47 | int pkg_maxlen; | ||
| 48 | int pkg_len; /* actual length of contructed packet */ | ||
| 49 | char *hostfile; | ||
| 50 | char **argvlist; | ||
| 51 | FILE *ffd; /* e.g. input file */ | ||
| 52 | char *target; | ||
| 53 | unsigned long netmask; /* depricated */ | ||
| 54 | unsigned long network; /* depricated */ | ||
| 55 | unsigned int limit; | ||
| 56 | unsigned short flags; | ||
| 57 | unsigned long random_maxcount; | ||
| 58 | u_int delay; /* w8 for outstanding packets */ | ||
| 59 | u_int pscanstat; /* scan stats every x pkts, default NEVER */ | ||
| 60 | u_long start_ip; /* in HBO */ | ||
| 61 | u_long end_ip; /* in HBO */ | ||
| 62 | u_long ipscan_count; /* scanned ip's of a SPECIFIC range [temp!] */ | ||
| 63 | u_long iptotscan_count; /* total scan_count over all ranges */ | ||
| 64 | /* used for flood protection */ | ||
| 65 | u_long bsent_count; /* byte-sent counter. TMP (!) variable */ | ||
| 66 | u_long ip_offset; /* spread scan offset */ | ||
| 67 | u_long ip_blklen; /* block-length for spread-scan */ | ||
| 68 | u_long ip_pos; /* position for SPREAD scan, non-linear */ | ||
| 69 | struct timeval scan_start; /* scan start for ALL ranges */ | ||
| 70 | /* the real beginning */ | ||
| 71 | struct timeval tv2; /* flood protection timer 2 + restore */ | ||
| 72 | /* must be the last gettimeofday() from scan */ | ||
| 73 | float sec; /* flood protection distance time */ | ||
| 74 | struct _libnet lnet; | ||
| 75 | u_char spf_smac[6]; /* spoofed ethernet sender mac */ | ||
| 76 | pthread_t bscantid; /* 'parent' thread id */ | ||
| 77 | pthread_t snarftid; /* snarf thread id */ | ||
| 78 | struct _snarf | ||
| 79 | { | ||
| 80 | u_long icmp_c; | ||
| 81 | u_long close_c; | ||
| 82 | u_long open_c; | ||
| 83 | u_long refused_c; | ||
| 84 | } | ||
| 85 | snarf; | ||
| 86 | struct net_tuple nt; | ||
| 87 | }; | ||
| 88 | |||
| 89 | |||
| 90 | void make_iprange (u_long *, u_long *, u_long *, u_long *, char *); | ||
| 91 | void init_spreadscan (u_long diff); | ||
| 92 | void sigdriver (int); | ||
| 93 | void print_scanstat (FILE *); | ||
| 94 | void die (int); | ||
