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
<?php
|
|
|
|
require('WappalyzerException.php');
|
|
require('Wappalyzer.php');
|
|
|
|
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);
|
|
}
|
|
|
|
$wappalyzer = new Wappalyzer($url);
|
|
|
|
$detectedApps = $wappalyzer->analyze();
|
|
|
|
if ( $detectedApps ) {
|
|
echo implode("\n", $detectedApps) . "\n";
|
|
} else {
|
|
echo "No applications detected\n";
|
|
}
|
|
|
|
exit(0);
|
|
} catch ( Exception $e ) {
|
|
echo $e->getMessage() . "\n";
|
|
|
|
exit(1);
|
|
}
|