Created
November 2, 2017 22:34
-
-
Save picatz/e9df68e4b69e2d3c454c8015826a90bd to your computer and use it in GitHub Desktop.
Found some interesting code while monitoring Shodan
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
// I don't know what context. But, um. Be hella' cautious when messing with it because | |
// I have zero clue wtf it's actually becuase I just wanted to have it to look at | |
// later. | |
// Feel free to leave comments. <3 | |
// Not my code. | |
OpenSSElementById("login").style.left =(width / 2) - 480; | |
document.getElementById("loginForm").style.top = (height - 260) / 2; | |
document.getElementById("loginForm").style.left = (width / 2) - 150; | |
document.getElementById("ww").style.top = (height + 85) / 2; | |
document.getElementById("ww").style.left = (width / 2) - 170; | |
} | |
} | |
resizePage(); | |
window.onresize = function() { | |
resizePage(); | |
}; | |
var helpWindow_Login = null; | |
document.onkeydown = function (e) { | |
var theEvent = e || window.event; | |
var obj = theEvent.target || theEvent.srcElement; //获取事件源 | |
var t = obj.type || obj.getAttribute('type'); | |
var code = theEvent.keyCode || theEvent.which || theEvent.charCode; | |
if (theEvent.ctrlKey === true && code == 90){ | |
return false; | |
} | |
if(code == 112){ | |
var h = (window.screen.height-500)/2; | |
var w = (window.screen.width-600)/2; | |
var url = '../web_help_zh/web_help_zh.html'; | |
if (isEnglishLanguage) { | |
url = '../web_help_en/web_help_en.html'; | |
} | |
var helpWindow_ID = ''; | |
if (!helpWindow_Login) { | |
helpWindow_ID = 'helpwindow'; | |
}else { | |
helpWindow_ID = ''; | |
helpWindow_Login.close(); | |
helpWindow_Login = null; | |
} | |
helpWindow_Login = window.open(url,helpWindow_ID,'modal=yes,height=500,width=600,top='+h+',left='+w+',toolbar=no,menubar=no,scrollbars=no,resizable=yes,location=no,status=0,depended=yes'); | |
theEvent.keyCode = 0; | |
theEvent.canceBubble = true; | |
theEvent.returnValue = false; | |
return false; | |
} | |
if (code == 13) { | |
if (Ext.MessageBox.isVisible()) { | |
Ext.MessageBox.hide(); | |
var un = document.getElementById('username').value; | |
if (un === null || un.trim() === '') { | |
grey_btnBg('submitButton'); | |
document.getElementById('username').focus(); | |
return false; | |
} | |
var pwd = document.getElementById('password').value; | |
if (pwd === null || pwd.trim() === '') { | |
grey_btnBg('submitButton'); | |
document.getElementById('password').focus(); | |
return false; | |
} | |
document.getElementById('username').focus(); | |
return false; | |
} | |
if(document.activeElement.id == 'resetButton'){ | |
resetData(); | |
return false; | |
} | |
login(); | |
return false; | |
} | |
return true; | |
}; | |
window.onhelp = function() { | |
return false; | |
}; | |
function isPbxMode_callback() { | |
this.execute = function(responseText) { | |
if (responseText !== '0' && responseText !== '-1') { | |
var userLinkDom = document.getElementById('selfServiceEntrySpan'); | |
userLinkDom.style.display = "inline"; | |
userLinkDom.onclick = function() { | |
var Userport = responseText; | |
var location = window.location; | |
var url = location.protocol + '//' + location.hostname + ':' + Userport + '/professional/user/login.html'; | |
location.href = url; | |
}; | |
} | |
}; | |
} | |
function isPbxMode() { | |
var xmlHttp = createXmlHttpRequest(); | |
if (xmlHttp === null) { | |
return; | |
} | |
submitAjax (xmlHttp, 'POST', "checkVoiceService.cgi", true, 'null', new isPbxMode_callback()); | |
}; | |
document.write('<script language="javascript" type="text/javascript" src="../professional/ext/ext-all-login.js"></'+'script> '); | |
window.onload = function(){ | |
isPbxMode(); | |
function getBrowserInfo() | |
{ | |
var agent = navigator.userAgent.toLowerCase() ; | |
var regStr_ie = /msie [\d.]+;/gi ; | |
var regStr_ff = /firefox\/[\d.]+/gi; | |
var regStr_chrome = /chrome\/[\d.]+/gi ; | |
var regStr_saf = /safari\/[\d.]+/gi ; | |
//IE | |
if(agent.indexOf("msie") > 0) | |
{ | |
return agent.match(regStr_ie) ; | |
} | |
if(agent.indexOf("firefox") > 0) | |
{ | |
return agent.match(regStr_ff) ; | |
} | |
if(agent.indexOf("chrome") > 0) | |
{ | |
return agent.match(regStr_chrome) ; | |
} | |
if(agent.indexOf("safari") > 0 && agent.indexOf("chrome") < 0) | |
{ | |
return agent.match(regStr_saf) ; | |
} | |
} | |
var browser = getBrowserInfo() ; | |
var verinfo = (browser+"").replace(/[^0-9.]/ig,""); | |
var supportBrowserVersion = ''; | |
var updateMessageCh = '检测到您的浏览器版本太低,为了更好的浏览体验,建议您升级浏览器版本至'; | |
var updateMessageEn = 'Detects your browser version is too low, in order to better browsing experience, we recommend that you upgrade your browser version to '; | |
var updateMessageEndCh = '及以上。'; | |
var updateMessageEndEn = ' or above.'; | |
if((browser+"").indexOf("msie")!==-1 && Number(verinfo) < 10 ) | |
{ | |
var tempAgent = navigator.userAgent.toLowerCase(); | |
if((tempAgent.indexOf("trident/5.0") !==-1) || (tempAgent.indexOf('trident/4.0') !== -1)) { | |
supportBrowserVersion = "Internet Explorer 10"; | |
alert(isEnglishLanguage?(updateMessageEn + supportBrowserVersion + updateMessageEndEn):(updateMessageCh + supportBrowserVersion + updateMessageEndCh)); | |
} | |
} | |
else if((browser+"").indexOf("chrome")!==-1 && Number(verinfo.split(".")[0]) < 30 ) | |
{ | |
supportBrowserVersion = "Chrome 30"; | |
alert(isEnglishLanguage?(updateMessageEn + supportBrowserVersion + updateMessageEndEn):(updateMessageCh + supportBrowserVersion + updateMessageEndCh)); | |
} | |
else if((browser+"").indexOf("firefox")!==-1 && Number(verinfo.split(".")[0]) < 31 ) | |
{ | |
supportBrowserVersion = "Firefox 31"; | |
alert(isEnglishLanguage?(updateMessageEn + supportBrowserVersion + updateMessageEndEn):(updateMessageCh + supportBrowserVersion + updateMessageEndCh)); | |
} | |
}; | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment