Repulsor
Senior Member
- Jun 11, 2013
- 904
- 357
Hey all,
Well, I coded this out to help SpecialOne from this thread :
http://www.blackhatworld.com/blackh...text-files-output-difference-windows-7-a.html He insists that I make a thread do this can be useful for many.
So here is the code :
Just save your first file as file1.txt and second one as file2.txt
The results would be saved in cleandata.txt
P.S : The script is pretty basic and explains itself(if someone wants to know.). Actually, this should have been a desktop bot. I am still learning Vb.net, so maybe I will be able to get a bot out.
Well, I coded this out to help SpecialOne from this thread :
http://www.blackhatworld.com/blackh...text-files-output-difference-windows-7-a.html He insists that I make a thread do this can be useful for many.
So here is the code :
Just save your first file as file1.txt and second one as file2.txt
PHP:
<?php
//load the text files
$data1 = file("file1.txt");
$data2 = file("file2.txt");
function flip_array_diff_key($b, $a) {
$at = array_flip($a);
$bt = array_flip($b);
$d = array_diff_key($bt, $at);
return array_keys($d);
}
//call the function
$cleandata = flip_array_diff_key($data1,$data2);
echo sizeof($cleandata)." Lines";
//write to text file
$file = fopen("cleandata.txt","w+");
foreach($cleandata as $data){
fwrite($file,$data);
}
P.S : The script is pretty basic and explains itself(if someone wants to know.). Actually, this should have been a desktop bot. I am still learning Vb.net, so maybe I will be able to get a bot out.