Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

What language is this source code written in?

void(parent.main.control.document.body.innerHTML="<div class='counter'><span id='counter'>5000 Characters left</span></div><div class='functions'> AutoScroll <input class='checkbox' type='checkbox' id='autoscroll' checked='1' /> ----- <input style='background-color:#282828;color:white;border:1px solid black;' type='button' onClick='parent.parent.oc_code.q.refresh();' Value='Clear Chat' /> ------ <input style='background-color:#282828;color:white;border:1px solid black;' type='button' onClick='parent.parent.oc_code.recall_last();' Value='Recall Line' /> ------ <input style='background-color:#282828;color:white;border:1px solid black;' type='button' onClick='parent.parent.spam();' Value='Spam' /> ----- <input style='background-color:#282828;color:white;border:1px solid black;' type='button' onClick='parent.parent.stop();' Value='Stop' /> ----- <input style='background-color:#282828;color:white;border:1px solid black;' type='button' onClick='parent.parent.sendiftalk(parent.parent.getindexdiv());' Value='Auto-respond' /> ----- <input style='background-color:#282828;color:white;border:1px solid black;' type='button' onClick='parent.parent.view_log(parent.parent.post_array);' Value='View Chat Log' /></div><textarea name='oc_input' id='oc_input' class='maininput' onkeyup='count(this,5000);'onkeydown='count(this, 5000); return getKey(event, this);'></textarea>");


function getindexdiv() {
for (u=0;u<50000;u++) {
if (typeof(parent.main.chat.document.getElementsByTagName('div')[u]) == "undefined") {
break;
}
}
return u;
}
function sendiftalk(i) {
if (parent.main.control.document.getElementById('oc_input').value != "stop") {
for (u=i;u<50000;u++) {
var pause_between = false;
var check_new_message = false;
if (typeof(parent.main.chat.document.getElementsByTagName('div')[u]) != "undefined") {
if (parent.main.chat.document.getElementsByTagName('div')[u].getAttribute('class') == 'post') {
var f = parent.main.chat.document.getElementsByTagName('div')[u];
if (f.getElementsByTagName('div')[1]) {
if(f.getElementsByTagName('div')[1].getAttribute('class') == "postdiv highlight_to_me") {
o= f.getElementsByTagName('div')[1].innerHTML;
o = o.replace(/<span class=\"private_msg\">Whispers to you: <\/span>/,"");
o = o.replace(/<span class=\"public_msg\">Says to you: <\/span>/,"");
o = o.replace(/<\/div>/g,"");
o = o.replace(/<span class=\"username\">/g,"");
o = o.replace(/<span class=\"usernumber\">/g,"");
o = o.replace(/<\/span>/g,"");
o = o.replace(/<wbr>/g,"");
o = o.replace(/<i style=\"(.*?);\">(.*?)<\/i>/g,"$2");
o = o.replace(/<span style=\"(.*?);\">(.*?)/g,"$2");
o = o.replace(/<i>(.*?)<\/i>/g,"$1");
o = o.replace(/<a href=\"(.*?)\" target=\"(.*?)\">(.*?)<\/a>/g,"$1");
o = o.replace(/\&amp;/g, "&");
o = o.replace(/\&gt;/g, ">");
o = o.replace(/\&lt;/g, "<");
parent.parent.oc_code.SendMessage("/"+f.getElementsByTagName('span')[1].innerHTML+" Hello, you either whispered me, or sent me a message, or referenced my user number. The message you said was: "+o);
pause_between = true;
break;
}
}
}
}
else {
check_new_message = true;
break;
}
}
if (check_new_message === true) {
pause2(u);
}
if (pause_between === true) {
pause(u+2);
}
}
else {
parent.parent.oc_code.m_add_sysmsg(["You've stopped auto-responding."]);
}
}

function pause(i) {
setTimeout(function(){sendiftalk(i)}, 3900);
}
function pause2(i) {
setTimeout(function(){sendiftalk(i)}, 3900);
}
function stop() {
parent.main.control.document.getElementById('oc_input').value = "stop";
}
function spam() {
if (parent.main.control.document.getElementById('oc_input').value != "stop") {
parent.parent.oc_code.SendMessage(spam_array(parent.main.control.document.getElementById('oc_input').value));
pause3();
}
else {
parent.parent.oc_code.m_add_sysmsg(["You've stopped spamming."]);
}
}
function pause3() {
setTimeout("spam()", 3800);
}
function rand() {
a = "";
alp = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","Z","Y","Z","1","2","3","4","5","6","7","8","9","0"];
for (i=0;i<5;i++) {
r = Math.floor(Math.random()*(alp.length));
a += alp[r];
}
return a;
}
function color() {
colors = ["ydm","kwtss","pbjt","tc","smtm","ily","iat","fp","eg","sc","potg","ppp","smh","smb","siap","ktoti","jimp","csb","tob","mcu","fmls","lwtb","bftw","clav","gg", "taco"];
r = Math.floor(Math.random()*(colors.length));
return colors[r];
}
function emote() {
emotes = ["xD","-.-;","O.O","o.o;;",".___.","^___^","~^_^~","._.",">.>;;","O.o","C:",":3",";D","u_u","n_n","(>^_^>)","=.=",".-.",";o","x3",";3",";_;",";-*"];
r = Math.floor(Math.random()*(emotes.length));
return emotes[r];
}
function number() {
if (parent.main.control.document.getElementById('oc_input').value.search(/\+/) != -1) {
a = parent.main.control.document.getElementById('oc_input').value.split("+");
a = parseInt(a);
}
else {
a = 50;
}
return Math.floor(Math.random()*a)+1;
}
function swear() {
swears = ["welfare","wetb","wetback","wetspot","whacker","whash","whigger","whiskey","whiskeydick","whiskydick","whit","whitenigger","whites","whitetrash","whitey","whiz","whop","whore","whorefucker","whorehouse","wigger","willie","williewanker","willy","wn","wog","women's","wop","wtf","wuss","wuzzie","xtc","xxx","yankee","yellowman","zigabo","zipperhead"];
r = Math.floor(Math.random()*(swears.length));
return swears[r];
}
function spam_array(a) {
if (a.search(/\+/) != -1) {
a = a.split("+");
a = a[1].split(";");
}
else {
a = a.split(";");
}
ra = Math.floor(Math.random()*(a.length-1));
str = "";
for (var i in a[ra]) {
str += a[ra][i].replace(/\*/,swear()).replace(/%/,rand()).replace(/\^/,emote()).replace(/@/,color()).replace(/\$/,number());
}
return str;
}


function log_chat(i,arr) {
if (i > 300) {
i = 31;
parent.parent.oc_code.q.refresh();
}
for (u=i;u<400;u++) {
var check_new_message = false;
if (typeof(parent.main.chat.document.getElementsByTagName('div')[u]) != "undefined") {
if (parent.main.chat.document.getElementsByTagName('div')[u].getAttribute('class') == 'post') {
var f = parent.main.chat.document.getElementsByTagName('div')[u];
arr.push("<div class=\"post\">"+f.innerHTML+"</div>");
}
}
else {
check_new_message = true;
break;
}


}
if (check_new_message === true) {
pause4(u,arr);
}
}

function pause4(i,arr) {
setTimeout(function(){log_chat(i,arr)}, 3000);
}

var post_array = new Array();
log_chat(0,post_array);



function view_log(arr)
{
my_window= window.open ("", "mywindow1","status=1,width=650,height=350");
my_window.document.write("<html class='chat'><head><style type=\'text/css\'>* { padding: 0; margin: 0; }span.username { color: #00d8ff; font-family: Verdana, Arial, sans-serif; font-size:12px;}span.usernumber { color: #fbe420; font-family: Arial, sans-serif, Verdana; font-size: 10px; vertical-align:-1px; padding-left: 1px; padding-right: 1px;}html.chat { height: 100%; overflow-y: scroll;}body.chat { background-color: #000000; color: #f6b2f6; font-family: Arial, sans-serif, Verdana; font-size: 12px;}body.chat a { color: #FF00FF;}body.chat div.userin { color: #FF00FF; margin-left: 156px;}body.chat div.userout { color: #e0833b; margin-left: 156px;}body.chat div.post { clear: both; border-bottom: solid 1px #170915;}body.chat div.namediv { text-align: right; float: left; width: 150px;}body.chat div.postdiv { color: #f6b2f6; margin-left: 154px;}body.chat div.actiontag { text-align: right; float: left; padding-right: 1px; width: 150px; color: #fbe420;}body.chat div.actionline { color: #f6b2f6; padding-left: 1px; margin-left: 156px;}body.chat span.actionborders { color: #fbe420;}body.chat span.public_msg { color: #00f506; padding-right: 3px; padding-left:2px;}body.chat span.public_msg span { font-weight:normal;}body.chat span.private_msg { color: #fbe420; padding-right: 3px; padding-left:2px;}body.chat span.private_msg span { font-weight:normal;}body.chat div.highlight_to_me { background-color: #22091e;}body.chat div.highlight_from_me { background-color: #1d0d2d;}span.dan { color: #00FD00; font-weight: bold;}span.dan_away { color: #00A400; font-weight: normal;}</style>
</head><body class=\'chat\'>");
for (i=0;i<arr.length;i++) {
my_window.document.write(arr[i]+"\n");
}

my_window.document.write("<br /><h1>Total Posts:"+i+"</h1></body></html>");
}
It looks like PHP to me. I could be wrong with my guess.
That source appears to be written in the web-based scripting language, JavaScript.
How would I go about compiling this javascript source code? I'd really appreciate if you guys could help me out.
JavaScript can't be compiled but your browser can interpret it.
Would I just need to paste it in my browser? I'd really if you could elaborate a little more. Thanks
Create a html file and run it with browser. Good luck.
Back.
Make a text file, and save it with the extension .html
I think it is a type of auto reply or spam script. I would think a little more about the purpose of this script before you just put it in a html and run it. Just saying man.
It looks like a wow script, my friend was trolling people with something like this. Where did you get the source from? That could help to explain what use it has.
The source code is for a spam bot that spams the chat rooms on teenchat.com.

I got it from http://userscripts.org/scripts/review/95426
You probably can/should use it with the GreaseMonkey extension.
(Aug 12, 2011 05:49 AM)Dbof Wrote:  You probably can/should use it with the GreaseMonkey extension.

And you act on the assumption that he knows what you are talking about?
This looks like an ECMAScript Or just javascript..
[Image: KtaBQWs.png]
As others have said, it looks like Javascript. Where did you find it?


Possibly Related Threads...
Thread / Author Replies Views Last Post
by OmniscientJan 22, 2026 08:31 AM 6 206 Jan 22, 2026 08:31 AM
Last Post: kindproxy.com
[Help] by EuropeApr 7, 2023 08:41 PM 13 436 Apr 7, 2023 08:41 PM
Last Post: oRequiem
[Assembly] by SecuresSpyNov 20, 2018 09:01 AM 4 404 Nov 20, 2018 09:01 AM
Last Post: macheti228