summaryrefslogtreecommitdiff
path: root/libhack.c
diff options
context:
space:
mode:
authorepoch <epoch@hack.thebackupbox.net>2020-10-04 09:52:15 +0000
committerepoch <epoch@hack.thebackupbox.net>2020-10-04 09:52:15 +0000
commit135537af3501d8676c7b6ad1bee2f8a51f7b0ca2 (patch)
treea36e1ae3876ed3827d69bd0795140cd31c480718 /libhack.c
parent217fe99bdeff910bfedb375f970db0f5a9b4cc93 (diff)
downloadsegfault-135537af3501d8676c7b6ad1bee2f8a51f7b0ca2.tar.gz
segfault-135537af3501d8676c7b6ad1bee2f8a51f7b0ca2.zip
added example dlopen-able libhack.c and updated Makefile to actually be able to build segfault. was missing -ldl
Diffstat (limited to 'libhack.c')
-rw-r--r--libhack.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libhack.c b/libhack.c
new file mode 100644
index 0000000..b17e380
--- /dev/null
+++ b/libhack.c
@@ -0,0 +1,8 @@
+#include <unistd.h>
+#include <string.h>
+
+#define mywrite(a,b) write(a,b,strlen(b))
+
+void c_hack(int fd,char *from,char *line,...) {
+ mywrite(fd,"PRIVMSG #cmd :lol. this is in a shared library.\r\n");
+}