|
System | : | Linux MiraNet 3.0.0-14-generic-pae #23-Ubuntu SMP Mon Nov 21 22:07:10 UTC 2011 i686 |
Software | : | Apache. PHP/5.3.6-13ubuntu3.10 |
ID | : | uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup)
|
|
Safe Mode | : | OFF |
Open_Basedir | : | OFF |
Freespace | : | 25.67 GB of 70.42 GB (36.45%) |
|
MySQL: ON MSSQL: OFF Oracle: OFF PostgreSQL: OFF Curl: OFF Sockets: ON Fetch: OFF Wget: ON Perl: ON |
Disabled Functions: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
|
[ System Info ]
[ Processes ]
[ SQL Manager ]
[ Eval ]
[ Encoder ]
[ Mailer ]
[ Back Connection ]
[ Backdoor Server ]
[ Kernel Exploit Search ]
[ MD5 Decrypter ]
[ Reverse IP ]
[ Kill Shell ]
[ FTP Brute-Force ]
|
|
/
usr/
src/
courier-0.66.1/
maildrop/
- drwxrwxrwx
|
Viewing file: search.h (2.14 KB) -rw-rw-rw-Select action/file-type:  ( +) |  ( +) |  ( +) | Code ( +) | Session ( +) |  ( +) | SDB ( +) |  ( +) |  ( +) |  ( +) |  ( +) |  ( +) |
#ifndef search_h #define search_h
#include "re.h" #include "buffer.h"
#if HAVE_PCRE_H #include <pcre.h> #else #include <pcre/pcre.h> #endif
//////////////////////////////////////////////////////////////////////////// // // The Search class encapsulates the entire functionality of matching // patterns against the message. // // There are two main modes, both implemented by the overloaded find() // function. The first find() function matches a pattern against // the message, the second find() function matches a pattern against // text in memory. // // The find() function requires that the pattern, and pattern flags // be already separated. // // The find() function returns -1 if there was an error in the format // of the regular expression, 0 if the pattern was good, and it was // succesfully searched. // // The 'score' variable is set when find() returns 0. If a pattern was // found, it is set to 1, else it is set to 0. If the pattern flags // requested a weighted scoring search, the 'score' variable will // contain the calculated score. // // If a weighted scoring is not requested, the find() function automatically // sets the MATCH... variables (from the '!' operator). // ////////////////////////////////////////////////////////////////////////////
class MessageInfo; class Message;
class Search {
pcre *pcre_regexp; pcre_extra *pcre_regexp_extra; int *pcre_vectors; size_t pcre_vector_count;
Re regexp; Buffer current_line; Buffer next_line;
int match_header, match_body; double weight1, weight2; int scoring_match;
int init(const char *, const char *);
void cleanup();
public: double score; // For weighted scoring. Without scoring, this is // either 0, or 1.
Search() : pcre_regexp(NULL), pcre_regexp_extra(NULL), pcre_vectors(NULL) {} ~Search() { cleanup(); } int find(Message &, MessageInfo &, const char *, const char *, Buffer *); int find(const char *, const char *, const char *, Buffer *); private: int findinline(Message &, const char *, Buffer *); int findinsection(Message &, const char *, Buffer *); void init_match_vars(ReMatch &, Buffer *); void init_match_vars(const char *, int, int *, Buffer *); } ; #endif
|