Attic/programs/C3.c
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Tue, 18 Nov 2014 03:27:16 +0000
changeset 315 7bd723cb9b32
parent 198 2ce98ee39990
permissions -rw-r--r--
updated
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
}