|
ekg2
GIT master
|
#include "ekg2.h"#include <stdio.h>#include <string.h>#include <pcap.h>#include <errno.h>#include <sys/types.h>#include <sys/socket.h>#include <netinet/in.h>#include <arpa/inet.h>#include "sniff_ip.h"#include "sniff_gg.h"#include "sniff_dns.h"#include "sniff_rivchat.h"#include "sniff_dns.inc"#include "sniff_gg.inc"#include "sniff_rivchat.inc"
Struktury danych | |
| struct | connection_t |
Definicje | |
| #define | SNAPLEN 2000 |
| #define | PROMISC 0 |
| #define | GET_DEV(s) ((pcap_t *) ((session_t *) s)->priv) |
| #define | MAX_BYTES_PER_LINE 16 |
| #define | SNIFF_HANDLER(x, type) static int x(session_t *s, const connection_t *hdr, const type *pkt, int len) |
| #define | CHECK_LEN(x) |
| #define | CHECK_LEN(x) |
| #define | RIVCHAT_PACKET_LEN 328 |
| #define | WATCHER_PCAP(x, y) |
| #define | DEFAULT_FILTER "(tcp and (net 217.17.41.80/28 or net 217.17.45.128/27 or net 85.232.236.0/24 or net 91.197.12.0/22)) or (udp and (port 16127 or port 53))" |
Definicje typów | |
| typedef int(* | sniff_handler_t) (session_t *, const connection_t *, const unsigned char *, int) |
Wyliczenia | |
| enum | pkt_way_t { SNIFF_OUTGOING = 0, SNIFF_INCOMING } |
Funkcje | |
| static int | sniff_theme_init () |
| static int | sniff_plugin_destroy () |
| static char * | build_code (const unsigned char *code) |
| static char * | build_sha1 (const unsigned char *digest) |
| static char * | build_hex (guint32 hex) |
| static char * | build_hex2 (guint32 hex) |
| static char * | _inet_ntoa (struct in_addr ip) |
| static char * | _inet_ntoa6 (struct in6_addr ip) |
| static char * | build_windowip_name (struct in_addr ip) |
| static connection_t * | sniff_udp_get (const struct iphdr *ip, const struct udphdr *udp) |
| static connection_t * | sniff_tcp_find_connection (const struct iphdr *ip, const struct tcphdr *tcp) |
| static void | tcp_print_payload (u_char *payload, size_t len) |
| static char * | tcp_print_flags (u_char tcpflag) |
| static void | sniff_loop_tcp (session_t *s, int len, const u_char *packet, const struct iphdr *ip, int size_ip) |
| static void | sniff_loop_udp (session_t *s, int len, const u_char *packet, const struct iphdr *ip) |
| static void | sniff_loop_ip (session_t *s, int len, const u_char *packet) |
| static void | sniff_loop_ether (u_char *data, const struct pcap_pkthdr *header, const u_char *packet) |
| void | sniff_loop_sll (u_char *data, const struct pcap_pkthdr *header, const u_char *packet) |
| static int | sniff_pcap_read_EN10MB (int type, int fd, watch_type_t watch, session_t *s) |
| static int | sniff_pcap_read_SLL (int type, int fd, watch_type_t watch, session_t *s) |
| static int | sniff_pcap_read (int type, int fd, watch_type_t watch, session_t *s) |
| static int | sniff_command_connect (const char *name, const char **params, session_t *session, const char *target, int quiet) |
| static int | sniff_command_disconnect (const char *name, const char **params, session_t *session, const char *target, int quiet) |
| static int | sniff_command_connections (const char *name, const char **params, session_t *session, const char *target, int quiet) |
| static int | sniff_session_deinit (void *data, va_list ap) |
| static int | sniff_validate_uid (void *data, va_list ap) |
| static int | sniff_status_show (void *data, va_list ap) |
| static int | sniff_print_version (void *data, va_list ap) |
| __attribute__ ((visibility("default"))) | |
Zmienne | |
| plugin_t | sniff_plugin = { .name = "sniff", .pclass = PLUGIN_PROTOCOL , .destroy = sniff_plugin_destroy, .theme_init = sniff_theme_init } |
| static list_t | tcp_connections |
| static plugins_params_t | sniff_plugin_vars [] |
| #define CHECK_LEN | ( | x | ) |
| #define CHECK_LEN | ( | x | ) |
| #define DEFAULT_FILTER "(tcp and (net 217.17.41.80/28 or net 217.17.45.128/27 or net 85.232.236.0/24 or net 91.197.12.0/22)) or (udp and (port 16127 or port 53))" |
| #define MAX_BYTES_PER_LINE 16 |
| #define PROMISC 0 |
| #define RIVCHAT_PACKET_LEN 328 |
| #define SNAPLEN 2000 |
| #define SNIFF_HANDLER | ( | x, | |
| type | |||
| ) | static int x(session_t *s, const connection_t *hdr, const type *pkt, int len) |
| #define WATCHER_PCAP | ( | x, | |
| y | |||
| ) |
| typedef int(* sniff_handler_t) (session_t *, const connection_t *, const unsigned char *, int) |
| enum pkt_way_t |
| __attribute__ | ( | (visibility("default")) | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
inlinestatic |
|
inlinestatic |
| void sniff_loop_sll | ( | u_char * | data, |
| const struct pcap_pkthdr * | header, | ||
| const u_char * | packet | ||
| ) |
|
inlinestatic |
|
inlinestatic |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| plugin_t sniff_plugin = { .name = "sniff", .pclass = PLUGIN_PROTOCOL , .destroy = sniff_plugin_destroy, .theme_init = sniff_theme_init } |
|
static |
|
static |
1.8.13