You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
552 B
35 lines
552 B
12 years ago
|
<?php
|
||
|
|
||
12 years ago
|
require('WappalyzerException.php');
|
||
|
require('Wappalyzer.php');
|
||
12 years ago
|
|
||
|
try {
|
||
|
if ( php_sapi_name() !== 'cli' ) {
|
||
|
exit('Run me from the command line');
|
||
|
}
|
||
|
|
||
|
$url = !empty($argv[1]) ? $argv[1] : '';
|
||
|
|
||
|
if ( !$url ) {
|
||
|
echo "Usage: php {$argv[0]} <url>\n";
|
||
|
|
||
|
exit(0);
|
||
|
}
|
||
|
|
||
12 years ago
|
$wappalyzer = new Wappalyzer($url);
|
||
12 years ago
|
|
||
12 years ago
|
$detectedApps = $wappalyzer->analyze();
|
||
12 years ago
|
|
||
|
if ( $detectedApps ) {
|
||
|
echo implode("\n", $detectedApps) . "\n";
|
||
|
} else {
|
||
|
echo "No applications detected\n";
|
||
|
}
|
||
|
|
||
|
exit(0);
|
||
|
} catch ( Exception $e ) {
|
||
|
echo $e->getMessage() . "\n";
|
||
|
|
||
|
exit(1);
|
||
|
}
|