s_bot Struct Reference

Collaboration diagram for s_bot:

Collaboration graph
[legend]
List of all members.

Detailed Description

Stores informations about remote bot.

Author:
VooDooMan
Version:
2
Date:
2005

Definition at line 1246 of file botnet.cpp.

Public Member Functions

void clear ()
 s_bot (const s_bot &orig)
 s_bot ()
 ~s_bot ()

Public Attributes

bool auth_ok
 Authenticated.
time_t awaiting_ready
string botip
 IPv4 address of remote bot.
string botname
 Name of remote bot.
unsigned short botport
 Port on remote side.
char buff_from_dcc [1024 *5]
 Buffer from DCC.
size_t buff_pos_from_dcc
 Position in buffer from DCC.
size_t buff_size_from_dcc
 Buffer size from DCC.
time_t chans_to_pull_last_update
 Time of last pull of channel definitions.
time_t chans_to_push_last_update
 Time of last push of channel definitions.
bool clean
 Flag for cleaning: true==structure has been reset.
s_bot_command command_receive_buffer
 Buffer for receiving COMMAND packet.
s_bot_control control_receive_buffer
 Buffer for receiving CONTROL packet.
bool flipped
 true: we have flipper packet for big-endian machines already
bool got_at_least_one_pong
 Have we got at least one pong?
int got_bytes
 For CR LF killing.
bool invoked_from_telnet
 Was this connection invoked from telnet?
time_t last_proc_push
 Timestamp of last tried to push / pushed procedure, or 0 (zero) for not yet.
time_t last_try
 Used for penalty.
string localip
 Local IPv4 address.
time_t next_ping
 When will be the next ping?
time_t procs_to_pull_last_update
 Time of last pull of procedures.
time_t procs_to_push_last_update
 Time of last push of procedures.
bool prv_pulling
 Are we pulling private query definition?
s_private prv_to_pull
 Last pulling private query definition.
s_private prv_to_push
 Last pushing private query definition.
time_t prv_to_push_last_update
 Time of last push of private query definition.
vector< s_chan_def_to_pullpulling_chans
 List of pulling channel definitions.
vector< s_proc_to_pullpulling_procs
 List of pulling procedures.
vector< s_user_to_pullpulling_users
 List of pulling users.
vector< s_chan_def_to_pushpushing_chans
 List of pushing channel definitions.
vector< s_proc_to_pushpushing_procs
 List of pushing procedures.
vector< s_user_to_pushpushing_users
 List of pushing users.
size_t receive_buffer_pos
 Position in buffer.
bool received_bot_auth_1
 Have we received an authentication?
vector< string > rejected_objects
 List of object that should not be pushed due to remote reject (up-to-date/access denied).
string remote_MD5_password
 Remote MD5 password.
bool remote_pswd_ok
 Remote password is okay.
char * rle_buffer
 Buffer for RLE decompression.
unsigned int rle_buffer_len
 Current lenght of rle_buffer.
bool sent_at_least_one_ping
 Have we sent one ping as pre-handshake?
bool sent_bot_auth_1
 Was an authentication sent?
bool sent_partyline_users
 Was list of users on partyline sent?
s_socket socket
 Socket handle for connection.
SSL * ssl
 Descriptor of SSL connection.
bool ssl_connection
 Is this a SSL connection?
time_t start_awaiting_pong
 When we had started to await pong? (zero for none).
int supported_proto_version
 Highest supported protocol.
string unlink_proc
 Unlink procedure to call on unlink.
bool unlink_proc_called
 Was unlink procedure called?
time_t users_to_pull_last_update
 Time of last pull of users.
time_t users_to_push_last_update
 Time of last push of users.
map< string, string > vars
 List of local variables at execution of "link" command (only valid if invoked_from_telnet == false).
bool waiting
 waiting to last_try expires
bool was_linked
 For log message / used when linked connection broken.


Constructor & Destructor Documentation

s_bot::s_bot  )  [inline]
 

Definition at line 1375 of file botnet.cpp.

References clear().

01375             {
01376         clear();
01377     }

Here is the call graph for this function:

s_bot::s_bot const s_bot orig  )  [inline]
 

Definition at line 1378 of file botnet.cpp.

References auth_ok, botip, botname, botport, buff_from_dcc, buff_pos_from_dcc, buff_size_from_dcc, chans_to_pull_last_update, chans_to_push_last_update, clean, s_private::clear(), clear(), command_receive_buffer, control_receive_buffer, got_bytes, invoked_from_telnet, last_try, localip, next_ping, procs_to_pull_last_update, procs_to_push_last_update, prv_pulling, prv_to_pull, prv_to_push, pulling_chans, pulling_procs, pulling_users, pushing_chans, pushing_procs, pushing_users, receive_buffer_pos, received_bot_auth_1, remote_MD5_password, remote_pswd_ok, rle_buffer, rle_buffer_len, sent_bot_auth_1, sent_partyline_users, socket, ssl, ssl_connection, start_awaiting_pong, unlink_proc, unlink_proc_called, users_to_pull_last_update, users_to_push_last_update, vars, waiting, and was_linked.

01378                              {
01379         clear();
01380 
01381         memcpy(&command_receive_buffer,&orig.command_receive_buffer,sizeof(s_bot_command));
01382         memcpy(&control_receive_buffer,&orig.control_receive_buffer,sizeof(s_bot_control));
01383         if(orig.rle_buffer) {
01384             rle_buffer=(char*)malloc(orig.rle_buffer_len);
01385             if(rle_buffer) {
01386                 memcpy(rle_buffer,orig.rle_buffer,orig.rle_buffer_len);
01387                 rle_buffer_len=orig.rle_buffer_len;
01388             } else {
01389                 rle_buffer_len=0;
01390             }
01391         } else {
01392             rle_buffer=NULL;
01393             rle_buffer_len=0;
01394         }
01395 
01396         botname=orig.botname;
01397         localip=orig.localip;
01398         botip=orig.botip;
01399         botport=orig.botport;
01400         socket=orig.socket;
01401         remote_MD5_password=orig.remote_MD5_password;
01402         sent_bot_auth_1=orig.sent_bot_auth_1;
01403         received_bot_auth_1=orig.received_bot_auth_1;
01404         receive_buffer_pos=orig.receive_buffer_pos;
01405         memcpy(buff_from_dcc,orig.buff_from_dcc,sizeof(buff_from_dcc));
01406         buff_size_from_dcc=orig.buff_size_from_dcc;
01407         buff_pos_from_dcc=orig.buff_pos_from_dcc;
01408         last_try=orig.last_try;
01409         waiting=orig.waiting;
01410         invoked_from_telnet=orig.invoked_from_telnet;
01411         got_bytes=orig.got_bytes;
01412         was_linked=orig.was_linked;
01413         auth_ok=orig.auth_ok;
01414         remote_pswd_ok=orig.remote_pswd_ok;
01415         next_ping=orig.next_ping;
01416         start_awaiting_pong=orig.start_awaiting_pong;
01417         unlink_proc=orig.unlink_proc;
01418         vars=orig.vars;
01419         unlink_proc_called=orig.unlink_proc_called;
01420         users_to_pull_last_update=orig.users_to_pull_last_update;
01421         pulling_users=orig.pulling_users;
01422         users_to_push_last_update=orig.users_to_push_last_update;
01423         pushing_users=orig.pushing_users;
01424         procs_to_pull_last_update=orig.procs_to_pull_last_update;
01425         pulling_procs=orig.pulling_procs;
01426         procs_to_push_last_update=orig.procs_to_push_last_update;
01427         pushing_procs=orig.pushing_procs;
01428 
01429         chans_to_pull_last_update=orig.chans_to_pull_last_update;
01430         pulling_chans=orig.pulling_chans;
01431         chans_to_push_last_update=orig.chans_to_push_last_update;
01432         pushing_chans=orig.pushing_chans;
01433 
01434         sent_partyline_users=orig.sent_partyline_users;
01435 
01436         prv_pulling=false;
01437         prv_to_pull.clear();
01438         prv_to_push.clear();
01439 
01440         ssl_connection=orig.ssl_connection;
01441         ssl=orig.ssl;
01442         clean=orig.clean;
01443     }

Here is the call graph for this function:

s_bot::~s_bot  )  [inline]
 

Definition at line 1444 of file botnet.cpp.

References rle_buffer, and rle_buffer_len.

01444              {
01445         free(rle_buffer);
01446         rle_buffer=NULL;
01447         rle_buffer_len=0;
01448     }


Member Function Documentation

void s_bot::clear  )  [inline]
 

< Clears the structure

Definition at line 1323 of file botnet.cpp.

References auth_ok, awaiting_ready, botip, botname, botport, buff_from_dcc, buff_pos_from_dcc, buff_size_from_dcc, chans_to_pull_last_update, chans_to_push_last_update, clean, s_socket::clear(), flipped, got_at_least_one_pong, got_bytes, invoked_from_telnet, last_proc_push, last_try, localip, next_ping, procs_to_pull_last_update, procs_to_push_last_update, pulling_chans, pulling_procs, pulling_users, pushing_chans, pushing_procs, pushing_users, receive_buffer_pos, received_bot_auth_1, rejected_objects, remote_MD5_password, remote_pswd_ok, rle_buffer, rle_buffer_len, sent_at_least_one_ping, sent_bot_auth_1, sent_partyline_users, socket, ssl, ssl_connection, start_awaiting_pong, supported_proto_version, unlink_proc, unlink_proc_called, users_to_pull_last_update, users_to_push_last_update, vars, waiting, and was_linked.

Referenced by botnet_link(), botnet_received_data_from_telnet(), and s_bot().

01323                  {                                          //!< Clears the structure
01324         clean=true;
01325         ssl_connection=false;
01326         ssl=NULL;
01327         awaiting_ready=0;
01328         botname="";
01329         localip="";
01330         botip="";
01331         botport=0;
01332         supported_proto_version=0;
01333         socket.clear();
01334         remote_MD5_password="";
01335         sent_bot_auth_1=false;
01336         received_bot_auth_1=false;
01337         sent_at_least_one_ping=false;
01338         got_at_least_one_pong=false;
01339         receive_buffer_pos=0;
01340         memset(buff_from_dcc,0,sizeof(buff_from_dcc));
01341         buff_size_from_dcc=0;
01342         buff_pos_from_dcc=0;
01343         last_try=0;
01344         waiting=false;
01345         invoked_from_telnet=false;
01346         got_bytes=0;
01347         was_linked=false;
01348         auth_ok=false;
01349         remote_pswd_ok=false;
01350         next_ping=0;
01351         start_awaiting_pong=0;
01352         unlink_proc="";
01353         vars.clear();
01354         unlink_proc_called=false;
01355         users_to_pull_last_update=0;
01356         pulling_users.clear();
01357         users_to_push_last_update=0;
01358         pushing_users.clear();
01359         procs_to_pull_last_update=0;
01360         pulling_procs.clear();
01361         procs_to_push_last_update=0;
01362         pushing_procs.clear();
01363         chans_to_pull_last_update=0;
01364         pulling_chans.clear();
01365         chans_to_push_last_update=0;
01366         pushing_chans.clear();
01367         sent_partyline_users=false;
01368         rejected_objects.clear();
01369         last_proc_push=0;
01370 
01371         rle_buffer=NULL;
01372         rle_buffer_len=0;
01373         flipped=false;
01374     }

Here is the call graph for this function:


Member Data Documentation

bool s_bot::auth_ok
 

Authenticated.

Definition at line 1284 of file botnet.cpp.

Referenced by botnet_link(), botnet_received_data_from_telnet(), clear(), and s_bot().

time_t s_bot::awaiting_ready
 

Definition at line 1259 of file botnet.cpp.

Referenced by clear().

string s_bot::botip
 

IPv4 address of remote bot.

Definition at line 1251 of file botnet.cpp.

Referenced by botnet_link(), botnet_received_data_from_telnet(), clear(), and s_bot().

string s_bot::botname
 

Name of remote bot.

Definition at line 1249 of file botnet.cpp.

Referenced by botnet_link(), botnet_push_chan(), botnet_push_proc(), botnet_push_prv(), botnet_push_user(), botnet_receive(), botnet_received_data_from_telnet(), botnet_send_command(), botnet_send_control(), clear(), and s_bot().

unsigned short s_bot::botport
 

Port on remote side.

Definition at line 1252 of file botnet.cpp.

Referenced by botnet_link(), botnet_received_data_from_telnet(), clear(), and s_bot().

char s_bot::buff_from_dcc[1024 *5]
 

Buffer from DCC.

Definition at line 1275 of file botnet.cpp.

Referenced by botnet_received_data_from_telnet(), clear(), and s_bot().

size_t s_bot::buff_pos_from_dcc
 

Position in buffer from DCC.

Definition at line 1277 of file botnet.cpp.

Referenced by botnet_received_data_from_telnet(), clear(), and s_bot().

size_t s_bot::buff_size_from_dcc
 

Buffer size from DCC.

Definition at line 1276 of file botnet.cpp.

Referenced by botnet_link(), botnet_received_data_from_telnet(), clear(), and s_bot().

time_t s_bot::chans_to_pull_last_update
 

Time of last pull of channel definitions.

Definition at line 1306 of file botnet.cpp.

Referenced by clear(), and s_bot().

time_t s_bot::chans_to_push_last_update
 

Time of last push of channel definitions.

Definition at line 1309 of file botnet.cpp.

Referenced by clear(), and s_bot().

bool s_bot::clean
 

Flag for cleaning: true==structure has been reset.

Definition at line 1247 of file botnet.cpp.

Referenced by botnet_received_data_from_telnet(), clear(), and s_bot().

s_bot_command s_bot::command_receive_buffer
 

Buffer for receiving COMMAND packet.

Definition at line 1268 of file botnet.cpp.

Referenced by botnet_link(), botnet_receive(), and s_bot().

s_bot_control s_bot::control_receive_buffer
 

Buffer for receiving CONTROL packet.

Definition at line 1269 of file botnet.cpp.

Referenced by botnet_link(), botnet_receive(), and s_bot().

bool s_bot::flipped
 

true: we have flipper packet for big-endian machines already

Definition at line 1273 of file botnet.cpp.

Referenced by botnet_receive(), and clear().

bool s_bot::got_at_least_one_pong
 

Have we got at least one pong?

Definition at line 1266 of file botnet.cpp.

Referenced by clear().

int s_bot::got_bytes
 

For CR LF killing.

Definition at line 1282 of file botnet.cpp.

Referenced by botnet_link(), botnet_received_data_from_telnet(), clear(), and s_bot().

bool s_bot::invoked_from_telnet
 

Was this connection invoked from telnet?

Definition at line 1281 of file botnet.cpp.

Referenced by botnet_link(), botnet_received_data_from_telnet(), clear(), and s_bot().

time_t s_bot::last_proc_push
 

Timestamp of last tried to push / pushed procedure, or 0 (zero) for not yet.

Definition at line 1314 of file botnet.cpp.

Referenced by botnet_push_proc(), and clear().

time_t s_bot::last_try
 

Used for penalty.

Definition at line 1279 of file botnet.cpp.

Referenced by botnet_link(), botnet_received_data_from_telnet(), clear(), and s_bot().

string s_bot::localip
 

Local IPv4 address.

Definition at line 1250 of file botnet.cpp.

Referenced by botnet_link(), botnet_received_data_from_telnet(), clear(), and s_bot().

time_t s_bot::next_ping
 

When will be the next ping?

Definition at line 1287 of file botnet.cpp.

Referenced by clear(), and s_bot().

time_t s_bot::procs_to_pull_last_update
 

Time of last pull of procedures.

Definition at line 1300 of file botnet.cpp.

Referenced by clear(), and s_bot().

time_t s_bot::procs_to_push_last_update
 

Time of last push of procedures.

Definition at line 1303 of file botnet.cpp.

Referenced by clear(), and s_bot().

bool s_bot::prv_pulling
 

Are we pulling private query definition?

Definition at line 1319 of file botnet.cpp.

Referenced by s_bot().

s_private s_bot::prv_to_pull
 

Last pulling private query definition.

Definition at line 1318 of file botnet.cpp.

Referenced by s_bot().

s_private s_bot::prv_to_push
 

Last pushing private query definition.

Definition at line 1317 of file botnet.cpp.

Referenced by s_bot().

time_t s_bot::prv_to_push_last_update
 

Time of last push of private query definition.

Definition at line 1316 of file botnet.cpp.

vector<s_chan_def_to_pull> s_bot::pulling_chans
 

List of pulling channel definitions.

Definition at line 1307 of file botnet.cpp.

Referenced by clear(), and s_bot().

vector<s_proc_to_pull> s_bot::pulling_procs
 

List of pulling procedures.

Definition at line 1301 of file botnet.cpp.

Referenced by clear(), and s_bot().

vector<s_user_to_pull> s_bot::pulling_users
 

List of pulling users.

Definition at line 1295 of file botnet.cpp.

Referenced by clear(), and s_bot().

vector<s_chan_def_to_push> s_bot::pushing_chans
 

List of pushing channel definitions.

Definition at line 1310 of file botnet.cpp.

Referenced by clear(), and s_bot().

vector<s_proc_to_push> s_bot::pushing_procs
 

List of pushing procedures.

Definition at line 1304 of file botnet.cpp.

Referenced by clear(), and s_bot().

vector<s_user_to_push> s_bot::pushing_users
 

List of pushing users.

Definition at line 1298 of file botnet.cpp.

Referenced by clear(), and s_bot().

size_t s_bot::receive_buffer_pos
 

Position in buffer.

Definition at line 1270 of file botnet.cpp.

Referenced by botnet_link(), botnet_receive(), botnet_received_data_from_telnet(), clear(), and s_bot().

bool s_bot::received_bot_auth_1
 

Have we received an authentication?

Definition at line 1264 of file botnet.cpp.

Referenced by botnet_link(), botnet_received_data_from_telnet(), clear(), and s_bot().

vector<string> s_bot::rejected_objects
 

List of object that should not be pushed due to remote reject (up-to-date/access denied).

Definition at line 1312 of file botnet.cpp.

Referenced by clear().

string s_bot::remote_MD5_password
 

Remote MD5 password.

Definition at line 1261 of file botnet.cpp.

Referenced by botnet_link(), botnet_received_data_from_telnet(), clear(), and s_bot().

bool s_bot::remote_pswd_ok
 

Remote password is okay.

Definition at line 1285 of file botnet.cpp.

Referenced by botnet_link(), botnet_received_data_from_telnet(), clear(), and s_bot().

char* s_bot::rle_buffer
 

Buffer for RLE decompression.

Definition at line 1271 of file botnet.cpp.

Referenced by botnet_receive(), clear(), s_bot(), and ~s_bot().

unsigned int s_bot::rle_buffer_len
 

Current lenght of rle_buffer.

Definition at line 1272 of file botnet.cpp.

Referenced by botnet_receive(), clear(), s_bot(), and ~s_bot().

bool s_bot::sent_at_least_one_ping
 

Have we sent one ping as pre-handshake?

Definition at line 1265 of file botnet.cpp.

Referenced by clear().

bool s_bot::sent_bot_auth_1
 

Was an authentication sent?

Definition at line 1263 of file botnet.cpp.

Referenced by botnet_link(), botnet_received_data_from_telnet(), clear(), and s_bot().

bool s_bot::sent_partyline_users
 

Was list of users on partyline sent?

Definition at line 1321 of file botnet.cpp.

Referenced by clear(), and s_bot().

s_socket s_bot::socket
 

Socket handle for connection.

Definition at line 1256 of file botnet.cpp.

Referenced by botnet_link(), botnet_receive(), botnet_received_data_from_telnet(), botnet_send_command(), botnet_send_control(), clear(), and s_bot().

SSL* s_bot::ssl
 

Descriptor of SSL connection.

Definition at line 1258 of file botnet.cpp.

Referenced by botnet_link(), botnet_receive(), botnet_received_data_from_telnet(), botnet_send_command(), botnet_send_control(), clear(), and s_bot().

bool s_bot::ssl_connection
 

Is this a SSL connection?

Definition at line 1257 of file botnet.cpp.

Referenced by botnet_link(), botnet_receive(), botnet_received_data_from_telnet(), botnet_send_command(), botnet_send_control(), clear(), and s_bot().

time_t s_bot::start_awaiting_pong
 

When we had started to await pong? (zero for none).

Definition at line 1288 of file botnet.cpp.

Referenced by clear(), and s_bot().

int s_bot::supported_proto_version
 

Highest supported protocol.

Definition at line 1254 of file botnet.cpp.

Referenced by botnet_push_chan(), botnet_push_prv(), botnet_push_user(), and clear().

string s_bot::unlink_proc
 

Unlink procedure to call on unlink.

Definition at line 1290 of file botnet.cpp.

Referenced by botnet_link(), botnet_received_data_from_telnet(), clear(), and s_bot().

bool s_bot::unlink_proc_called
 

Was unlink procedure called?

Definition at line 1292 of file botnet.cpp.

Referenced by botnet_link(), botnet_received_data_from_telnet(), clear(), and s_bot().

time_t s_bot::users_to_pull_last_update
 

Time of last pull of users.

Definition at line 1294 of file botnet.cpp.

Referenced by clear(), and s_bot().

time_t s_bot::users_to_push_last_update
 

Time of last push of users.

Definition at line 1297 of file botnet.cpp.

Referenced by clear(), and s_bot().

map<string,string> s_bot::vars
 

List of local variables at execution of "link" command (only valid if invoked_from_telnet == false).

Definition at line 1291 of file botnet.cpp.

Referenced by botnet_link(), clear(), and s_bot().

bool s_bot::waiting
 

waiting to last_try expires

Definition at line 1280 of file botnet.cpp.

Referenced by clear(), and s_bot().

bool s_bot::was_linked
 

For log message / used when linked connection broken.

Definition at line 1283 of file botnet.cpp.

Referenced by botnet_link(), botnet_received_data_from_telnet(), clear(), and s_bot().


The documentation for this struct was generated from the following file:
Generated on Sun Jul 10 05:45:15 2005 for VooDoo cIRCle by doxygen 1.4.3

Hosted by SourceForge.net Logo