1 /* $Id: parser.h 520 2006-04-18 23:18:17Z common $ */ 2 #ifndef PARSER_H 3 #define PARSER_H 4 5 enum sc_namespace 6 { 7 sc_xor, 8 sc_linkxor, 9 sc_konstanzxor, 10 sc_leimbachxor, 11 sc_connectbackshell, 12 sc_connectbackfiletransfer, 13 sc_bindshell, 14 sc_execute, 15 sc_download, 16 sc_url, 17 sc_bindfiletransfer, 18 sc_base64, 19 sc_alphanumericxor 20 21 }; 22 23 enum sc_mapping 24 { 25 sc_key, 26 sc_subkey, 27 sc_size, 28 sc_sizeinvert, 29 sc_port, 30 sc_host, 31 sc_command, 32 sc_uri, 33 sc_decoder, 34 sc_pre, 35 sc_post, 36 sc_none, 37 sc_hostkey, 38 sc_portkey, 39 sc_payload 40 41 }; 42 43 #define MAP_MAX 8 44 struct sc_shellcode 45 { 46 char *name; 47 char *author; 48 char *reference; 49 char *pattern; 50 int pattern_size; 51 enum sc_namespace nspace; 52 int map_items; 53 enum sc_mapping map[MAP_MAX]; 54 int flags; 55 56 struct sc_shellcode *next; 57 }; 58 59 extern struct sc_shellcode *sc_parse_file(const char *); 60 extern int sc_free_shellcodes(struct sc_shellcode *s); 61 extern char *sc_get_error(); 62 63 extern char *sc_get_namespace_by_numeric(int num); 64 extern char *sc_get_mapping_by_numeric(int num); 65 66 67 #endif 68