Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*global exec*/
- // we have a certified certificate of pure raw clean clientside trust. anything your client says, we believe.
- const http = require('http') ;
- const port = process.env.PORT || 3000;
- const fs = require('fs');
- var i = 0;
- var recents = ["none found"]; //
- function execu(text, file){
- text = decodeURIComponent(text);
- recents.push(
- `<a href="?runfile=CODE`+i+`.js">`+text+`</a>`
- );
- i++;
- fs.writeFileSync('CODE'+i+'.js', text, 'utf8');//, () => {
- try{
- return require("./CODE"+i).result;
- }catch(err){
- return new Error("ur codez r badz");
- }
- }
- const requestHandler = (req, res) => {
- "use strict";
- res.setHeader('X-Powered-By', 'smart coders inc.orp');
- if(req.url.indexOf("admin") > -1){
- res.end(`
- <html>
- <body>
- <form>
- <input type="text" placeholder="Username (admin)" />
- <input type="text" placeholder="Password (password)" />
- <button><a href="javascript:(function()%7Blocation.href%20%3D%20%22https%3A%2F%2Fevalbot-pfgc9.c9users.io%2F%3Fshell%3D%22%2BencodeURIComponent(prompt(%22code%20here%3A%22%2C%22echo%20%5C%22hello%2C%20world%5C%22'%22))%7D)()">Access Shell</a></button>
- </form>
- </body>
- </html>
- `);
- return;
- }
- if(req.url.indexOf("/?shell=") > -1) {
- res.end(`
- <html>
- <body>
- <b>Connected Securely to Secure Shell</b>
- <tt>
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
- Someone could be eavesdropping on you right now (man-in-the-middle attack)!
- It is also possible that a host key has just been changed.
- The fingerprint for the ECDSA key sent by the remote host is
- 82:90:11:b4:gg:a4:92:0p:ll:m6:23:he:x5:28:aa:a9.
- Please contact your system administrator.
- $>
- </tt>
- <form action="/" method="get">
- <input type="text" placeholder="> Command..." name="command" />
- <button><a href="javascript:(function()%7Blocation.href%20%3D%20%22https%3A%2F%2Fevalbot-pfgc9.c9users.io%2F%3Fcommand%3D%22%2BencodeURIComponent(prompt(%22code%20here%3A%22%2C%22module.exports.result%3D'hello%2C%20world'%22))%7D)()">Send</a></button>
- </form>
- </body>
- </html>
- `);
- return;
- }
- console.log(req.url, req.url.split('/?command=')[1]);
- let output = ``;
- if(req.url.split('/?command=')[1]) output = execu(req.url.split('/?command=')[1]);
- if(req.url.split('/?command=')[1] || req.url.split('/?runfile=')[1]){
- if(req.url.split('/?runfile=')[1]){
- res.end(`Ran Code: $(`+"something, reading file contents is hard"+`). <b>Result</b>: (module.exports.result) \n\n`+(() => {try{
- return require(req.url.split('/?runfile=')[1]).result;
- }catch(err){
- return new Error("ur codez r badz");
- }})());
- }
- res.end(`Ran Code: $(`+decodeURIComponent(req.url.split('/?command=')[1])+`). <b>Result</b>: (module.exports.result) \n\n`+output);
- return;
- }
- void(req.url.split('/?command=')[1]); // req.url.split('/?command=')[1]
- res.end('<html>Append ?command=[encodeURIComponent("js code...")] to write your js. You may also click <a href='+`javascript:(function()%7Blocation.href%20%3D%20%22https%3A%2F%2Fevalbot-pfgc9.c9users.io%2F%3Fcommand%3D%22%2BencodeURIComponent(prompt(%22code%20here%3A%22%2C%22module.exports.result%3D'hello%2C%20world'%22))%7D)()`+'>this link</a><h1>Recent scripts: </h1><br><ul><li>'+recents.join("</li><li>")+'</li></ul> <!-- admin cp at /controlpanel/login/secure/admin.php --></html>');
- };
- const server = http.createServer(requestHandler);
- server.listen(port, (err) => {
- if (err) {
- return console.log('something bad happened', err);
- }
- console.log(`server is listening on ${port}`);
- })
Advertisement
Add Comment
Please, Sign In to add comment