RBT-4 Network
  
Home ::  Forum ::  Downloads ::  Cerca ::  No-Paste ::  Exploits ::  RBT-4 XSS DB ::  IT Wardriving DB ::  S.Code Bug Finder
3744676 hits 
 
::    [PDF] - Storia e realtà dell' Hacker italiano     ::    [PDF] - Sicurezza nella navigazione    ::    PyGTK - Programmazione Python GUI - Italiano    ::    Sicurezza nelle Wireless LAN - Giuseppe Paternò    ::    Il TCP/IP e la trasmissione dati su Internet    ::    Il linguaggio C - Guida pratica alla programmazione     ::    UnHash - MD5 or SHA1 Bruteforcer    ::    MD5 cracker BarsWF    ::    Joomla Security Scanner    ::    MySQL 64Bit HASH - Bruteforcer    ::    The Art Of Assembly Language - DOS16 Special Edition    ::    The Art Of Assembly Language - LINUX Special Edition    ::    The Art Of Assembly Language - Win32 Special Edition    ::    Carnivore-PersonalEdition+Source Code    ::    Sql-Injection Scanners + Guide alle Sql-Inj    ::    Huge Hackers Toolkit Suite 2006 - 48in1 (AIO)    ::    MSN Hacks All In One    ::    Web Shells Pack    ::    Man-in-the-middle attack (by blackhats security team)    ::    I Netowork X.25, comprensione della struttura di rete, tecniche di attacco ed identificazione delle     ::    Social Engeenering, una guida introduttiva (by blackhats security team)    ::    IBM Tivoli Provisioning Manager PRE AUTH Remote Exploit    ::    Apache 2.0.58 mod_rewrite Remote Overflow Exploit (win2k3)    ::    Rational Software Hidden Administrator 1.7 Auth Bypass Exploit    ::    TinyIdentD <= 2.2 Remote Buffer Overflow Exploit    ::    webdesproxy 0.0.1 (GET Request) Remote Root Exploit (exec-shield)    ::    webdesproxy 0.0.1 (GET Request) Remote Buffer Overflow Exploit    ::    GNU Mailutils imap4d 0.6 Remote Format String Exploit (exec-shield)    ::    MS Windows DNS RPC Remote Buffer Overflow Exploit (port 445) v2    ::    MS Windows DNS DnssrvQuery Remote Stack Overflow Exploit    ::    XAMPP for Windows <= 1.6.0a mssql_connect() Remote BoF Exploit    ::    MS Windows DNS RPC Remote Buffer Overflow Exploit (win2k SP4)    ::    Apache Mod_Rewrite Off-by-one Remote Overflow Exploit (win32)    ::    FileCOPA FTP Server <= 1.01 (LIST) Remote Buffer Overflow Exploit (2)    ::    IPSwitch IMail Server <= 8.20 IMAPD Remote Buffer Overflow Exploit    ::    IBM Lotus Domino Server 6.5 PRE AUTH Remote Exploit    ::    dproxy-nexgen Remote Root Buffer Overflow Exploit (x86-lnx)    ::    CA BrightStor Backup 11.5.2.0 (Mediasvr.exe) Remote Code Exploit    ::    NaviCOPA Web Server 2.01 Remote Buffer Overflow Exploit (meta)    ::    Easy File Sharing FTP Server 2.0 (PASS) Remote Exploit (Win2K SP4)    ::    WarFTP 1.65 (USER) Remote Buffer Overlow Exploit (multiple targets)    ::    Mercury Mail 4.0.1 (LOGIN) Remote IMAP Stack Buffer Overflow Exploit    ::    dproxy <= 0.5 Remote Buffer Overflow Exploit (meta 2.7)    ::    FutureSoft TFTP Server 2000 Remote SEH Overwrite Exploit    ::    Mercur Messaging 2005 <= SP4 IMAP Remote Exploit (egghunter mod)    ::    Mercur Messaging 2005 IMAP (SUBSCRIBE) Remote Exploit (win2k SP4)    ::    Helix Server 11.0.1 Remote Heap Overflow Exploit (win2k SP4)    ::    CA BrightStor ARCserve (msgeng.exe) Remote Stack Overflow Exploit    ::    WarFTP 1.65 (USER) Remote Buffer Overflow SEH Overflow Exploit    ::    WarFTP 1.65 (USER) Remote Buffer Overflow Exploit (win2k SP4)    ::    MailEnable Pro/Ent <= 2.37 (APPEND) Remote Buffer Overflow Exploit    ::    3Com TFTP Service <= 2.0.1 (Long Transporting Mode) Exploit (perl)    ::    IPSwitch WS-FTP 5.05 (XMD5) Remote Buffer Overflow Exploit (meta)    ::    Axigen eMail Server 2.0.0b2 (pop3) Remote Format String Exploit    ::    MailEnable Professional 2.35 Remote Buffer Overflow Exploit    ::    MailEnable Enterprise <= 2.32 - 2.34 Remote Buffer Overflow Exploit    ::    Lotus Domino <= R6 Webmail Remote Password Hash Dumper Exploit    ::    IP3 NetAccess < 4.1.9.6 Remote Arbitrary File Disclosure Vulnerability    ::    SunOS 5.10/5.11 in.telnetd Remote Authentication Bypass Exploit    ::    MySQL 4.x/5.0 User-Defined Function Command Execution Exploit (win)    ::    Imail 8.10-8.12 (RCPT TO) Remote Buffer Overflow Exploit (meta)    ::    Imail 8.10-8.12 (RCPT TO) Remote Buffer Overflow Exploit    ::    CA BrightStor ARCserve (lgserver.exe) Remote Stack Overflow Exploit    ::    CA BrightStor ARCserve (msgeng.exe) Remote Heap Overflow Exploit 2    ::    CA BrightStor ARCserve (msgeng.exe) Remote Heap Overflow Exploit    ::    3Com TFTP Service <= 2.0.1 Remote Buffer Overflow Exploit (meta)    ::    Sami FTP Server 2.0.2 (USER/PASS) Remote Buffer Overflow Exploit    ::    Mercur Messaging 2005 IMAP Remote Buffer Overflow Exploit    ::    TFTPDWIN 0.4.2 Remote Buffer Overflow Exploit    ::    FileCOPA FTP Server <= 1.01 (LIST) Remote BoF Exploit (meta)    ::    Berlios GPSD <= 2.7 Remote Format String Exploit (meta)    ::    NaviCOPA Web Server 2.01 (GET) Remote Buffer Overflow Exploit meta    ::    CA BrightStor ARCserve (tapeeng.exe) Remote Buffer Overflow Exploit    ::    QK SMTP <= 3.01 (RCPT TO) Remote Buffer Overflow Exploit (pl)    ::    Durian Web Application Server 3.02 Remote Buffer Overflow Exploit    ::    MS Windows ASN.1 Remote Exploit (MS04-007)    ::    ProFTPD <= 1.2.9 rc2 (ASCII File) Remote Root Exploit    ::    GNU InetUtils ftpd 1.4.2 (ld.so.preload) Remote Root Exploit    ::    OpenLDAP <= 2.4.3 (KBIND) Remote Buffer Overflow Exploit    ::    AT-TFTP <= 1.9 (Long Filename) Remote Buffer Overflow Exploit    ::    3Com TFTP Service <= 2.0.1 (Long Transporting Mode) Overflow Exploit    ::    ProFTPD 1.3.0 (sreplace) Remote Stack Overflow Exploit (meta)    ::    MS Windows NetpManageIPCConnect Stack Overflow Exploit (py)    ::    Omni-NFS Server 5.2 (nfsd.exe) Remote Stack Overflow Exploit (meta)    ::    Easy File Sharing Web Server 4 Remote Information Stealer Exploit    ::    PrivateWire Gateway 3.7 Remote Buffer Overflow Exploit (win32)    ::    Novell eDirectory 8.8 NDS Server Remote Stack Overflow Exploit    ::    QK SMTP <= 3.01 (RCPT TO) Remote Buffer Overflow Exploit    ::    AEP SmartGate 4.3b (GET) Arbitrary File Download Exploit    ::    Ipswitch IMail Server 2006 / 8.x (RCPT) Remote Stack Overflow Exploit    ::    McAfee ePo 3.5.0 / ProtectionPilot 1.1.0 (Source) Remote Exploit    ::    NaviCOPA Web Server 2.01 (GET) Remote Buffer Overflow Exploit    ::    MS Windows NetpIsRemote() Remote Overflow Exploit (MS06-040) (2k3)    ::    Mercur Mailserver 5.0 SP3 (IMAP) Remote Buffer Overflow Exploit (2)    ::    RaidenHTTPD 1.1.49 (SoftParserFileXml) Remote Code Execution Exploit    ::    IBM Director < 5.10 (Redirect.bat) Directory Transversal Vulnerability    ::    MS Windows NetpIsRemote() Remote Overflow Exploit (MS06-040) (2)    ::    MDaemon POP3 Server < 9.06 (USER) Remote Heap Overflow Exploit    ::    Easy File Sharing FTP Server 2.0 (PASS) Remote Exploit (PoC)    ::    WFTPD 3.23 (SIZE) Remote Buffer Overflow Exploit    ::    
NoPaste Service
Language: C++
Author: Dir31
Description: Simple Chat
Date: 24/01/08 18:27
/*
  Simple Chat Server With Multithreading Function

  Author: Dir31 rbt-4 crew and HIC
*/


#include <conio.h>
#include<iostream>
#include <stdio.h>
#include <windows.h>
#include <process.h>

#include <winsock.h>

using namespace std;

#define KEY_ESC      0x1b
#define ENTER        0x0d



/* Variabili Globali  */

int err;               //

bool IsClosed=false;   //

SOCKET temp,asock=0;   //

/*--------------------*/


/*Funzione che Chiuderà Le Connessioni*/
void CloseIt();


/*Thread Che Prende Un Carattere E Lo Inerisce In Un Buffer, Finchè Non Sarà

Premuto Invio. Se Viene Premuto "Esc" Richiamerà La Funzione CloseIt() */


void _cdecl Receive_Thread(void *NULL_var){

    int cont;
    char MexToReceive[200],mexin=' ';

    for(;;){

              for(int i=0; i<=cont;i++)
             MexToReceive[i]='\0';

            cont=0;


            do{
               mexin='\0';
               err=recv(asock, &mexin,10);
               MexToReceive[cont]=mexin;
               cont++;

               if(mexin==KEY_ESC){
                                  cout<<"The Client Has Been Closed The Connection\n";
                                  _sleep(1500);
                                  CloseIt();
                                  return;
                                  }

              }while(mexin!=ENTER);


             cout<<MexToReceive<<endl;


           }

      return;

   }/* _endthread() */

int main(){
                       /*Variabili Locali Del Main*/

            SOCKADDR_IN addr_in, asock_in;

            SOCKADDR addr;



            char mex[]"CHAT SERVER BY DIR_31\n\rPress The \"Esc\" Key To Close The Client Connection\n\n\r";


            char MexToSend[200];

            WSADATA dat;
            WORD ver=MAKEWORD(1,1);

            int res,nihl,addrlen;
                       /*---------------------------*/

            printf("WSAStartup: %d Version %d\n",(res=WSAStartup(ver,&dat)),ver);

            if(res!=0)
                return 0;


            temp = socket (PF_INET, SOCK_STREAM, 0);



            if(temp==INVALID_SOCKET){
                                      printf("Socket() Error, Return (%d)\n",

                                                WSAGetLastError());
                                                system("pause");

                                                return(1);
                                     }

            else printf("socket()... OK!\n");


                    /*Configuro La Sockaddr*/

            addr_in.sin_family = PF_INET;

            addr_in.sin_port = htons(IPPORT_TELNET);

            addr_in.sin_addr.s_addr = INADDR_ANY;

                 /*----------------------*/



            err = bind (temp, (struct sockaddr*)&addr_in, sizeof(struct sockaddr_in));

            if(err==SOCKET_ERROR){
                                   printf("Bind() Error, Return (%d)\n",

                                   WSAGetLastError());

                                   system("pause");

                                   return(1);
                                  }

            else printf("bind()... OK!\n");



            err=listen(temp, 5);



            if(err==SOCKET_ERROR){
                                  printf("Listen() Error, Return (%d)\n",

                                  WSAGetLastError());

                                  system("pause");

                                  return(1);
                                  }


            else
                printf("listen()... OK!\nWaiting For External Connection...\n");


            addrlen=sizeof(struct sockaddr);



            asock=accept(temp, (struct sockaddr*)&asock_in, (LPINT)&addrlen);



            if(asock==INVALID_SOCKET){
                                      printf("Accept() Error, Return (%d)\n",

                                      WSAGetLastError());

                                      system("pause");

                                      return(1);
                                      }

            err=send(asock, &mex[0], strlen(mex)0);


            if(err==SOCKET_ERROR){
                                  printf("Send() Error, Return (%d)\n",

                                  WSAGetLastError());

                                  system("pause");

                                  return(1);
                                  }

            else printf("send() OK\n\n");


      /*Lancio Il Thread*/

            _beginthread(Receive_Thread,0,static_cast<void *>(&nihl));

     /*Finchè Non Sarà Inviata La Parola Exit Il Ciclo Non Finirà, A Meno Che La Variabile

     IsClosed Non E' Impostata A True, Ovvero Non E' Stata Chiamata Precedentemente la

     Funzione CloseIt()*/


            while(strcmp(MexToSend,"exit")){

                           if(IsClosed)

                           break;

                           else{

                                cin>>MexToSend;

                                send(asock,"\n\r",2,0);

                                send(asock,&MexToSend[0],strlen(MexToSend),0);

                                send(asock,"\n\r",2,0);

                               }
                           }

         /*Se Le Connessioni Non Sono Ancora State Terminate, Le Chiudiamo*/

            if(IsClosed==false)
            CloseIt();

            WSACleanup();

            system("pause");

            return(0);

    }  /*End*/


/*Funzione Che Chiuderà Le Connessioni*/

void CloseIt(){


            shutdown(temp, 2);

            err=closesocket(temp);

            if(err==SOCKET_ERROR){
                                  printf("Closesocket(sock21) Error, Return (%d)\n",

                                  WSAGetLastError());

                                  system("pause");

                                  return;
                                  }

            else printf("closesocket(Server)... OK\n");


            err=closesocket(asock);


            if(err==SOCKET_ERROR){
                                  printf("Closesocket(sock21) Error, Return (%d)\n",

                                  WSAGetLastError());

                                  system("pause");

                                  return;
                                  }



            else printf("closesocket(Client)... OK\n");

            cout<<"Send A Casual Key To Close\n";

            IsClosed=true;

            }