aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorflz <flz@FreeBSD.org>2005-03-14 05:54:37 +0800
committerflz <flz@FreeBSD.org>2005-03-14 05:54:37 +0800
commit83e48493d22394fcd9eb89435d05b4149688b686 (patch)
tree7c029d619d191ed6334cdeac62bd117ae139f953
parent5cc1e1ca977e9b9bef6a0331fad627ce175017bc (diff)
downloadfreebsd-ports-gnome-83e48493d22394fcd9eb89435d05b4149688b686.tar.gz
freebsd-ports-gnome-83e48493d22394fcd9eb89435d05b4149688b686.tar.zst
freebsd-ports-gnome-83e48493d22394fcd9eb89435d05b4149688b686.zip
- Add dissembler 0.9, Tiny and clever tool to convert shellcode to ASCII.
PR: ports/78783 Submitted by: Jonathan <onatan@gmail.com>
-rw-r--r--security/Makefile1
-rw-r--r--security/dissembler/Makefile32
-rw-r--r--security/dissembler/distinfo2
-rw-r--r--security/dissembler/files/patch-dissembler.c52
-rw-r--r--security/dissembler/pkg-descr3
5 files changed, 90 insertions, 0 deletions
diff --git a/security/Makefile b/security/Makefile
index 901f0d3985fa..84caa7f7d432 100644
--- a/security/Makefile
+++ b/security/Makefile
@@ -70,6 +70,7 @@
SUBDIR += didentd
SUBDIR += digest
SUBDIR += dirmngr
+ SUBDIR += dissembler
SUBDIR += donkey
SUBDIR += doorman
SUBDIR += doscan
diff --git a/security/dissembler/Makefile b/security/dissembler/Makefile
new file mode 100644
index 000000000000..33a4625311d0
--- /dev/null
+++ b/security/dissembler/Makefile
@@ -0,0 +1,32 @@
+# Ports collection makefile for: dissembler
+# Date created: 13 Mar 2005
+# Whom: Yonatan <onatan@gmail.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= dissembler
+PORTVERSION= 0.9
+CATEGORIES= security
+MASTER_SITES= http://www.phiral.com/research/
+DISTNAME= ${PORTNAME}_${PORTVERSION}
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= onatan@gmail.com
+COMMENT= A tool that polymorphs bytecode to a printable ASCII string
+
+WRKSRC= ${WRKDIR}/${DISTNAME}
+PLIST_FILES=bin/${PORTNAME}
+PORTDOCS= ${PORTNAME}.txt
+
+do-build:
+ ${CC} ${CFLAGS} -o ${WRKSRC}/${PORTNAME} ${WRKSRC}/${PORTNAME}.c
+
+do-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin/
+. if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.txt ${DOCSDIR}
+. endif
+
+.include <bsd.port.mk>
diff --git a/security/dissembler/distinfo b/security/dissembler/distinfo
new file mode 100644
index 000000000000..8fe60e7d3521
--- /dev/null
+++ b/security/dissembler/distinfo
@@ -0,0 +1,2 @@
+MD5 (dissembler_0.9.tgz) = a2e38b0c53f857453a8b4428a7abda4e
+SIZE (dissembler_0.9.tgz) = 4479
diff --git a/security/dissembler/files/patch-dissembler.c b/security/dissembler/files/patch-dissembler.c
new file mode 100644
index 000000000000..c4c26da99e8f
--- /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()
diff --git a/security/dissembler/pkg-descr b/security/dissembler/pkg-descr
new file mode 100644
index 000000000000..51d5f229f91d
--- /dev/null
+++ b/security/dissembler/pkg-descr
@@ -0,0 +1,3 @@
+Dissembler converts polymorphs bytecode to a printable ASCII string.
+
+WWW: http://www.phiral.com