From 34429ab8260ada50a00f90e11302a51404cd50e2 Mon Sep 17 00:00:00 2001 From: Diadlo Date: Thu, 22 Jun 2017 13:07:47 +0300 Subject: [PATCH] Add service initializer in header files --- hydra.c | 122 ++++++++++++++-------------- services/hydra-adam6500.h | 3 +- services/hydra-afp.h | 3 +- services/hydra-asterisk.h | 3 +- services/hydra-cisco-enable.h | 2 + services/hydra-cisco.h | 2 + services/hydra-cvs.h | 2 + services/hydra-firebird.h | 2 + services/hydra-ftp.h | 4 +- services/hydra-http-form.h | 21 +++++ services/hydra-http-proxy-urlenum.h | 7 ++ services/hydra-http-proxy.h | 7 ++ services/hydra-http.h | 21 +++++ services/hydra-icq.h | 8 +- services/hydra-imap.h | 7 ++ services/hydra-irc.h | 7 ++ services/hydra-ldap.h | 28 +++++++ services/hydra-mssql.h | 8 +- services/hydra-mysql.h | 7 ++ services/hydra-ncp.h | 7 ++ services/hydra-nntp.h | 7 ++ services/hydra-oracle-listener.h | 7 ++ services/hydra-oracle-sid.h | 8 +- services/hydra-oracle.h | 7 ++ services/hydra-pcanywhere.h | 8 +- services/hydra-pcnfs.h | 8 +- services/hydra-pop3.h | 7 ++ services/hydra-postgres.h | 7 ++ services/hydra-rdp.h | 7 ++ services/hydra-redis.h | 8 +- services/hydra-rexec.h | 8 +- services/hydra-rlogin.h | 8 +- services/hydra-rpcap.h | 8 +- services/hydra-rsh.h | 8 +- services/hydra-rtsp.h | 8 +- services/hydra-s7-300.h | 7 ++ services/hydra-sapr3.h | 7 ++ services/hydra-sip.h | 8 +- services/hydra-smb.h | 14 ++++ services/hydra-smtp-enum.h | 7 ++ services/hydra-smtp.h | 7 ++ services/hydra-snmp.h | 7 ++ services/hydra-socks5.h | 8 +- services/hydra-ssh.h | 8 +- services/hydra-sshkey.h | 7 ++ services/hydra-svn.h | 7 ++ services/hydra-teamspeak.h | 8 +- services/hydra-telnet.h | 7 ++ services/hydra-vmauthd.h | 8 +- services/hydra-vnc.h | 8 +- services/hydra-xmpp.h | 7 ++ 51 files changed, 426 insertions(+), 84 deletions(-) diff --git a/hydra.c b/hydra.c index cb3df69..ed88f12 100644 --- a/hydra.c +++ b/hydra.c @@ -290,99 +290,95 @@ typedef void (*service_t)(char *ip, int sp, unsigned char options, char *miscptr typedef int (*service_init_t)(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); typedef void (*service_usage_t)(const char* service); -#define SERVICE2(name, func) { name, service_##func##_init, service_##func, NULL } -#define SERVICE(name) { #name, service_##name##_init, service_##name, NULL } -#define SERVICE3(name, func) { name, service_##func##_init, service_##func, usage_##func } - static const struct { const char* name; service_init_t init; service_t exec; service_usage_t usage; } services[] = { - SERVICE(adam6500), + SERVICE_ADAM6500, #ifdef LIBAFP - SERVICE(afp), + SERVICE_AFP, #endif - SERVICE(asterisk), - SERVICE3("cisco", cisco), - SERVICE3("cisco-enable", cisco_enable), - SERVICE3("cvs", cvs), + SERVICE_ASTERISK, + SERVICE_CISCO_ENABLE, + SERVICE_CISCO, + SERVICE_CVS, #ifdef LIBFIREBIRD - SERVICE3("firebird", firebird), + SERVICE_FIREBIRD, #endif - SERVICE(ftp), - { "ftps", service_ftp_init, service_ftps }, - { "http-get", service_http_init, service_http_get, usage_http }, - { "http-get-form", service_http_form_init, service_http_get_form, usage_http_form }, - { "http-head", service_http_init, service_http_head, NULL }, - { "http-form", service_http_form_init, NULL, usage_http_form }, - { "http-post", NULL, service_http_post, usage_http }, - { "http-post-form", service_http_form_init, service_http_post_form, usage_http_form }, - SERVICE3("http-proxy", http_proxy), - SERVICE3("http-proxy-urlenum", http_proxy_urlenum), - SERVICE(icq), - SERVICE3("imap", imap), - SERVICE3("irc", irc), - { "ldap2", service_ldap_init, service_ldap2, usage_ldap }, - { "ldap3", service_ldap_init, service_ldap3, usage_ldap }, - { "ldap3-crammd5", service_ldap_init, service_ldap3_cram_md5, usage_ldap }, - { "ldap3-digestmd5", service_ldap_init, service_ldap3_digest_md5, usage_ldap }, - SERVICE(mssql), + SERVICE_FTP, + SERVICE_FTPS, + SERVICE_HTTP_FORM, + SERVICE_HTTP_GET, + SERVICE_HTTP_GET_FORM, + SERVICE_HTTP_HEAD, + SERVICE_HTTP_POST, + SERVICE_HTTP_POST_FORM, + SERVICE_HTTP_PROXY_URLENUM, + SERVICE_HTTP_PROXY, + SERVICE_ICQ, + SERVICE_IMAP, + SERVICE_IRC, + SERVICE_LDAP2, + SERVICE_LDAP3, + SERVICE_LDAP3_CRAM_MD5, + SERVICE_LDAP3_DIGEST_MD5, + SERVICE_MSSQL, #ifdef HAVE_MATH_H - SERVICE3("mysql", mysql), + SERVICE_MYSQL, #endif #ifdef LIBNCP - SERVICE3("ncp", ncp), + SERVICE_NCP, #endif - SERVICE3("nntp", nntp), + SERVICE_NNTP, #ifdef LIBORACLE - SERVICE3("oracle", oracle), + SERVICE_ORACLE, #endif #ifdef LIBOPENSSL - SERVICE3("oracle-listener", oracle_listener), - SERVICE2("oracle-sid", oracle_sid), + SERVICE_ORACLE_LISTENER, + SERVICE_ORACLE_SID, #endif - SERVICE(pcanywhere), - SERVICE(pcnfs), - SERVICE3("pop3", pop3), + SERVICE_PCANYWHERE, + SERVICE_PCNFS, + SERVICE_POP3, #ifdef LIBPOSTGRES - SERVICE3("postgres", postgres), + SERVICE_POSTGRES, #endif - SERVICE(redis), - SERVICE(rexec), #ifdef LIBOPENSSL - SERVICE3("rdp", rdp), + SERVICE_RDP, #endif - SERVICE(rlogin), - SERVICE(rsh), - SERVICE(rtsp), - SERVICE(rpcap), - SERVICE3("s7-300", s7_300), + SERVICE_REDIS, + SERVICE_REXEC, + SERVICE_RLOGIN, + SERVICE_RPCAP, + SERVICE_RSH, + SERVICE_RTSP, + SERVICE_S7_300, #ifdef LIBSAPR3 - SERVICE3("sarp3", sapr3), + SERVICE_SAPR3, #endif #ifdef LIBOPENSSL - SERVICE(sip), - SERVICE3("smbnt", smb), - SERVICE3("smb", smb), + SERVICE_SIP, + SERVICE_SMB, + SERVICE_SMBNT, #endif - SERVICE3("smtp", smtp), - SERVICE3("smtp-enum", smtp_enum), - SERVICE3("snmp", snmp), - SERVICE(socks5), + SERVICE_SMTP, + SERVICE_SMTP_ENUM, + SERVICE_SNMP, + SERVICE_SOCKS5, #ifdef LIBSSH - { "ssh", NULL, service_ssh }, - SERVICE3("sshkey", sshkey), + SERVICE_SSH, + SERVICE_SSHKEY, #endif #ifdef LIBSVN - SERVICE3("svn", svn), + SERVICE_SVN, #endif - SERVICE(teamspeak), - SERVICE3("telnet", telnet), - SERVICE(vmauthd), - SERVICE(vnc), - { "xmpp", service_xmpp_init, NULL, usage_xmpp } + SERVICE_TEAMSPEAK, + SERVICE_TELNET, + SERVICE_VMAUTHD, + SERVICE_VNC, + SERVICE_XMPP }; diff --git a/services/hydra-adam6500.h b/services/hydra-adam6500.h index 7df03ca..c60c0a7 100644 --- a/services/hydra-adam6500.h +++ b/services/hydra-adam6500.h @@ -3,6 +3,7 @@ void service_adam6500(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); int service_adam6500_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); -void usage_adam6500(const char* service); + +#define SERVICE_ADAM6500 { "adam6500", service_adam6500_init, service_adam6500, NULL } #endif /* _HYDRA_SERVICE_ADAM6500_H_ */ diff --git a/services/hydra-afp.h b/services/hydra-afp.h index ae90af1..a06425e 100644 --- a/services/hydra-afp.h +++ b/services/hydra-afp.h @@ -3,6 +3,7 @@ void service_afp(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); int service_afp_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); -void usage_afp(const char* service); + +#define SERVICE_AFP { "afp", service_afp_init, service_afp, NULL } #endif /* _HYDRA_SERVICE_AFP_H_ */ diff --git a/services/hydra-asterisk.h b/services/hydra-asterisk.h index 885a97f..e4ff713 100644 --- a/services/hydra-asterisk.h +++ b/services/hydra-asterisk.h @@ -3,6 +3,7 @@ void service_asterisk(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); int service_asterisk_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); -void usage_asterisk(const char* service); + +#define SERVICE_ASTERISK { "asterisk", service_asterisk_init, service_asterisk, NULL } #endif /* _HYDRA_SERVICE_ASTERISK_H_ */ diff --git a/services/hydra-cisco-enable.h b/services/hydra-cisco-enable.h index 3b58cfc..1f15441 100644 --- a/services/hydra-cisco-enable.h +++ b/services/hydra-cisco-enable.h @@ -5,4 +5,6 @@ void service_cisco_enable(char *ip, int sp, unsigned char options, char *miscptr int service_cisco_enable_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); void usage_cisco_enable(const char* service); +#define SERVICE_CISCO_ENABLE { "cisco-enable", service_cisco_enable_init, service_cisco_enable, usage_cisco_enable } + #endif /* _HYDRA_SERVICE_CISCO_ENABLE_H_ */ diff --git a/services/hydra-cisco.h b/services/hydra-cisco.h index a96d23b..06c3ff9 100644 --- a/services/hydra-cisco.h +++ b/services/hydra-cisco.h @@ -5,4 +5,6 @@ void service_cisco(char *ip, int sp, unsigned char options, char *miscptr, FILE int service_cisco_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); void usage_cisco(const char* service); +#define SERVICE_CISCO { "cisco", service_cisco_init, service_cisco, usage_cisco } + #endif /* _HYDRA_SERVICE_CISCO_H_ */ diff --git a/services/hydra-cvs.h b/services/hydra-cvs.h index 94d5e4d..080b32e 100644 --- a/services/hydra-cvs.h +++ b/services/hydra-cvs.h @@ -5,4 +5,6 @@ void service_cvs(char *ip, int sp, unsigned char options, char *miscptr, FILE * int service_cvs_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); void usage_cvs(const char* service); +#define SERVICE_CVS { "cvs", service_cvs_init, service_cvs, usage_cvs } + #endif /* _HYDRA_SERVICE_CVS_H_ */ diff --git a/services/hydra-firebird.h b/services/hydra-firebird.h index c9d25c7..2107d61 100644 --- a/services/hydra-firebird.h +++ b/services/hydra-firebird.h @@ -5,4 +5,6 @@ void service_firebird(char *ip, int sp, unsigned char options, char *miscptr, FI int service_firebird_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); void usage_firebird(const char* service); +#define SERVICE_FIREBIRD { "firebird", service_firebird_init, service_firebird, usage_firebird } + #endif /* _HYDRA_SERVICE_FIREBIRD_H_ */ diff --git a/services/hydra-ftp.h b/services/hydra-ftp.h index 8db5eb0..bef8734 100644 --- a/services/hydra-ftp.h +++ b/services/hydra-ftp.h @@ -4,6 +4,8 @@ void service_ftp(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); void service_ftps(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); int service_ftp_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); -void usage_ftp(const char* service); + +#define SERVICE_FTP { "ftp", service_ftp_init, service_ftp, NULL } +#define SERVICE_FTPS { "ftps", service_ftp_init, service_ftps, NULL } #endif /* _HYDRA_SERVICE_FTP_H_ */ diff --git a/services/hydra-http-form.h b/services/hydra-http-form.h index eca7959..c7a97f5 100644 --- a/services/hydra-http-form.h +++ b/services/hydra-http-form.h @@ -6,4 +6,25 @@ void service_http_get_form(char *ip, int sp, unsigned char options, char *miscpt int service_http_form_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); void usage_http_form(const char* service); +#define SERVICE_HTTP_GET_FORM { \ + "http-get-form", \ + service_http_form_init, \ + service_http_get_form, \ + usage_http_form \ +} + +#define SERVICE_HTTP_POST_FORM { \ + "http-post-form", \ + service_http_form_init, \ + service_http_post_form, \ + usage_http_form \ +} + +#define SERVICE_HTTP_FORM { \ + "http-post-form", \ + service_http_form_init, \ + NULL, \ + usage_http_form \ +} + #endif /* _HYDRA_SERVICE_HTTP_FORM_H_ */ diff --git a/services/hydra-http-proxy-urlenum.h b/services/hydra-http-proxy-urlenum.h index 4f28b7a..5205681 100644 --- a/services/hydra-http-proxy-urlenum.h +++ b/services/hydra-http-proxy-urlenum.h @@ -5,4 +5,11 @@ void service_http_proxy_urlenum(char *ip, int sp, unsigned char options, char *m int service_http_proxy_urlenum_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); void usage_http_proxy_urlenum(const char* service); +#define SERVICE_HTTP_PROXY_URLENUM { \ + "http-proxy-urlenum", \ + service_http_proxy_urlenum_init, \ + service_http_proxy_urlenum, \ + usage_http_proxy_urlenum \ +} + #endif /* _HYDRA_SERVICE_HTTP_PROXY_URLENUM_H_ */ diff --git a/services/hydra-http-proxy.h b/services/hydra-http-proxy.h index 4c247cb..8efa56e 100644 --- a/services/hydra-http-proxy.h +++ b/services/hydra-http-proxy.h @@ -5,4 +5,11 @@ void service_http_proxy(char *ip, int sp, unsigned char options, char *miscptr, int service_http_proxy_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); void usage_http_proxy(const char* service); +#define SERVICE_HTTP_PROXY { \ + "http-proxy", \ + service_http_proxy_init, \ + service_http_proxy, \ + usage_http_proxy \ +} + #endif /* _HYDRA_SERVICE_HTTP_PROXY_H_ */ diff --git a/services/hydra-http.h b/services/hydra-http.h index a72871d..127e228 100644 --- a/services/hydra-http.h +++ b/services/hydra-http.h @@ -7,4 +7,25 @@ void service_http_post(char *ip, int sp, unsigned char options, char *miscptr, F int service_http_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); void usage_http(const char* service); +#define SERVICE_HTTP_GET { \ + "http-get", \ + service_http_init, \ + service_http_get, \ + usage_http \ +} + +#define SERVICE_HTTP_HEAD { \ + "http-head", \ + service_http_init, \ + service_http_head, \ + NULL \ +} + +#define SERVICE_HTTP_POST { \ + "http-post", \ + NULL, \ + service_http_post, \ + usage_http \ +} + #endif /* _HYDRA_SERVICE_HTTP_H_ */ diff --git a/services/hydra-icq.h b/services/hydra-icq.h index 1f64ddb..d4ed144 100644 --- a/services/hydra-icq.h +++ b/services/hydra-icq.h @@ -3,6 +3,12 @@ void service_icq(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); int service_icq_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); -void usage_icq(const char* service); + +#define SERVICE_ICQ { \ + "icq", \ + service_icq_init, \ + service_icq, \ + NULL \ +} #endif /* _HYDRA_SERVICE_ICQ_H_ */ diff --git a/services/hydra-imap.h b/services/hydra-imap.h index a766a57..02b828d 100644 --- a/services/hydra-imap.h +++ b/services/hydra-imap.h @@ -5,4 +5,11 @@ void service_imap(char *ip, int sp, unsigned char options, char *miscptr, FILE * int service_imap_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); void usage_imap(const char* service); +#define SERVICE_IMAP { \ + "imap", \ + service_imap_init, \ + service_imap, \ + usage_imap \ +} + #endif /* _HYDRA_SERVICE_IMAP_H_ */ diff --git a/services/hydra-irc.h b/services/hydra-irc.h index d5e7acd..f24a7aa 100644 --- a/services/hydra-irc.h +++ b/services/hydra-irc.h @@ -5,4 +5,11 @@ void service_irc(char *ip, int sp, unsigned char options, char *miscptr, FILE * int service_irc_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); void usage_irc(const char* service); +#define SERVICE_IRC { \ + "irc", \ + service_irc_init, \ + service_irc, \ + usage_irc \ +} + #endif /* _HYDRA_SERVICE_IRC_H_ */ diff --git a/services/hydra-ldap.h b/services/hydra-ldap.h index df5b80a..6cc7ad6 100644 --- a/services/hydra-ldap.h +++ b/services/hydra-ldap.h @@ -8,4 +8,32 @@ void service_ldap3_digest_md5(char *ip, int sp, unsigned char options, char *mis int service_ldap_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); void usage_ldap(const char* service); +#define SERVICE_LDAP2 { \ + "ldap2", \ + service_ldap_init, \ + service_ldap2, \ + usage_ldap \ +} + +#define SERVICE_LDAP3 { \ + "ldap3", \ + service_ldap_init, \ + service_ldap3, \ + usage_ldap \ +} + +#define SERVICE_LDAP3_CRAM_MD5 { \ + "ldap3-crammd5", \ + service_ldap_init, \ + service_ldap3_cram_md5, \ + usage_ldap \ +} + +#define SERVICE_LDAP3_DIGEST_MD5 { \ + "ldap3-digestmd5", \ + service_ldap_init, \ + service_ldap3_digest_md5, \ + usage_ldap \ +} + #endif /* _HYDRA_SERVICE_LDAP_H_ */ diff --git a/services/hydra-mssql.h b/services/hydra-mssql.h index e060fb7..9fd1aaa 100644 --- a/services/hydra-mssql.h +++ b/services/hydra-mssql.h @@ -3,6 +3,12 @@ void service_mssql(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); int service_mssql_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); -void usage_mssql(const char* service); + +#define SERVICE_MSSQL { \ + "mssql", \ + service_mssql_init, \ + service_mssql, \ + NULL \ +} #endif /* _HYDRA_SERVICE_MSSQL_H_ */ diff --git a/services/hydra-mysql.h b/services/hydra-mysql.h index d2452af..941d413 100644 --- a/services/hydra-mysql.h +++ b/services/hydra-mysql.h @@ -5,4 +5,11 @@ void service_mysql(char *ip, int sp, unsigned char options, char *miscptr, FILE int service_mysql_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); void usage_mysql(const char* service); +#define SERVICE_MYSQL { \ + "mysql", \ + service_mysql_init, \ + service_mysql, \ + usage_mysql \ +} + #endif /* _HYDRA_SERVICE_MYSQL_H_ */ diff --git a/services/hydra-ncp.h b/services/hydra-ncp.h index ee6dd85d..7db010b 100644 --- a/services/hydra-ncp.h +++ b/services/hydra-ncp.h @@ -5,4 +5,11 @@ void service_ncp(char *ip, int sp, unsigned char options, char *miscptr, FILE * int service_ncp_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); void usage_ncp(const char* service); +#define SERVICE_NCP { \ + "ncp", \ + service_ncp_init, \ + service_ncp, \ + usage_ncp \ +} + #endif /* _HYDRA_SERVICE_NCP_H_ */ diff --git a/services/hydra-nntp.h b/services/hydra-nntp.h index f63455c..47f3260 100644 --- a/services/hydra-nntp.h +++ b/services/hydra-nntp.h @@ -5,4 +5,11 @@ void service_nntp(char *ip, int sp, unsigned char options, char *miscptr, FILE * int service_nntp_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); void usage_nntp(const char* service); +#define SERVICE_NNTP { \ + "nntp", \ + service_nntp_init, \ + service_nntp, \ + usage_nntp \ +} + #endif /* _HYDRA_SERVICE_NNTP_H_ */ diff --git a/services/hydra-oracle-listener.h b/services/hydra-oracle-listener.h index 9bc93a0..6e371ca 100644 --- a/services/hydra-oracle-listener.h +++ b/services/hydra-oracle-listener.h @@ -5,4 +5,11 @@ void service_oracle_listener(char *ip, int sp, unsigned char options, char *misc int service_oracle_listener_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); void usage_oracle_listener(const char* service); +#define SERVICE_ORACLE_LISTENER { \ + "oracle-listener", \ + service_oracle_listener_init, \ + service_oracle_listener, \ + usage_oracle_listener \ +} + #endif /* _HYDRA_SERVICE_ORACLE_LISTENER_H_ */ diff --git a/services/hydra-oracle-sid.h b/services/hydra-oracle-sid.h index d9dd047..8a6386e 100644 --- a/services/hydra-oracle-sid.h +++ b/services/hydra-oracle-sid.h @@ -3,6 +3,12 @@ void service_oracle_sid(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); int service_oracle_sid_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); -void usage_oracle_sid(const char* service); + +#define SERVICE_ORACLE_SID { \ + "oracle-sid", \ + service_oracle_sid_init, \ + service_oracle_sid, \ + NULL \ +} #endif /* _HYDRA_SERVICE_ORACLE_SID_H_ */ diff --git a/services/hydra-oracle.h b/services/hydra-oracle.h index 44204a6..b67a150 100644 --- a/services/hydra-oracle.h +++ b/services/hydra-oracle.h @@ -5,4 +5,11 @@ void service_oracle(char *ip, int sp, unsigned char options, char *miscptr, FILE int service_oracle_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); void usage_oracle(const char* service); +#define SERVICE_ORACLE { \ + "oracle", \ + service_oracle_init, \ + service_oracle, \ + usage_oracle \ +} + #endif /* _HYDRA_SERVICE_ORACLE_H_ */ diff --git a/services/hydra-pcanywhere.h b/services/hydra-pcanywhere.h index 8532223..5210eea 100644 --- a/services/hydra-pcanywhere.h +++ b/services/hydra-pcanywhere.h @@ -3,6 +3,12 @@ void service_pcanywhere(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); int service_pcanywhere_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); -void usage_pcanywhere(const char* service); + +#define SERVICE_PCANYWHERE { \ + "pcanywhere", \ + service_pcanywhere_init, \ + service_pcanywhere, \ + NULL \ +} #endif /* _HYDRA_SERVICE_PCANYWHERE_H_ */ diff --git a/services/hydra-pcnfs.h b/services/hydra-pcnfs.h index 36836f0..34202fd 100644 --- a/services/hydra-pcnfs.h +++ b/services/hydra-pcnfs.h @@ -3,6 +3,12 @@ void service_pcnfs(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); int service_pcnfs_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); -void usage_pcnfs(const char* service); + +#define SERVICE_PCNFS { \ + "pcnfs", \ + service_pcnfs_init, \ + service_pcnfs, \ + NULL \ +} #endif /* _HYDRA_SERVICE_PCNFS_H_ */ diff --git a/services/hydra-pop3.h b/services/hydra-pop3.h index b306729..5de3600 100644 --- a/services/hydra-pop3.h +++ b/services/hydra-pop3.h @@ -5,4 +5,11 @@ void service_pop3(char *ip, int sp, unsigned char options, char *miscptr, FILE * int service_pop3_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); void usage_pop3(const char* service); +#define SERVICE_POP3 { \ + "pop3", \ + service_pop3_init, \ + service_pop3, \ + usage_pop3 \ +} + #endif /* _HYDRA_SERVICE_POP3_H_ */ diff --git a/services/hydra-postgres.h b/services/hydra-postgres.h index b1c4dc4..508fef1 100644 --- a/services/hydra-postgres.h +++ b/services/hydra-postgres.h @@ -5,4 +5,11 @@ void service_postgres(char *ip, int sp, unsigned char options, char *miscptr, FI int service_postgres_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); void usage_postgres(const char* service); +#define SERVICE_POSTGRES { \ + "postgres", \ + service_postgres_init, \ + service_postgres, \ + usage_postgres \ +} + #endif /* _HYDRA_SERVICE_POSTGRES_H_ */ diff --git a/services/hydra-rdp.h b/services/hydra-rdp.h index 36ea4fb..9aa7bf7 100644 --- a/services/hydra-rdp.h +++ b/services/hydra-rdp.h @@ -5,4 +5,11 @@ void service_rdp(char *ip, int sp, unsigned char options, char *miscptr, FILE * int service_rdp_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); void usage_rdp(const char* service); +#define SERVICE_RDP { \ + "rdp", \ + service_rdp_init, \ + service_rdp, \ + usage_rdp \ +} + #endif /* _HYDRA_SERVICE_RDP_H_ */ diff --git a/services/hydra-redis.h b/services/hydra-redis.h index b01f238..69cfb64 100644 --- a/services/hydra-redis.h +++ b/services/hydra-redis.h @@ -3,6 +3,12 @@ void service_redis(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); int service_redis_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); -void usage_redis(const char* service); + +#define SERVICE_REDIS { \ + "redis", \ + service_redis_init, \ + service_redis, \ + NULL \ +} #endif /* _HYDRA_SERVICE_REDIS_H_ */ diff --git a/services/hydra-rexec.h b/services/hydra-rexec.h index a453e76..b03be96 100644 --- a/services/hydra-rexec.h +++ b/services/hydra-rexec.h @@ -3,6 +3,12 @@ void service_rexec(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); int service_rexec_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); -void usage_rexec(const char* service); + +#define SERVICE_REXEC { \ + "rexec", \ + service_rexec_init, \ + service_rexec, \ + NULL \ +} #endif /* _HYDRA_SERVICE_REXEC_H_ */ diff --git a/services/hydra-rlogin.h b/services/hydra-rlogin.h index c05674c..8ce5de4 100644 --- a/services/hydra-rlogin.h +++ b/services/hydra-rlogin.h @@ -3,6 +3,12 @@ void service_rlogin(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); int service_rlogin_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); -void usage_rlogin(const char* service); + +#define SERVICE_RLOGIN { \ + "rlogin", \ + service_rlogin_init, \ + service_rlogin, \ + NULL \ +} #endif /* _HYDRA_SERVICE_RLOGIN_H_ */ diff --git a/services/hydra-rpcap.h b/services/hydra-rpcap.h index 8a09b3f..bcf139e 100644 --- a/services/hydra-rpcap.h +++ b/services/hydra-rpcap.h @@ -3,6 +3,12 @@ void service_rpcap(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); int service_rpcap_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); -void usage_rpcap(const char* service); + +#define SERVICE_RPCAP { \ + "rpcap", \ + service_rpcap_init, \ + service_rpcap, \ + NULL \ +} #endif /* _HYDRA_SERVICE_RPCAP_H_ */ diff --git a/services/hydra-rsh.h b/services/hydra-rsh.h index 04fe785..d13aecc 100644 --- a/services/hydra-rsh.h +++ b/services/hydra-rsh.h @@ -3,6 +3,12 @@ void service_rsh(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); int service_rsh_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); -void usage_rsh(const char* service); + +#define SERVICE_RSH { \ + "rsh", \ + service_rsh_init, \ + service_rsh, \ + NULL \ +} #endif /* _HYDRA_SERVICE_RSH_H_ */ diff --git a/services/hydra-rtsp.h b/services/hydra-rtsp.h index ca4d275..8519721 100644 --- a/services/hydra-rtsp.h +++ b/services/hydra-rtsp.h @@ -3,6 +3,12 @@ void service_rtsp(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); int service_rtsp_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); -void usage_rtsp(const char* service); + +#define SERVICE_RTSP { \ + "rtsp", \ + service_rtsp_init, \ + service_rtsp, \ + NULL \ +} #endif /* _HYDRA_SERVICE_RTSP_H_ */ diff --git a/services/hydra-s7-300.h b/services/hydra-s7-300.h index b5f7b05..141267f 100644 --- a/services/hydra-s7-300.h +++ b/services/hydra-s7-300.h @@ -5,4 +5,11 @@ void service_s7_300(char *ip, int sp, unsigned char options, char *miscptr, FILE int service_s7_300_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); void usage_s7_300(const char* service); +#define SERVICE_S7_300 { \ + "s7-300", \ + service_s7_300_init, \ + service_s7_300, \ + usage_s7_300 \ +} + #endif /* _HYDRA_SERVICE_S7_300_H_ */ diff --git a/services/hydra-sapr3.h b/services/hydra-sapr3.h index aba0f32..59cb31e 100644 --- a/services/hydra-sapr3.h +++ b/services/hydra-sapr3.h @@ -5,4 +5,11 @@ void service_sapr3(char *ip, int sp, unsigned char options, char *miscptr, FILE int service_sapr3_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); void usage_sapr3(const char* service); +#define SERVICE_SAPR3 { \ + "sapr3", \ + service_sapr3_init, \ + service_sapr3, \ + usage_sapr3 \ +} + #endif /* _HYDRA_SERVICE_SAPR3_H_ */ diff --git a/services/hydra-sip.h b/services/hydra-sip.h index 71a5331..9d9b215 100644 --- a/services/hydra-sip.h +++ b/services/hydra-sip.h @@ -3,6 +3,12 @@ void service_sip(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); int service_sip_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); -void usage_sip(const char* service); + +#define SERVICE_SIP { \ + "sip", \ + service_sip_init, \ + service_sip, \ + NULL \ +} #endif /* _HYDRA_SERVICE_SIP_H_ */ diff --git a/services/hydra-smb.h b/services/hydra-smb.h index b7593d8..1237563 100644 --- a/services/hydra-smb.h +++ b/services/hydra-smb.h @@ -5,4 +5,18 @@ void service_smb(char *ip, int sp, unsigned char options, char *miscptr, FILE * int service_smb_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); void usage_smb(const char* service); +#define SERVICE_SMB { \ + "smb", \ + service_smb_init, \ + service_smb, \ + usage_smb \ +} + +#define SERVICE_SMBNT { \ + "smbnt", \ + service_smb_init, \ + service_smb, \ + usage_smb \ +} + #endif /* _HYDRA_SERVICE_SMB_H_ */ diff --git a/services/hydra-smtp-enum.h b/services/hydra-smtp-enum.h index 7e3f81e..0cb1c35 100644 --- a/services/hydra-smtp-enum.h +++ b/services/hydra-smtp-enum.h @@ -5,4 +5,11 @@ void service_smtp_enum(char *ip, int sp, unsigned char options, char *miscptr, F int service_smtp_enum_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); void usage_smtp_enum(const char* service); +#define SERVICE_SMTP_ENUM { \ + "smtp-enum", \ + service_smtp_enum_init, \ + service_smtp_enum, \ + usage_smtp_enum \ +} + #endif /* _HYDRA_SERVICE_SMTP_ENUM_H_ */ diff --git a/services/hydra-smtp.h b/services/hydra-smtp.h index 44045a5..e5db5fa 100644 --- a/services/hydra-smtp.h +++ b/services/hydra-smtp.h @@ -5,4 +5,11 @@ void service_smtp(char *ip, int sp, unsigned char options, char *miscptr, FILE * int service_smtp_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); void usage_smtp(const char* service); +#define SERVICE_SMTP { \ + "smtp", \ + service_smtp_init, \ + service_smtp, \ + usage_smtp \ +} + #endif /* _HYDRA_SERVICE_SMTP_H_ */ diff --git a/services/hydra-snmp.h b/services/hydra-snmp.h index 936fcee..c13b97b 100644 --- a/services/hydra-snmp.h +++ b/services/hydra-snmp.h @@ -5,4 +5,11 @@ void service_snmp(char *ip, int sp, unsigned char options, char *miscptr, FILE * int service_snmp_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); void usage_snmp(const char* service); +#define SERVICE_SNMP { \ + "snmp", \ + service_snmp_init, \ + service_snmp, \ + usage_snmp \ +} + #endif /* _HYDRA_SERVICE_SNMP_H_ */ diff --git a/services/hydra-socks5.h b/services/hydra-socks5.h index 4d82a71..b5c8ca6 100644 --- a/services/hydra-socks5.h +++ b/services/hydra-socks5.h @@ -3,6 +3,12 @@ void service_socks5(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); int service_socks5_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); -void usage_socks5(const char* service); + +#define SERVICE_SOCKS5 { \ + "socks5", \ + service_socks5_init, \ + service_socks5, \ + NULL \ +} #endif /* _HYDRA_SERVICE_SOCKS5_H_ */ diff --git a/services/hydra-ssh.h b/services/hydra-ssh.h index b181463..4261677 100644 --- a/services/hydra-ssh.h +++ b/services/hydra-ssh.h @@ -3,6 +3,12 @@ void service_ssh(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); int service_ssh_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); -void usage_ssh(const char* service); + +#define SERVICE_SSH { \ + "ssh", \ + service_ssh_init, \ + NULL, \ + NULL \ +} #endif /* _HYDRA_SERVICE_SSH_H_ */ diff --git a/services/hydra-sshkey.h b/services/hydra-sshkey.h index fd30ef1..3450bcf 100644 --- a/services/hydra-sshkey.h +++ b/services/hydra-sshkey.h @@ -5,4 +5,11 @@ void service_sshkey(char *ip, int sp, unsigned char options, char *miscptr, FILE int service_sshkey_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); void usage_sshkey(const char* service); +#define SERVICE_SSHKEY { \ + "sshkey", \ + service_sshkey_init, \ + service_sshkey, \ + usage_sshkey \ +} + #endif /* _HYDRA_SERVICE_SSHKEY_H_ */ diff --git a/services/hydra-svn.h b/services/hydra-svn.h index fcc1491..c110d3a 100644 --- a/services/hydra-svn.h +++ b/services/hydra-svn.h @@ -5,4 +5,11 @@ void service_svn(char *ip, int sp, unsigned char options, char *miscptr, FILE * int service_svn_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); void usage_svn(const char* service); +#define SERVICE_SVN { \ + "svn", \ + service_svn_init, \ + service_svn, \ + usage_svn \ +} + #endif /* _HYDRA_SERVICE_SVN_H_ */ diff --git a/services/hydra-teamspeak.h b/services/hydra-teamspeak.h index d94ba44..4c6efc3 100644 --- a/services/hydra-teamspeak.h +++ b/services/hydra-teamspeak.h @@ -3,6 +3,12 @@ void service_teamspeak(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); int service_teamspeak_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); -void usage_teamspeak(const char* service); + +#define SERVICE_TEAMSPEAK { \ + "teamspeak", \ + service_teamspeak_init, \ + service_teamspeak, \ + NULL \ +} #endif /* _HYDRA_SERVICE_TEAMSPEAK_H_ */ diff --git a/services/hydra-telnet.h b/services/hydra-telnet.h index b20c26a..519fdc9 100644 --- a/services/hydra-telnet.h +++ b/services/hydra-telnet.h @@ -5,4 +5,11 @@ void service_telnet(char *ip, int sp, unsigned char options, char *miscptr, FILE int service_telnet_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); void usage_telnet(const char* service); +#define SERVICE_TELNET { \ + "telnet", \ + service_telnet_init, \ + service_telnet, \ + usage_telnet \ +} + #endif /* _HYDRA_SERVICE_TELNET_H_ */ diff --git a/services/hydra-vmauthd.h b/services/hydra-vmauthd.h index 4e9143a..deb0c2c 100644 --- a/services/hydra-vmauthd.h +++ b/services/hydra-vmauthd.h @@ -3,6 +3,12 @@ void service_vmauthd(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); int service_vmauthd_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); -void usage_vmauthd(const char* service); + +#define SERVICE_VMAUTHD { \ + "vmauthd", \ + service_vmauthd_init, \ + service_vmauthd, \ + NULL \ +} #endif /* _HYDRA_SERVICE_VMAUTHD_H_ */ diff --git a/services/hydra-vnc.h b/services/hydra-vnc.h index 88529b7..2396d2a 100644 --- a/services/hydra-vnc.h +++ b/services/hydra-vnc.h @@ -3,6 +3,12 @@ void service_vnc(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); int service_vnc_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); -void usage_vnc(const char* service); + +#define SERVICE_VNC { \ + "vnc", \ + service_vnc_init, \ + service_vnc, \ + NULL \ +} #endif /* _HYDRA_SERVICE_VNC_H_ */ diff --git a/services/hydra-xmpp.h b/services/hydra-xmpp.h index 16ccd4d..45281c2 100644 --- a/services/hydra-xmpp.h +++ b/services/hydra-xmpp.h @@ -5,4 +5,11 @@ void service_xmpp(char *target, char *ip, int sp, unsigned char options, char *m int service_xmpp_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname); void usage_xmpp(const char* service); +#define SERVICE_XMPP { \ + "xmpp", \ + service_xmpp_init, \ + NULL, \ + usage_xmpp \ +} + #endif /* _HYDRA_SERVICE_XMPP_H_ */