forked from florianoverkamp/yourls-abusedesk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheck-gsb
executable file
·32 lines (28 loc) · 833 Bytes
/
check-gsb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/php
<?
// Commandline check-tool for Abusedesk plugin for Yourls - URL Shortener
// Copyright (c) 2010, Florian Overkamp <[email protected]>
require_once( dirname(__FILE__).'/../../../includes/load-yourls.php' );
require_once("config.php");
$url = "http://tty.nu";
if(isset($argv[1])) $url = $argv[1];
$phpgsb = new phpGSB(YOURLS_DB_NAME, YOURLS_DB_USER, YOURLS_DB_PASS, YOURLS_DB_HOST, false);
$phpgsb->apikey = GSB_APIKEY;
echo "\n";
$flagged = false;
$phpgsb->usinglists = array('goog-malware-shavar');
if($phpgsb->doLookup($url)) {
echo "MALWARE: $url\n";
$flagged = true;
}
$phpgsb->usinglists = array('googpub-phish-shavar');
if($phpgsb->doLookup($url)) {
echo "PHISHING: $url\n";
$flagged = true;
}
if(!$flagged) {
echo "Clean: $url\n";
}
echo "\n";
$phpgsb->close();
?>