From b4c8eae5358953b4b55f6a7df2e8c9836b8d3c13 Mon Sep 17 00:00:00 2001 From: spv420 Date: Sun, 31 Jul 2022 03:00:16 -0400 Subject: cock --- src/stage4/log.js | 15 +++++++++++++++ src/stage4/main.js | 20 ++++++++++++++++++-- 2 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 src/stage4/log.js diff --git a/src/stage4/log.js b/src/stage4/log.js new file mode 100644 index 0000000..cb6357f --- /dev/null +++ b/src/stage4/log.js @@ -0,0 +1,15 @@ +function p0laris_log() { + var args = []; + for (var i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + + if (args.length > 1) { + printf.apply(this, [args[0] + "\n"].concat(args.slice(1))); + } else { + printf.apply(this, [args[0] + "\n"]); + } + syslog.apply(this, [LOG_SYSLOG].concat(args)); + + return; +} \ No newline at end of file diff --git a/src/stage4/main.js b/src/stage4/main.js index 328bb0a..959f4b5 100644 --- a/src/stage4/main.js +++ b/src/stage4/main.js @@ -1,9 +1,25 @@ +var socket = scall_wrapper("socket"); +var htons = scall_wrapper("htons"); +var inet_addr = scall_wrapper("inet_addr"); +var dup2 = scall_wrapper("dup2"); +var bind = scall_wrapper("bind"); +var listen = scall_wrapper("listen"); +var accept = scall_wrapper("accept"); +var close = scall_wrapper("close"); +var printf = scall_wrapper("printf"); +var AF_INET = 2; +var SOCK_DGRAM = 2; +var SOCK_DGRAM = 2; +var IPPROTO_UDP = 17; + function main() { - printf("[*] landed in stage4\n"); - syslog(LOG_SYSLOG, "we out here"); + syslog(LOG_SYSLOG, "__p0laris_LOG_START__"); + p0laris_log("[*] we out here"); + p0laris_log("[*] landed in stage4"); printf("[*] p0laris.dyld_shc_slide=0x%08x\n", p0laris.dyld_shc_slide); printf("[*] p0laris.racoon_slide=0x%08x\n", p0laris.racoon_slide); + syslog(LOG_SYSLOG, "__p0laris_LOG_END__"); return 0; } \ No newline at end of file -- cgit v1.2.3