programs/C3.c
author Christian Urban <urbanc@in.tum.de>
Thu, 04 Oct 2012 13:43:57 +0100
changeset 27 5bf1f248407c
permissions -rw-r--r--
C3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
27
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
#include<stdio.h>
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
#include<string.h>
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
// simple program used for a bufferflow attack
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
//
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
// for installation notes see C0.c
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
//
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
// can be called with 
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
//
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
//   ./C3 `./args3`
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
main(int argc, char **argv)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    13
{
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
        char buffer[80];
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    16
        strcpy(buffer, argv[1]);
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    18
        return 1;
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    19
}