32 lines
512 B
C
32 lines
512 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include "fun.h"
|
|
|
|
int main(int argc, const char *argv[])
|
|
{
|
|
if (argc < 3)
|
|
{
|
|
printf("Usage: %s [-hcl] <elf_path> \n", argv[0]);
|
|
exit(1);
|
|
}
|
|
|
|
char var = argv[1][1];
|
|
|
|
if (var == 'h')
|
|
{
|
|
printElf(argv[2]);
|
|
}
|
|
else if (var == 'i')
|
|
{
|
|
printElfFunc(argv[2]);
|
|
}
|
|
else if (var == 'c')
|
|
{
|
|
changeElf(argc, argv);
|
|
}
|
|
else
|
|
{
|
|
printf("You entered something else\n");
|
|
}
|
|
return 0;
|
|
} |