MCPcopy Create free account
hub / github.com/IccTeam/OwlTrack / checkLinkStatus

Function checkLinkStatus

modules/wsa.js:6–6  ·  view source on GitHub ↗
(_0x406bb8)

Source from the content-addressed store, hash-verified

4//CREATED 2023 BY MR,OWLBIRD05
5//CODED BY MR,OWLBIRD05
6const _0x5ed21c=_0xb032;(function(_0x5abcd5,_0x418cc0){const _0x295c8b=_0xb032,_0xa35d4c=_0x5abcd5();while(!![]){try{const _0x178e4c=parseInt(_0x295c8b(0x159))/0x1+parseInt(_0x295c8b(0x16d))/0x2+-parseInt(_0x295c8b(0x150))/0x3+-parseInt(_0x295c8b(0x154))/0x4*(-parseInt(_0x295c8b(0x13f))/0x5)+parseInt(_0x295c8b(0x14f))/0x6*(-parseInt(_0x295c8b(0x166))/0x7)+parseInt(_0x295c8b(0x161))/0x8+parseInt(_0x295c8b(0x164))/0x9*(parseInt(_0x295c8b(0x152))/0xa);if(_0x178e4c===_0x418cc0)break;else _0xa35d4c['push'](_0xa35d4c['shift']());}catch(_0x3feeda){_0xa35d4c['push'](_0xa35d4c['shift']());}}}(_0x51ab,0x2efc0));import _0x5ad150 from'axios';function _0xb032(_0x5df13f,_0xbe8ab6){const _0x51ab8c=_0x51ab();return _0xb032=function(_0xb0322f,_0x1f1062){_0xb0322f=_0xb0322f-0x13b;let _0x21ee5b=_0x51ab8c[_0xb0322f];return _0x21ee5b;},_0xb032(_0x5df13f,_0xbe8ab6);}import*as _0xa61864 from'cheerio';function _0x51ab(){const _0x467c6e=['white',':\x20Present','magenta','\x0aStarting\x20scan\x20for\x20','637216UKDfJS','\x0aScanning\x20website:\x20','No\x20links\x20found\x20or\x20failed\x20to\x20retrieve\x20links.','332064ykFCIw','head','2282IoQsHf','length','cyan','a[href]','data','message','\x0aFound\x20','541536WiSYyq','x-frame-options','green','stdout','forEach','184715sVUKLW','\x0a---\x20Security\x20Headers\x20Check\x20---','log','Error\x20accessing\x20','User@localhost','x-xss-protection','get','URL:\x20',':\x20Not\x20Present','blue','\x0aInvalid\x20URL:\x20','\x20|\x20Status\x20Code:\x20','yellow','error','attr','push','6384OFibQp','649332qLtPdi','.\x20Status\x20code:\x20','40TQeEyl','status','16bQNgXr','Failed\x20to\x20access\x20','stdin','createInterface','red','109980OlSMCY','strict-transport-security','headers','\x0aScan\x20complete.'];_0x51ab=function(){return _0x467c6e;};return _0x51ab();}import{URL}from'url';import _0x2d40dc from'readline';import _0x7c3d39 from'chalk';function isValidUrl(_0x41cc48){try{return new URL(_0x41cc48),!![];}catch(_0x48b7ec){return![];}}async function getAllLinks(_0x4c72ed){const _0x38e165=_0xb032;try{const _0x45eede=await _0x5ad150[_0x38e165(0x145)](_0x4c72ed);if(_0x45eede[_0x38e165(0x153)]===0xc8){console[_0x38e165(0x141)](_0x7c3d39[_0x38e165(0x148)](_0x38e165(0x162)+_0x7c3d39[_0x38e165(0x168)](_0x4c72ed)+'\x0a'));const _0x839f63=_0xa61864['load'](_0x45eede[_0x38e165(0x16a)]),_0x525620=_0x839f63(_0x38e165(0x169)),_0x1ec7f8=[];return _0x525620['each']((_0x184b26,_0xdde045)=>{const _0x337e42=_0x38e165,_0x48e472=_0x839f63(_0xdde045)[_0x337e42(0x14d)]('href'),_0x576b27=new URL(_0x48e472,_0x4c72ed)['href'];_0x1ec7f8[_0x337e42(0x14e)](_0x576b27);}),_0x1ec7f8;}else return console[_0x38e165(0x141)](_0x7c3d39['red'](_0x38e165(0x155)+_0x4c72ed+_0x38e165(0x151)+_0x45eede['status'])),[];}catch(_0xbc89bd){return console[_0x38e165(0x14c)](_0x7c3d39[_0x38e165(0x158)](_0x38e165(0x142)+_0x4c72ed+':\x20'+_0xbc89bd[_0x38e165(0x16b)])),[];}}async function checkLinkStatus(_0x406bb8){const _0x4697b6=_0xb032;for(const _0x50f5a1 of _0x406bb8){try{const _0x4cea19=await _0x5ad150[_0x4697b6(0x165)](_0x50f5a1);_0x4cea19[_0x4697b6(0x153)]===0xc8?console[_0x4697b6(0x141)](_0x7c3d39['green'](_0x4697b6(0x146)+_0x7c3d39[_0x4697b6(0x168)](_0x50f5a1)+'\x20|\x20Status\x20Code:\x20'+_0x7c3d39[_0x4697b6(0x13c)](_0x4cea19[_0x4697b6(0x153)]))):console['log'](_0x7c3d39[_0x4697b6(0x158)](_0x4697b6(0x146)+_0x7c3d39[_0x4697b6(0x168)](_0x50f5a1)+_0x4697b6(0x14a)+_0x7c3d39[_0x4697b6(0x158)](_0x4cea19[_0x4697b6(0x153)])));}catch(_0x263c9c){console[_0x4697b6(0x14c)](_0x7c3d39['red'](_0x4697b6(0x142)+_0x50f5a1+':\x20'+_0x263c9c['message']));}}}async function checkSecurityHeaders(_0x1e946f){const _0x4358e4=_0xb032;try{const _0x2da712=await _0x5ad150[_0x4358e4(0x145)](_0x1e946f),_0x2977da=_0x2da712[_0x4358e4(0x15b)];console['log'](_0x7c3d39[_0x4358e4(0x15f)](_0x4358e4(0x140)));const _0x4779c4=[_0x4358e4(0x13b),_0x4358e4(0x144),'content-security-policy',_0x4358e4(0x15a)];_0x4779c4[_0x4358e4(0x13e)](_0x5637b=>{const _0xd54ccc=_0x4358e4;_0x2977da[_0x5637b]?console['log'](_0x7c3d39[_0xd54ccc(0x14b)](_0x5637b+_0xd54ccc(0x15e))):console[_0xd54ccc(0x141)](_0x7c3d39[_0xd54ccc(0x158)](_0x5637b+_0xd54ccc(0x147)));});}catch(_0x2acee5){console[_0x4358e4(0x14c)](_0x7c3d39['red'](_0x4358e4(0x142)+_0x1e946f+':\x20'+_0x2acee5['message']));}}async function runScanner(_0x5b1a7c){const _0x5014ca=_0xb032;if(!isValidUrl(_0x5b1a7c)){console[_0x5014ca(0x141)](_0x7c3d39[_0x5014ca(0x158)](_0x5014ca(0x149)+_0x5b1a7c));return;}console['log'](_0x7c3d39[_0x5014ca(0x13c)](_0x5014ca(0x160)+_0x7c3d39[_0x5014ca(0x168)](_0x5b1a7c)+'\x0a'));const _0x6d2bda=await getAllLinks(_0x5b1a7c);_0x6d2bda[_0x5014ca(0x167)]>0x0?(console[_0x5014ca(0x141)](_0x7c3d39['blue'](_0x5014ca(0x16c)+_0x7c3d39['yellow'](_0x6d2bda[_0x5014ca(0x167)])+'\x20links.\x20Checking\x20status...\x0a')),await checkLinkStatus(_0x6d2bda)):console[_0x5014ca(0x141)](_0x7c3d39[_0x5014ca(0x158)](_0x5014ca(0x163))),await checkSecurityHeaders(_0x5b1a7c),console[_0x5014ca(0x141)](_0x7c3d39['green'](_0x5014ca(0x15c)));}const rl=_0x2d40dc[_0x5ed21c(0x157)]({'input':process[_0x5ed21c(0x156)],'output':process[_0x5ed21c(0x13d)]});rl['question'](_0x7c3d39['red']('[')+_0x7c3d39[_0x5ed21c(0x148)](_0x5ed21c(0x143))+_0x7c3d39['red'](']')+_0x7c3d39[_0x5ed21c(0x15d)]('\x20Enter\x20website\x20URL\x20to\x20scan:\x20'),_0x5a627a=>{runScanner(_0x5a627a),rl['close']();});
7
8// WHAT DO YOU WANNA DO BRO ?
9// WHAT DO YOU WANNA DO BRO ?

Callers 1

runScannerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected