xtreme client....

mobius at groovy.gr mobius at groovy.gr
Mon Jan 17 03:04:47 EET 2000


Greetings,
	well..8ewrisa logiko na para8esw mia akoma ekdosh pou exei ftiaxtei
	edw kai ligo kairo h opoia leitourgei so far kai sta windows...
	Kserw oti mporei thn pleiopsifia na mhn thn endiaferei..alla mias
	kai yparxei to endexomeno h c ekdosh pou ekane post o Nikos na mhn
	kanei compile sta windows..opote proswrina..as boleytoun osoi 
	kaigonte me thn perl ekdosh..

	To Port ths perl sta windows mporeite na to breite sthn diey8ynsh:
	ftp.ntua.gr/mirror/perl/ports/win95/Standard/x86/perl5.00402-bindist04-bc.zip

Source follows:
---- n.c -----------------------------------------------------------
---- Creates AUTH signal for nauix.pl ------------------------------
---- Source from: phoenix ------------------------------------------
------------------------- cut here ---------------------------------

#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>

FILE *out;

main(int argc, char *argv[])
{

 char *replies[3]={"\x00\x00\x00\x00\x00\x71\x00\x38\x00\x3f\x00\x3a\x00\x33"
                    "\x00\x3d\x00\x48\x00\x23\x00\x4e\x00\x4a\x00\x48\x00\x3b"
                    "\x00\x43\x00\x3b\x00\x23\x62\x26\x00\x26\x00\x26\x00\x2b"
                    "\x00\x23\x00\x47\x00\x31\x00\x4b\x00\x44\x00\x33", //AUTH
                    "\x41\x43\x4b",                     // ACK
                    "\x41\x43\x4b"};                    // ACK

  int repliesn[3]={54, 3, 3};

  int moufa;
  int usrlen;

  char *tr;
   if(argc<2 || strlen(argv[1])>666){
    exit(-1);
  }

  usrlen=strlen(argv[1]);
  if((tr=(char *) malloc(repliesn[0]+(usrlen*2)))==NULL) psofa("malloc");
  srand((unsigned int) time(NULL));
  for(moufa=0;moufa<(repliesn[0]+(usrlen*2));moufa++)
    if((tr[moufa]=replies[0][moufa])==0x00) tr[moufa]=(char) (1+(254.0*rand()/(RAND_MAX+1.0)));
  for(moufa=1;moufa<(usrlen*2);moufa+=2){
    tr[repliesn[0]+moufa]=argv[1][moufa/2]-10;
  }
  if(usrlen>4){
    tr[3]=0x33;
    tr[4]=0x2a+usrlen;
  }else{
    tr[3]=0x32;
    tr[4]=0x34+usrlen;
  }

  replies[0]=tr;
  repliesn[0]+=(usrlen*2);


  printf("%s",replies[0]);

}

psofa(char *s)
{
  perror(s);
  exit(-1);
}

---- EOF n.c ----------------------------------------------------------
---- nauix.pl ---------------------------------------------------------
---- Socket management for nauix --------------------------------------
---- Source from: m0bius ----------------------------------------------
--------------------------- cut here ----------------------------------

#!/usr/bin/perl
# U MUST PUT HERE THE PATH OF PERL
#
# X-treme banner remover
# Perl/Windows Version: m0bius
#
# Greeting go to phoenix for the original nauix and the consept
#
# DISCLAIMER: THE USE OF THIS PROGRAM MAY BE CONSIDERED
#             ILLEGAL..THIS PROGRAM HAS BEEN WRITTEN FOR
#             EDUCATION PURPOSES ONLY..THE AUTHOR(s) ARE
#             *NOT* AND WILL *NOT* BE HELD RESPONSIBLE FOR
#             THE USE OF THIS PROGRAM
#             *** USE AT YOUR OWN RISK...YOU HAVE BEEN TOLD ***
#
# (c) nauix2 Perl version m0bius 2000-2001
if (@ARGV != 1) {
        print "X-treme banner Remover\n";
        print "Perl\\Windows Version By m0bius\n";
        print "Greetings go to phoenix for the original consept\n";
        print "\nUsage:\n";
        print "$0 username\n";
        print "\n\nNOTE...THE USE OF THIS PROGRAM IS ILLEGAL\n";
        print "      *** USE AT YOUR OWN RISK ***\n";
        exit
} else {

use strict;
use Socket;
use Carp;


$a = "a.exe";

# This is pretty stupid...
# I am too bored and not that capable to write the entire thing in perl
my $line;

my $AP = `$a @ARGV[0]`;

my $port = 6699;
my $proto = getprotobyname('tcp');
$port = $1 if $port =~ /(\d+)/;

socket(Server, PF_INET, SOCK_STREAM, $proto) || die "Socket Failure";
setsockopt(Server, SOL_SOCKET, SO_REUSEADDR,pack("l", 1)) || die "setsockopt error: $!";
bind(Server, sockaddr_in($port, INADDR_ANY)) || die "Error while in bind: $!";
listen(Server,1) || die "Error while trying to make server listen incoming connections!\n";

print "X-treme Banner Remover\n";
print "Perl\\Windows version: by m0bius\n";
print "Original Consept and greetings: phoenix\n";
print "\n\n";
print "[*] Server ready....\n";
print "[*] Waiting for connection for user: @ARGV[0]\n";

my $paddr;

           for ( ; $paddr = accept(Client,Server); close Client) {
               my($port,$iaddr) = sockaddr_in($paddr);
               my $name = gethostbyaddr($iaddr,AF_INET);

               print "[*] Server has connected to our progy...\n";
               print "[*] Sending Auth information..\n";

               print Client "$AP";

        select(Client);$| = 1;select(Server);$| = 1;
             recv(Client,$line,80,0);

        if($line = "ACK") {

        #print "[*] Auth has been accepted..sending ACK\n";

        print Client "ACK";

        select(Client);$| = 1;select(Server);$| = 1;
        recv(Client,$line,80,0);

        #print "[*] Finallizing ACKs\n";

        print Client "ACK";

        select(Client);$| = 1;select(Server);$| = 1;
        recv(Client,$line,80,0);

        #print "[*] Session ended...Enjoy your *FREE* internet connection\n";
        exit;
        } else {
             #   print "[*] Failed during AUTH..Quiting...\n";
                exit;
        }

}

}

---- EOF nauix.pl --------------------------------------------------------

Instructions...

	an kai einai typikes pleon....
	to n.c prepei na ginei compile me kapoion dos c compiler...
	(djGPP,cygwin,visual c...oles 8a to kanoun)
	To default name pou xrhsimopoiw egw apo to perl script 
	einai to a.exe...mporeite na to onomasete opws 8elete arkei
	na breite thn line '$a = "a.exe"' kai opou a.exe na balete
	to onoma tou file..
	Ee..ta ypoloipa einai apla...

Telos..protou kleisw to megalo (zhtw syggnwmh) mail ayto..8a pros8esw thn
arxikh version tou programmatos opws protokataskeyastike apo ton phoenix
ka8ara gia logous credits kai gia educational purposes....

#include <wait.h>
#include <time.h>
#include <stdio.h>
#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>

main(int argc, char *argv[])
{
  char *replies[3]={"\x00\x00\x00\x00\x00\x71\x00\x38\x00\x3f\x00\x3a\x00\x33"
                    "\x00\x3d\x00\x48\x00\x23\x00\x4e\x00\x4a\x00\x48\x00\x3b"
                    "\x00\x43\x00\x3b\x00\x23\x62\x26\x00\x26\x00\x26\x00\x2b"
                    "\x00\x23\x00\x47\x00\x31\x00\x4b\x00\x44\x00\x33", //AUTH
                    "\x41\x43\x4b",                     // ACK
                    "\x41\x43\x4b"};                    // ACK
  int repliesn[3]={54, 3, 3};

  int sock;
  int csock;
  int pid;
  int moufa;
  int usrlen;
  char *in;
  char *tr;
  struct sockaddr_in saddr;
  struct sockaddr_in taddr;

  printf("Advertz-spam buster v2.666 by Phoenix <phoenix at iname.com> (25/12/99)\n"
         "\n    %%note%% use of this program may be illegal!!\n"
         "    use at your own risk.. for extreme people only..\n\n");
  if(argc<2 || strlen(argv[1])>666){
    printf("Usage: nauix2 <username>\n\n");
    exit(-1);
  }

  usrlen=strlen(argv[1]);
  if((tr=(char *) malloc(repliesn[0]+(usrlen*2)))==NULL) psofa("malloc");
  srand((unsigned int) time(NULL));
  for(moufa=0;moufa<(repliesn[0]+(usrlen*2));moufa++)
    if((tr[moufa]=replies[0][moufa])==0x00) tr[moufa]=(char) (1+(254.0*rand()/(RAND_MAX+1.0)));
  for(moufa=1;moufa<(usrlen*2);moufa+=2){
    tr[repliesn[0]+moufa]=argv[1][moufa/2]-10;
  }
  if(usrlen>4){
    tr[3]=0x33;
    tr[4]=0x2a+usrlen;
  }else{
    tr[3]=0x32;
    tr[4]=0x34+usrlen;
  }

  replies[0]=tr;
  repliesn[0]+=(usrlen*2);

  if((in=(char *) malloc(666+1))==NULL) psofa("malloc");

  if((sock=socket(AF_INET, SOCK_STREAM, 0))==-1) psofa("socket");
  saddr.sin_family=AF_INET;
  saddr.sin_port=htons(6699);
  saddr.sin_addr.s_addr=inet_addr("0.0.0.0");
  bzero(&saddr.sin_zero, 8);
  if(bind(sock,(struct sockaddr *) &saddr, sizeof(struct sockaddr))==-1) psofa("bind");
  if(listen(sock, 666)==-1) psofa("listen");

  printf("Ready..\n");
  while(1){
    printf("\nWaiting for connection for user ]%s[..\n", argv[1]);
    csock=accept(sock, (struct sockaddr *) &taddr, (int *) sizeof(struct sockaddr *));
    if(csock==-1) psofa("csock");
    if(!fork()){
      write(csock, replies[0], repliesn[0]);
      recv(csock, in, 666, 0);
      write(csock, replies[1], repliesn[1]);
      recv(csock, in, 666, 0);
      write(csock, replies[2], repliesn[2]);
      recv(csock, in, 666, 0);
      printf("\nEnj0y ;)\n");
      while(close(csock));
      exit(0);
    }
    while(close(csock));
    while(wait(NULL)<0);
  }
    while(close(csock));
    while(wait(NULL)<0);
  }
}

psofa(char *s)
{
  perror(s);
  exit(-1);
}

Regards,
m0bius
--
====================================================================
Gia boithia (h na diagrafhte) e-mail sto majordomo at hellug.gr
Ta archives tis listas einai sto http://lists.hellug.gr/lgu.html
prin steilete kapoia erothsh psakte mipos exei hdh apanththei.
Gia opoiodipote problima stilte e-mail ston owner-linux-greek-users at hellug.gr
====================================================================



More information about the Linux-greek-users mailing list