programs/C3.c
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Sun, 22 Sep 2013 15:35:50 +0100
changeset 93 82ac034dcc9d
parent 27 5bf1f248407c
permissions -rw-r--r--
brought order into the repository
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
}