venus-pit 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "venus-pit",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Express.js-based tarpit",
5
5
  "main": "dist/venus.bundle.js",
6
6
  "type": "module",
@@ -31,15 +31,15 @@ function selfDestruct(route) {
31
31
  }
32
32
  }
33
33
 
34
- function pit(app, instanceRoot) {
34
+ function pit(app, instanceRoot, req) {
35
35
  let newRoute = `${instanceRoot.path}${makeRoute()}/`
36
- console.log("creating a new route: " + newRoute)
36
+ console.log(`Creating route ${newRoute} for UA ${req.headers['user-agent']}`)
37
37
 
38
38
  const handler = (req, res) => {
39
39
  // use a promise to avoid a stack overflow
40
40
  Promise.resolve().then(() => {
41
41
  // reasonable server response time, should waste cpu cycles
42
- setTimeout(() => {res.send(tar(pit(app, instanceRoot)))}, rand());
42
+ setTimeout(() => {res.send(tar(pit(app, instanceRoot, req)))}, rand());
43
43
 
44
44
  // prevent memory leak by cleaning up old routes
45
45
  selfDestruct(newRoute)
package/src/venus.js CHANGED
@@ -7,7 +7,7 @@ function venus(app, root="UNSET") {
7
7
  const instanceRoot = new venusRoot(root);
8
8
  console.log('path: ' + instanceRoot.path)
9
9
  app.get(instanceRoot.path, (req, res) => {
10
- let firsturl = pit(app, instanceRoot) // this will start the recursive hell known as a tarpit
10
+ let firsturl = pit(app, instanceRoot, req) // this will start the recursive hell known as a tarpit
11
11
  res.send(nightlock(`<a href='${firsturl}'>If you are a human being, I would suggest closing this tab, and if you arent, have fun losing money :3</a>`))
12
12
  console.log(`Creating tarpit for:\nuser-agent- ${req.headers['user-agent']}\nIP- ${req.ip}`)
13
13
  })
package/testing/venus.js CHANGED
@@ -2655,16 +2655,16 @@ which.
2655
2655
  in on at by for from with about under over
2656
2656
  `.trim().split(/\s+/),u=`
2657
2657
  for and nor but or yet so because since although when if
2658
- `.trim().split(/\s+/),m="ability access accident account back bad balance ball bank chemistry connection drama depth direction dad desk depression dirt ear earth effect eye frame fact family fortune game garbage guest guidance job key kind king knowledge".split(" ").join(" ")+c.join(" ")+l.join(" ")+p.join(" ")+d.join(" ")+h.join(" ")+u.join(" ");var f=n(6982),g=n.n(f);let b=m.split(" "),w=s().Router(),y=new Map,v=!1,x=function(n,o="UNSET"){let r=new e(o);return console.log("path: "+r.path),n.get(r.path,(e,o)=>{let s=function e(a,n){let o=`${n.path}${function(){let e=Math.floor(10*Math.sqrt(Math.random())),a="";for(let t=0;t<e;t++)a=a+function(){let e=g().randomInt(0,b.length);return b[e]}()+"-";return a.endsWith("-")&&(a=a.slice(0,-1)),a}()}/`;console.log("creating a new route: "+o);let r=(r,s)=>{Promise.resolve().then(()=>{setTimeout(()=>{var o;let r,c,l,p;s.send((o=e(a,n),r=c=t(i,2),l=t(i,Math.floor(10*Math.random())+1),p=t(i,50),`
2658
+ `.trim().split(/\s+/),m="ability access accident account back bad balance ball bank chemistry connection drama depth direction dad desk depression dirt ear earth effect eye frame fact family fortune game garbage guest guidance job key kind king knowledge".split(" ").join(" ")+c.join(" ")+l.join(" ")+p.join(" ")+d.join(" ")+h.join(" ")+u.join(" ");var f=n(6982),g=n.n(f);let b=m.split(" "),w=s().Router(),y=new Map,v=!1,x=function(n,o="UNSET"){let r=new e(o);return console.log("path: "+r.path),n.get(r.path,(e,o)=>{let s=function e(a,n,o){let r=`${n.path}${function(){let e=Math.floor(10*Math.sqrt(Math.random())),a="";for(let t=0;t<e;t++)a=a+function(){let e=g().randomInt(0,b.length);return b[e]}()+"-";return a.endsWith("-")&&(a=a.slice(0,-1)),a}()}/`;console.log(`Creating route ${r} for UA ${o.headers["user-agent"]}`);let s=(o,s)=>{Promise.resolve().then(()=>{setTimeout(()=>{var r;let c,l,p,d;s.send((r=e(a,n,o),c=l=t(i,2),p=t(i,Math.floor(10*Math.random())+1),d=t(i,50),`
2659
2659
  <head>
2660
- <title>${r}</title>
2660
+ <title>${c}</title>
2661
2661
  <meta name="description" content=${t(i,Math.floor(10*Math.random()))}></meta>
2662
2662
  </head>
2663
2663
  <body>
2664
- <h1>${c}</h1><br/>
2665
- <p>${p}</p>
2664
+ <h1>${l}</h1><br/>
2665
+ <p>${d}</p>
2666
2666
  <p id="realContent"></p>
2667
- <a href='${o}'>${l}</a>
2667
+ <a href='${r}'>${p}</a>
2668
2668
  <script>
2669
2669
  let result = 0;
2670
2670
  for (let i = 0; i < 1000000; i++) {
@@ -2676,7 +2676,7 @@ which.
2676
2676
  document.getElementById("realContent").innerText = "${t(i,50+Math.floor(10*Math.random()))}"
2677
2677
  </script>
2678
2678
  </body>
2679
- `))},Math.sqrt(10*Math.random())/2*1e3),y.has(o)&&(y.delete(o),w.stack=w.stack.filter(e=>!(e.route&&e.route.path===o)))})};return y.set(o,r),w.get(o,r),v||(a.use(w),v=!0),o}(n,r);o.send(function(e){let t=e.split(" ");for(let e=0;e<t.length;e++){let n=t[e];n in a&&(t.splice(e+1,0,a[n]),e++)}return t.join(" ")}(`<a href='${s}'>If you are a human being, I would suggest closing this tab, and if you arent, have fun losing money :3</a>`)),console.log(`Creating tarpit for:
2679
+ `))},Math.sqrt(10*Math.random())/2*1e3),y.has(r)&&(y.delete(r),w.stack=w.stack.filter(e=>!(e.route&&e.route.path===r)))})};return y.set(r,s),w.get(r,s),v||(a.use(w),v=!0),r}(n,r,e);o.send(function(e){let t=e.split(" ");for(let e=0;e<t.length;e++){let n=t[e];n in a&&(t.splice(e+1,0,a[n]),e++)}return t.join(" ")}(`<a href='${s}'>If you are a human being, I would suggest closing this tab, and if you arent, have fun losing money :3</a>`)),console.log(`Creating tarpit for:
2680
2680
  user-agent- ${e.headers["user-agent"]}
2681
2681
  IP- ${e.ip}`)}),r.path}})();var i=o.A;export{i as default};
2682
2682
  //# sourceMappingURL=venus.bundle.js.map
Binary file