Using perl Syntax Highlighting
- if ( $cosa eq "" ) { menu(); }
- print "\n\n[+] Searching string\n\n";
- my %found = buscar($cosa);
- $total = int( keys %found ) - 1;
- print "[+] Exploits Found : " . $total . "\n\n\n";
- unless ( -d $cosa ) {
- mkdir( "logs/exploitdb/" . $cosa, "0777" );
- }
- for my $da ( keys %found ) {
- my $tata = $da;
- $tata =~ s/\<//;
- $tata =~ s/(\s)+$//;
- if ( download( $found{$da}, "logs/exploitdb/" . $cosa . "/" . $tata . ".txt" ) ) {
- print "[Exploit Found] : " . $da . "\n";
- }
- }
- sub buscar {
- for my $n ( 1 .. 666 ) {
- my $code
- = toma( "http://www.exploit-db.com/search/?action=search&filter_page="
- . $n
- . "&filter_description="
- . $_[0]
- . "&filter_exploit_text=&filter_author=&filter_platform=0&filter_type=0&filter_lang_id=0&filter_port=&filter_osvdb=&filter_cve="
- );
- chomp $code;
- if ( $code =~ /No results/ig ) {
- return %busca;
- }
- %busca = getlinks($code);
- }
- }
- sub getlinks {
- my $test = HTML::Parser->new(
- start_h => [ \&start, "tagname,attr" ],
- text_h => [ \&text, "dtext" ],
- );
- $test->parse( $_[0] );
- sub start {
- my ( $a, $b ) = @_;
- my %e = %$b;
- unless ( $a ne "a" ) {
- $d = $e{href};
- $c = $a;
- }
- }
- sub text {
- my $title = shift;
- chomp $title;
- unless ( $c ne "a" ) {
- if ( $d =~ /www.exploit-db.com\/exploits\/(.*)/ ) {
- my $id = $1;
- my $url = "http://www.exploit-db.com/download/" . $id;
- $links{$title} = $url;
- print $title. "\n";
- }
- $d = "";
- }
- }
- return %links;
- }
Coloreado en 0.003 segundos, usando GeSHi 1.0.8.4
y me devuelve esto:
Using perl Syntax Highlighting
- [Exploit Found] : eFiction <= 3.1.1 (path_to_smf) Remote File Include Vulnerabilities
- [Exploit Found] : SMF 1.1 Index.PHP HTML Injection Vulnerability
- [Exploit Found] : Simple Machines Forum (SMF) 1.1.6 Code Execution Exploit
- [Exploit Found] : SMF Forum Mambo Component <= 1.3.1.3 Include Vulnerability
- [Exploit Found] : Seo4SMF for SMF forums Multiple Vulnerabilities
- [Exploit Found] : Simple Machines forum (SMF) 2.0 session hijacking
- [Exploit Found] : SMF <= 2.0.1 SQL Injection, Privilege Escalation
- Can't write to 'logs/exploitdb/smf/phpRaid = 3.0.b3 (phpBB/SMF) Remote File Inclusion Vulnerabilities.txt-2274': No existe el fichero o el directorio at /usr/share/perl5/LWP/Protocol.pm line 105, <stdin> line 2. at /usr/share/perl5/LWP/UserAgent.pm line 844, <stdin> line 2.
Coloreado en 0.001 segundos, usando GeSHi 1.0.8.4
¿ Cómo evito este error ?