mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 02:28:21 +00:00
Removing all Analyzer::Available() methods.
This commit is contained in:
parent
40ca718e90
commit
b122b39874
38 changed files with 0 additions and 208 deletions
|
@ -15,10 +15,6 @@ public:
|
|||
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
{ return new AYIYA_Analyzer(conn); }
|
||||
|
||||
static bool Available()
|
||||
{ return BifConst::Tunnel::enable_ayiya &&
|
||||
BifConst::Tunnel::max_depth > 0; }
|
||||
|
||||
protected:
|
||||
friend class AnalyzerTimer;
|
||||
void ExpireTimer(double t);
|
||||
|
|
|
@ -74,15 +74,6 @@ public:
|
|||
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
{ return new BackDoor_Analyzer(conn); }
|
||||
|
||||
static bool Available()
|
||||
{
|
||||
return backdoor_stats || rlogin_signature_found ||
|
||||
telnet_signature_found || ssh_signature_found ||
|
||||
root_backdoor_signature_found || ftp_signature_found ||
|
||||
napster_signature_found || kazaa_signature_found ||
|
||||
http_signature_found || http_proxy_signature_found;
|
||||
}
|
||||
|
||||
protected:
|
||||
// We support both packet and stream input, and can be instantiated
|
||||
// even if the TCP analyzer is not yet reassembling.
|
||||
|
|
|
@ -20,9 +20,6 @@ public:
|
|||
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
{ return new BitTorrent_Analyzer(conn); }
|
||||
|
||||
static bool Available()
|
||||
{ return bittorrent_peer_handshake || bittorrent_peer_piece; }
|
||||
|
||||
protected:
|
||||
void DeliverWeird(const char* msg, bool orig);
|
||||
|
||||
|
|
|
@ -53,9 +53,6 @@ public:
|
|||
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
{ return new BitTorrentTracker_Analyzer(conn); }
|
||||
|
||||
static bool Available()
|
||||
{ return bt_tracker_request || bt_tracker_response; }
|
||||
|
||||
protected:
|
||||
void ClientRequest(int len, const u_char* data);
|
||||
void ServerReply(int len, const u_char* data);
|
||||
|
|
|
@ -23,8 +23,6 @@ public:
|
|||
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
{ return new ConnSize_Analyzer(conn); }
|
||||
|
||||
static bool Available() { return BifConst::use_conn_size_analyzer ; }
|
||||
|
||||
protected:
|
||||
virtual void DeliverPacket(int len, const u_char* data, bool is_orig,
|
||||
int seq, const IP_Hdr* ip, int caplen);
|
||||
|
|
|
@ -177,9 +177,6 @@ public:
|
|||
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
{ return new DCE_RPC_Analyzer(conn); }
|
||||
|
||||
static bool Available()
|
||||
{ return DCE_RPC_Session::any_dce_rpc_event(); }
|
||||
|
||||
protected:
|
||||
DCE_RPC_Session* session;
|
||||
bool speculative;
|
||||
|
|
|
@ -18,9 +18,6 @@ public:
|
|||
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
{ return new DHCP_Analyzer_binpac(conn); }
|
||||
|
||||
static bool Available()
|
||||
{ return dhcp_request; }
|
||||
|
||||
protected:
|
||||
binpac::DHCP::DHCP_Conn* interp;
|
||||
};
|
||||
|
|
|
@ -269,11 +269,6 @@ public:
|
|||
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
{ return new DNS_Analyzer(conn); }
|
||||
|
||||
static bool Available()
|
||||
{
|
||||
return (dns_request || dns_full_request);
|
||||
}
|
||||
|
||||
protected:
|
||||
DNS_Interpreter* interp;
|
||||
Contents_DNS* contents_dns_orig;
|
||||
|
|
|
@ -18,9 +18,6 @@ public:
|
|||
return new FTP_Analyzer(conn);
|
||||
}
|
||||
|
||||
static bool Available() { return ftp_request || ftp_reply; }
|
||||
|
||||
|
||||
protected:
|
||||
NVT_Analyzer* nvt_orig;
|
||||
NVT_Analyzer* nvt_resp;
|
||||
|
|
|
@ -18,8 +18,6 @@ public:
|
|||
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
{ return new File_Analyzer(conn); }
|
||||
|
||||
static bool Available() { return file_transferred; }
|
||||
|
||||
protected:
|
||||
void Identify();
|
||||
|
||||
|
|
|
@ -19,8 +19,6 @@ public:
|
|||
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
{ return new Finger_Analyzer(conn); }
|
||||
|
||||
static bool Available() { return finger_request || finger_reply; }
|
||||
|
||||
protected:
|
||||
ContentLine_Analyzer* content_line_orig;
|
||||
ContentLine_Analyzer* content_line_resp;
|
||||
|
|
|
@ -15,10 +15,6 @@ public:
|
|||
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
{ return new GTPv1_Analyzer(conn); }
|
||||
|
||||
static bool Available()
|
||||
{ return BifConst::Tunnel::enable_gtpv1 &&
|
||||
BifConst::Tunnel::max_depth > 0; }
|
||||
|
||||
protected:
|
||||
friend class AnalyzerTimer;
|
||||
void ExpireTimer(double t);
|
||||
|
|
|
@ -43,13 +43,6 @@ public:
|
|||
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
{ return new Gnutella_Analyzer(conn); }
|
||||
|
||||
static bool Available()
|
||||
{
|
||||
return gnutella_text_msg || gnutella_binary_msg ||
|
||||
gnutella_partial_binary_msg || gnutella_establish ||
|
||||
gnutella_not_establish || gnutella_http_notify;
|
||||
}
|
||||
|
||||
private:
|
||||
int NextLine(const u_char* data, int len);
|
||||
|
||||
|
|
|
@ -22,8 +22,6 @@ public:
|
|||
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
{ return new ICMP_Analyzer(conn); }
|
||||
|
||||
static bool Available() { return true; }
|
||||
|
||||
protected:
|
||||
ICMP_Analyzer(analyzer::Tag tag, Connection* conn);
|
||||
|
||||
|
|
32
src/IRC.cc
32
src/IRC.cc
|
@ -22,38 +22,6 @@ IRC_Analyzer::IRC_Analyzer(Connection* conn)
|
|||
AddSupportAnalyzer(new ContentLine_Analyzer(conn, false));
|
||||
}
|
||||
|
||||
bool IRC_Analyzer::Available()
|
||||
{
|
||||
static bool did_avail = false;
|
||||
static bool avail = false;
|
||||
|
||||
if ( ! did_avail )
|
||||
{
|
||||
// It's a lot of events, but for consistency with other
|
||||
// analyzers we need to check for all of them.
|
||||
avail = irc_request || irc_reply ||
|
||||
irc_message || irc_quit_message ||
|
||||
irc_privmsg_message || irc_notice_message ||
|
||||
irc_squery_message || irc_join_message ||
|
||||
irc_part_message || irc_nick_message ||
|
||||
irc_invalid_nick || irc_network_info ||
|
||||
irc_server_info || irc_channel_info || irc_who_line ||
|
||||
irc_who_message || irc_whois_message ||
|
||||
irc_whois_user_line || irc_whois_operator_line ||
|
||||
irc_whois_channel_line || irc_oper_message ||
|
||||
irc_oper_response || irc_kick_message ||
|
||||
irc_error_message || irc_invite_message ||
|
||||
irc_mode_message || irc_squit_message ||
|
||||
irc_names_info || irc_dcc_message ||
|
||||
irc_global_users || irc_user_message ||
|
||||
irc_channel_topic || irc_password_message;
|
||||
|
||||
did_avail = true;
|
||||
}
|
||||
|
||||
return avail;
|
||||
}
|
||||
|
||||
void IRC_Analyzer::Done()
|
||||
{
|
||||
TCP_ApplicationAnalyzer::Done();
|
||||
|
|
|
@ -35,8 +35,6 @@ public:
|
|||
return new IRC_Analyzer(conn);
|
||||
}
|
||||
|
||||
static bool Available();
|
||||
|
||||
protected:
|
||||
int orig_status;
|
||||
int orig_zip_status;
|
||||
|
|
|
@ -16,9 +16,6 @@ public:
|
|||
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
{ return new Ident_Analyzer(conn); }
|
||||
|
||||
static bool Available()
|
||||
{ return ident_request || ident_reply || ident_error; }
|
||||
|
||||
protected:
|
||||
const char* ParsePair(const char* line, const char* end_of_line,
|
||||
int& p1, int &p2);
|
||||
|
|
|
@ -50,8 +50,6 @@ public:
|
|||
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
{ return new InterConn_Analyzer(conn); }
|
||||
|
||||
static bool Available() { return interconn_stats; }
|
||||
|
||||
protected:
|
||||
// We support both packet and stream input and can be put in place even
|
||||
// if the TCP analyzer is not yet reassembling.
|
||||
|
|
33
src/Modbus.h
33
src/Modbus.h
|
@ -18,39 +18,6 @@ public:
|
|||
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
{ return new ModbusTCP_Analyzer(conn); }
|
||||
|
||||
// Put event names in this function
|
||||
static bool Available()
|
||||
{
|
||||
return modbus_message
|
||||
| modbus_exception
|
||||
| modbus_read_coils_request
|
||||
| modbus_read_coils_response
|
||||
| modbus_read_discrete_inputs_request
|
||||
| modbus_read_discrete_inputs_response
|
||||
| modbus_read_holding_registers_request
|
||||
| modbus_read_holding_registers_response
|
||||
| modbus_read_input_registers_request
|
||||
| modbus_read_input_registers_response
|
||||
| modbus_write_single_coil_request
|
||||
| modbus_write_single_coil_response
|
||||
| modbus_write_single_register_request
|
||||
| modbus_write_single_register_response
|
||||
| modbus_write_multiple_coils_request
|
||||
| modbus_write_multiple_coils_response
|
||||
| modbus_write_multiple_registers_request
|
||||
| modbus_write_multiple_registers_response
|
||||
| modbus_read_file_record_request
|
||||
| modbus_read_file_record_response
|
||||
| modbus_write_file_record_request
|
||||
| modbus_write_file_record_response
|
||||
| modbus_mask_write_register_request
|
||||
| modbus_mask_write_register_response
|
||||
| modbus_read_write_multiple_registers_request
|
||||
| modbus_read_write_multiple_registers_response
|
||||
| modbus_read_fifo_queue_request
|
||||
| modbus_read_fifo_queue_response;
|
||||
}
|
||||
|
||||
protected:
|
||||
binpac::ModbusTCP::ModbusTCP_Conn* interp;
|
||||
};
|
||||
|
|
|
@ -105,8 +105,6 @@ public:
|
|||
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
{ return new NCP_Analyzer(conn); }
|
||||
|
||||
static bool Available() { return NCP_Session::any_ncp_event(); }
|
||||
|
||||
protected:
|
||||
|
||||
NCP_Session* session;
|
||||
|
|
10
src/NFS.h
10
src/NFS.h
|
@ -77,16 +77,6 @@ public:
|
|||
|
||||
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
{ return new NFS_Analyzer(conn); }
|
||||
|
||||
static bool Available()
|
||||
{
|
||||
return ( nfs_proc_null || nfs_proc_not_implemented || nfs_proc_getattr ||
|
||||
nfs_proc_lookup || nfs_proc_read || nfs_proc_readlink ||
|
||||
nfs_proc_write || nfs_proc_create || nfs_proc_mkdir ||
|
||||
nfs_proc_remove || nfs_proc_rmdir || nfs_proc_readdir ||
|
||||
nfs_reply_status ||
|
||||
rpc_dialogue || rpc_call || rpc_reply );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -42,8 +42,6 @@ public:
|
|||
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
{ return new NTP_Analyzer(conn); }
|
||||
|
||||
static bool Available() { return ntp_message; }
|
||||
|
||||
protected:
|
||||
virtual void Done();
|
||||
virtual void DeliverPacket(int len, const u_char* data, bool orig,
|
||||
|
|
|
@ -160,13 +160,6 @@ public:
|
|||
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
{ return new NetbiosSSN_Analyzer(conn); }
|
||||
|
||||
static bool Available()
|
||||
{
|
||||
return NetbiosSSN_Interpreter::any_netbios_ssn_event() ||
|
||||
SMB_Session::any_smb_event() ||
|
||||
DCE_RPC_Session::any_dce_rpc_event();
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual void ConnectionClosed(TCP_Endpoint* endpoint,
|
||||
TCP_Endpoint* peer, int gen_event);
|
||||
|
|
|
@ -37,8 +37,6 @@ public:
|
|||
// as pointer to an Analyzer.
|
||||
analyzer::Analyzer* AsAnalyzer() { return as_analyzer; }
|
||||
|
||||
static bool Available() { return true; }
|
||||
|
||||
protected:
|
||||
void PIA_Done();
|
||||
void PIA_DeliverPacket(int len, const u_char* data, bool is_orig,
|
||||
|
|
|
@ -73,11 +73,6 @@ public:
|
|||
return new POP3_Analyzer(conn);
|
||||
}
|
||||
|
||||
static bool Available()
|
||||
{
|
||||
return pop3_request || pop3_reply || pop3_data || pop3_unexpected;
|
||||
}
|
||||
|
||||
protected:
|
||||
int masterState;
|
||||
int subState;
|
||||
|
|
|
@ -31,9 +31,6 @@ public:
|
|||
|
||||
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
{ return new Portmapper_Analyzer(conn); }
|
||||
|
||||
static bool Available()
|
||||
{ return pm_request || rpc_call; }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -50,9 +50,6 @@ public:
|
|||
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
{ return new Rsh_Analyzer(conn); }
|
||||
|
||||
static bool Available()
|
||||
{ return login_failure || login_success || login_input_line || login_output_line; }
|
||||
|
||||
Contents_Rsh_Analyzer* contents_orig;
|
||||
Contents_Rsh_Analyzer* contents_resp;
|
||||
};
|
||||
|
|
|
@ -62,12 +62,6 @@ public:
|
|||
|
||||
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
{ return new Rlogin_Analyzer(conn); }
|
||||
|
||||
static bool Available()
|
||||
{
|
||||
return login_failure || login_success ||
|
||||
login_input_line || login_output_line;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -198,12 +198,6 @@ public:
|
|||
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
{ return new SMB_Analyzer(conn); }
|
||||
|
||||
static bool Available()
|
||||
{
|
||||
return SMB_Session::any_smb_event() ||
|
||||
DCE_RPC_Session::any_dce_rpc_event();
|
||||
}
|
||||
|
||||
protected:
|
||||
SMB_Session* smb_session;
|
||||
Contents_SMB* o_smb;
|
||||
|
|
|
@ -52,12 +52,6 @@ public:
|
|||
return new SMTP_Analyzer(conn);
|
||||
}
|
||||
|
||||
static bool Available()
|
||||
{
|
||||
return smtp_request || smtp_reply ||
|
||||
smtp_data || smtp_unexpected;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
void ProcessLine(int length, const char* line, bool orig);
|
||||
|
|
|
@ -28,11 +28,6 @@ public:
|
|||
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
{ return new SOCKS_Analyzer(conn); }
|
||||
|
||||
static bool Available()
|
||||
{
|
||||
return socks_request || socks_reply;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
bool orig_done;
|
||||
|
|
|
@ -15,9 +15,6 @@ public:
|
|||
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
{ return new SSH_Analyzer(conn); }
|
||||
|
||||
static bool Available()
|
||||
{ return ssh_client_version || ssh_server_version; }
|
||||
|
||||
private:
|
||||
ContentLine_Analyzer* orig;
|
||||
ContentLine_Analyzer* resp;
|
||||
|
|
|
@ -54,8 +54,6 @@ public:
|
|||
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
{ return new SteppingStone_Analyzer(conn); }
|
||||
|
||||
static bool Available() { return stp_correlate_pair; }
|
||||
|
||||
protected:
|
||||
// We support both packet and stream input and can be put in place even
|
||||
// if the TCP analyzer is not yet reassebmling.
|
||||
|
|
|
@ -18,9 +18,6 @@ public:
|
|||
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
{ return new Syslog_Analyzer_binpac(conn); }
|
||||
|
||||
static bool Available()
|
||||
{ return syslog_message; }
|
||||
|
||||
protected:
|
||||
friend class AnalyzerTimer;
|
||||
void ExpireTimer(double t);
|
||||
|
@ -45,9 +42,6 @@ protected:
|
|||
// static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
// { return new Syslog_TCP_Analyzer_binpac(conn); }
|
||||
//
|
||||
// static bool Available()
|
||||
// { return (Syslog_request || Syslog_full_request); }
|
||||
//
|
||||
//protected:
|
||||
// binpac::Syslog_on_TCP::Syslog_TCP_Conn* interp;
|
||||
//};
|
||||
|
|
|
@ -91,8 +91,6 @@ public:
|
|||
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
{ return new TCP_Analyzer(conn); }
|
||||
|
||||
static bool Available() { return true; }
|
||||
|
||||
protected:
|
||||
friend class TCP_ApplicationAnalyzer;
|
||||
friend class TCP_Reassembler;
|
||||
|
@ -365,8 +363,6 @@ public:
|
|||
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
{ return new TCPStats_Analyzer(conn); }
|
||||
|
||||
static bool Available() { return conn_stats || tcp_rexmit; }
|
||||
|
||||
protected:
|
||||
virtual void DeliverPacket(int len, const u_char* data, bool is_orig,
|
||||
int seq, const IP_Hdr* ip, int caplen);
|
||||
|
|
|
@ -12,12 +12,6 @@ public:
|
|||
|
||||
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
{ return new Telnet_Analyzer(conn); }
|
||||
|
||||
static bool Available()
|
||||
{
|
||||
return login_failure || login_success ||
|
||||
login_input_line || login_output_line;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -22,10 +22,6 @@ public:
|
|||
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
{ return new Teredo_Analyzer(conn); }
|
||||
|
||||
static bool Available()
|
||||
{ return BifConst::Tunnel::enable_teredo &&
|
||||
BifConst::Tunnel::max_depth > 0; }
|
||||
|
||||
/**
|
||||
* Emits a weird only if the analyzer has previously been able to
|
||||
* decapsulate a Teredo packet in both directions or if *force* param is
|
||||
|
|
|
@ -23,8 +23,6 @@ public:
|
|||
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
|
||||
{ return new UDP_Analyzer(conn); }
|
||||
|
||||
static bool Available() { return true; }
|
||||
|
||||
protected:
|
||||
virtual void Done();
|
||||
virtual void DeliverPacket(int len, const u_char* data, bool orig,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue