#ifndef _PROXY_H #define _PROXY_H #include #include #include #define MAX_PROXY 30 #define BUFF_SIZE 1024 /* We may want to be more covert about what user we report to the proxy */ #define USERID "Nmap-scanner" #define USERIDLENGTH sizeof(USERID) enum proxyt {HTTP,SOCKS4,SOCKS4A,SOCKS5}; struct proxyinfo{ char host[MAXHOSTNAMELEN+1]; unsigned short port; proxyt ptype; }; int proxy_connect(struct proxyinfo proxy[MAX_PROXY]); int recv_time(int s, char *buf, int len, int timeout); /* When we say minor, we really mean the socks command value we want to send. */ struct socks4header{ unsigned char major; unsigned char minor; unsigned short port; struct in_addr addr; char userid[USERIDLENGTH]; } __attribute__((packed)); struct socks5header{ unsigned char major; unsigned char minor; unsigned char tiny; unsigned short port; struct in_addr addr; } __attribute__((packed)); #endif