Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
tolong bantu analisa ya...... kayanya c0de ni ada yang salah dech..... :D
#1
c0de :

/* my network project : trial and error
author : Paulus 'C++ Mercenary' Gandung
a.k.a syn-mercs
*/

#include <iostream>
#include <cstdlib>
#include <sys\locking.h>

#define back_connect_to_master_IP 192.168.1.100
#define AF_INET
#define _WIN32
#define SOCK_STREAM
#define _CHAR_UNSIGNED
#define _ping_ system("ping 192.168.1.254 -t")
#define _telnet_ system("telnet 192.168.1.254")

typedef unsigned int _uint;
typedef unsigned char _uchar;
typedef char* _char_pointer_;

class _sock {
protected :
public :
_uint *http_port; // initializing *http_port from typedef unsigned int _uint (just use _uint)
_uint *telnet_port; // initializing *telnet_port from typedef unsigned char _uchar (just use _uchar OR type "_uchar")
_uint _command_shell;
_sock() {
*http_port = 8080;
*telnet_port = 23;
http_port = (unsigned int*) malloc(10 * sizeof(_sock) - 1);
}
~_sock() {
delete(http_port);
}

void _initiate_net_port() {
*http_port = 8080;
}

void execute_net_call() {
std::cout <<"pinging remote router......"<< std::endl;
std::cout <<'\n';
std::cout << _ping_ << std::endl;
}

void execute_remote_call() {
std::cout <<"telneting remote router......."<< std::endl;
std::cout <<'\n';
std::cout << _telnet_ << std::endl;
}
};

// main function

int main(int argc, char *argv[])
{
_sock sock;
signed int net1;
std::cout <<"enter your choice : "<< std::endl;
std::cout <<"1. pinging your router for checkable TTL"<< std::endl;
std::cout <<"2. telneting your router for bandwidth control"<< std::endl;
std::cout <<'\n';
std::cout <<"enter your choice : "<< std::endl;
std::cin >> net1;
if (net1 == 1) {
sock.execute_net_call();
} else if (net1 == 2) {
sock.execute_remote_call();
}

return 0;
Reply
#2
tolong ya para master,, temukan bug pada program ini...... :D
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Buat yang suka Zen Cart DadarGuling 20 390 07-09-2011, 10:09 AM
Last Post: h1t4k3
  mohon dianalisa....... siapa tahu ada yang salah dengan c0de ini..... :D syn_attack 1 69 02-07-2011, 07:29 PM
Last Post: firmansingh
Wah-yellow_16 <kecewa> programming yang opensource masih gak ada tread nya xnagacode 14 239 12-09-2010, 01:18 PM
Last Post: mydisha
  ASK Ada yang punya SPYBOT.C ma SETTINGS.H ? gt_portnoy 4 69 02-14-2010, 06:19 AM
Last Post: ./rafaelHN

Forum Jump:


Users browsing this thread: 1 Guest(s)