Re: [Hackmeeting] Anonimizzare tracce pcap

Poista viesti

Vastaa
Lähettäjä: vecna
Päiväys:  
Vastaanottaja: hackmeeting
Aihe: Re: [Hackmeeting] Anonimizzare tracce pcap
ZioPRoTo (Saverio Proto) wrote:

| ho trovato questo:
| http://ita.ee.lbl.gov/html/contrib/tcpdpriv.html

|
| Ma funziona solo su BSD, e non sono riuscito a farlo funzionare ne su
| Linux ne su Mac OS X. Su Linux non mi compila proprio perchè mi
| mancano degli header files, su Mac OS X compila ma poi quando lo
| lancio mi da un errore strano sull'output del mount :O


c'e' una grande legge da tenere in considerazione quando si compila
qualcosa di piccolo:

1) se qualcosa non va, sia in un configure, che dentro un makefile, che
dentro il codice: commentalo

2) se il software non funziona, decommentalo e risolvi l'errore

:)

quali sono gli header file che non vanno ?


e comunque e' vergognoso:

/*
~ * at startup, generate a seed for the random number generator
~ *
~ * (it is somewhat amusing how driven i am to say "sum = 0" and
~ * "memset(&x, 0, sizeof x)" below, given that i *want* random
~ * bits...)
~ */

static void
rand_start(void)
{
~    struct {
    struct timeval tv;
    struct timezone tz;
    uid_t uid;
    pid_t pid;
~    } x;
~    unsigned sum = 0;
~    int n, gotline;
~    unsigned line[200/sizeof (unsigned)];
~    FILE *pfd;


~    memset(&x, 0, sizeof x);


~    if (gettimeofday(&x.tv, &x.tz) == -1) {
    perror("gettimeofday");
    exit(1);
~    }
~    x.uid = getuid();
~    x.pid = getpid();


~    /* now, sum it all, shifting all the time */
~    sum = rand_accum(sum, (unsigned *)&x, sizeof x/sizeof(unsigned));


    /*
     * we run through all the mounted file systems
     * (as reported by mount, anyway) doing a stat
     * on them.  note that SVR4 uses "mountpoint on device",
     * whereas BSD uses "device on mountpoint".
     */


~    pfd = popen("/sbin/mount", "r");
~    if (pfd == NULL) {



questi pubblicano un software che USA L'OUTPUT DI MOUNT E NETSTAT per
accumulare dati random !?

vabe' che e' di 12 anni fa, ma...