diff options
author | flz <flz@FreeBSD.org> | 2005-03-13 21:54:37 +0000 |
---|---|---|
committer | flz <flz@FreeBSD.org> | 2005-03-13 21:54:37 +0000 |
commit | 83e48493d22394fcd9eb89435d05b4149688b686 (patch) | |
tree | 7c029d619d191ed6334cdeac62bd117ae139f953 /security/dissembler/files | |
parent | 5cc1e1ca977e9b9bef6a0331fad627ce175017bc (diff) | |
download | FreeBSD-ports-83e48493d22394fcd9eb89435d05b4149688b686.zip FreeBSD-ports-83e48493d22394fcd9eb89435d05b4149688b686.tar.gz |
- Add dissembler 0.9, Tiny and clever tool to convert shellcode to ASCII.
PR: ports/78783
Submitted by: Jonathan <onatan@gmail.com>
Diffstat (limited to 'security/dissembler/files')
-rw-r--r-- | security/dissembler/files/patch-dissembler.c | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/security/dissembler/files/patch-dissembler.c b/security/dissembler/files/patch-dissembler.c new file mode 100644 index 0000000..c4c26da --- /dev/null +++ b/security/dissembler/files/patch-dissembler.c @@ -0,0 +1,52 @@ +--- dissembler.c.orig Wed Mar 19 04:21:37 2003 ++++ dissembler.c Sun Mar 13 14:45:45 2005 +@@ -21,6 +21,8 @@ + #include <ctype.h> + #include <time.h> + #include <stdlib.h> ++#include <string.h> ++#include <unistd.h> + + #define VERSION "0.9" + #define CHR "%_01234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-" +@@ -29,6 +31,29 @@ + void usage(char *); + void banner(); + char *gen(unsigned int, unsigned int, char *); ++char *strfry(char *); ++ ++ ++char *strfry(char *string) { ++ int len, a, b; ++ int init = 0; ++ char c; ++ ++ if (!init) { ++ srand(time((time_t *)NULL)); ++ init = 1; ++ } ++ ++ len = strlen (string); ++ for (a = 0; a < len; ++a) { ++ b = rand () % len; ++ c = string[a]; ++ string[a] = string[b]; ++ string[b] = c; ++ } ++ ++ return string; ++} + + int main(int argc, char* argv[]) + { +@@ -214,8 +239,9 @@ + fprintf(fh, "P"); + } + fprintf(fh,"\n"); +- if(fh != stdout) close(fh); ++ if(fh != stdout) fclose(fh); + free(mem-21); ++ return 0; + } + + void banner() |