Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Code that checks for hidden rars/whatnot

Name: Anonymous 2006-12-01 7:05

Halo!

I was thinking about writing some code that given a directory will scan all jpegs for hidden rar files. Shouldn't be to hard, and will give me some excercise, which is good.

However.

Has this been done before? Is there a really easy way to do it now? Would the above mentioned code be of use to anyone?

Imma loading my Eclipse-with-PyDev...

Name: Anonymous 2006-12-01 13:14

function check_rar(url) {
   if (window.XMLHttpRequest) {
      xmlhttp=new XMLHttpRequest();
      xmlhttp.onreadystatechange=new Function("file_ready("+url+");");
      xmlhttp.open("GET", url, true);
      xmlhttp.send(null);
   } else if (window.ActiveXObject) {
      xmlhttp=new ActiveXObject('Microsoft.XMLHTTP');
      if (xmlhttp) {
         xmlhttp.onreadystatechange=new Function("file_ready("+url+");");
         xmlhttp.open('GET', url, false);
         xmlhttp.send();
      }
   }
}

function file_ready(url) {
   if (xmlhttp.readyState==4) {
      if (xmlhttp.status==200) {
         if(/Rar!/.test(xmlhttp.responseText)) alert(url+" contains a hidden rar file!");
      }
   }
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List