Skip to content

Instantly share code, notes, and snippets.

@jNizM
Last active December 11, 2015 21:38
Show Gist options
  • Save jNizM/4663323 to your computer and use it in GitHub Desktop.
Save jNizM/4663323 to your computer and use it in GitHub Desktop.
[HTML] CoD4 config checker (Blacklist)
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>Config Checker</title>
<style type="text/css">
body{background-color:#000}
.red{background-color:red}
.orange{background-color:orange}
.green{background-color:green}
#copy{float:right}
small{margin:0 3px 1px 9px}
a{color:#3d3d3d}
#wrap{width:880px;background-color:#3d3d3d;overflow:hidden;color:#fefefe;margin:0 auto}
textarea,input,ul{width:865px}
pre{display:inline;margin:0;padding:0}
textarea{display:block;height:330px;border:0;outline:none;margin:2px auto 0;padding:0}
input{display:block;background-color:#ededed;border:1px solid #fafafa;margin:5px auto 0}
ul{list-style-type:none;margin:5px auto 0;padding:0}
ul li{padding-left:3px}
p{font-size:13px;margin:10px}
#violations{display:none;color:#0a0a0a}
</style>
<script type="text/javascript">
var config=[];
function checkCfg()
{
if(document.getElementById("cfg").value.length===0)
{
document.getElementById("violations").innerHTML="";
document.getElementById("violations").style.display="none"
}
else
{
var a="";
var e,d;
var c=["aim.autoaim","aimbot","chams","hax_aimbot","hax_autoshoot","hax_distesp","hax_killsounds","hax_killspam","hax_nameesp","hax_radar","hax_stats","hax_wallhack","Mom_aimbot","Mom_autoshoot","Mom_distesp","Mom_killspam","Mom_nameesp","Mom_radar","Mom_stats","Mom_wallhack","nameesp","norecoil","recoil","wallhack","wh","_aimbot","_autoshoot","_crosshair","_crosshairhealth","_infoenemy","_killsounds","_killspam","_nameesp","_radar","_simpletrace","_stats","_wallhack"];
var f=["aim","chams","color","esp","health","info","key","kill","radar","recoil","trace","tracker","vstr","wall"];
config=document.getElementById("cfg").value.split(/\r\n|\r|\n/i);
for(e=0;e<config.length;e++)
{
var b=config[e].match(/^bind .*? (.*)$/i);
if(b!==null&&b.length>0)
{
for(d=0;d<f.length;d++)
{
if(b[b.length-1].toLowerCase().indexOf(f[d].toLowerCase())!==-1)
{
a+='<li class="orange">Line '+(e+1)+": Disallowed BIND contents <em>"+f[d]+"</em> in <pre>"+config[e]+'</pre> (<a href="#" onclick="removeLine('+(e+1)+');return false;">Remove this line</a>)</li>';
break
}
}
}
else
{
b=config[e].match(/^seta (.*?) (.*)$/i);if(b!==null&&b.length>0)
{
for(d=0;d<c.length;d++)
{
if(b[b.length-2].toLowerCase()===c[d].toLowerCase())
{
a+='<li class="red">Line '+(e+1)+": Disallowed DVAR name <em>"+c[d]+'</em> (<a href="#" onclick="removeLine('+(e+1)+');return false;">Remove this line</a>)</li>';
break
}
}
for(d=0;d<f.length;d++)
{
if(b[b.length-1].toLowerCase().indexOf(f[d].toLowerCase())!==-1)
{
a+='<li class="orange">Line '+(e+1)+": Disallowed DVAR contents <em>"+f[d]+"</em> in <pre>"+config[e]+'</pre> (<a href="#" onclick="removeLine('+(e+1)+');return false;">Remove this line</a>)</li>';
break
}
}
}
}
}
if(a==="")
{
a='<li class="green">Your config is clean. Congratulations!</li>'
}
document.getElementById("violations").innerHTML=a;document.getElementById("violations").style.display="block"
}
}
function removeLine(a)
{
config.splice(parseInt(a)-1,1);
document.getElementById("cfg").value=config.join("\n");checkCfg()
};
</script>
</head>
<body>
<div id="wrap">
<small>Paste your config to the text area</small>
<form action="#" onsubmit="checkCfg();return false;">
<textarea name="cfg" id="cfg"></textarea>
<input type="submit" value="Scan" />
</form>
<ul id="violations">
<li>:)</li>
</ul>
<small>.</small>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment