Replace sitemapXML by TXT files and delete verbose mode

master
heuzef 7 years ago
parent 1dfaa724a2
commit 7a4b9bacbe
  1. 22
      defacement_check.pl
  2. 1
      sitemap/sitemap_example.com.xml
  3. 3
      sitemap/sitemap_www.aoc-toiture.com.xml
  4. 1
      test.pl
  5. 1
      urls/urls_example.com.txt
  6. 127
      urls/urls_www.aoc-toiture.com.txt
  7. 10
      urls/urls_www.firewall-services.com.txt

@ -13,7 +13,7 @@ sub uniq {
grep !$seen{$_}++, @_; grep !$seen{$_}++, @_;
} }
print "\033[33m \nDEFACEMENT CHECK [" . $date . "]\n\nSearching for suspects ...\n"; print "\033[36m \nDEFACEMENT CHECK [" . $date . "]\n\nSearching for suspects ...\n";
print "FOUND \t\t=> URLs\n"; print "FOUND \t\t=> URLs\n";
# Import config # Import config
@ -28,19 +28,18 @@ if (open(my $f, '<:encoding(UTF-8)', $keywords)) {
warn "Could not open file '$keywords' $!"; warn "Could not open file '$keywords' $!";
} }
# Open XML files # Open TXT files
my @files = glob( "sitemap/*.xml" ); my @files = glob( "urls/*.txt" );
my $file; my $file;
foreach $file (@files) foreach $file (@files)
{ {
my $xml = new XML::Simple (KeyAttr=>[]); my @urls;
my $url; my $url;
my $data = $xml->XMLin($file); open(TXT, '<', $file) or die $!;
while(<TXT>){
foreach $url (@{$data->{url}}) my $url = $_;
{ my $survey = $url;
my $survey = $url->{loc};
# Create a user agent object # Create a user agent object
use LWP::UserAgent; use LWP::UserAgent;
my $ua = LWP::UserAgent->new; my $ua = LWP::UserAgent->new;
@ -62,9 +61,7 @@ foreach $file (@files)
# Results # Results
foreach (uniq(@found)) { foreach (uniq(@found)) {
$total_found++; $total_found++;
if ($ARGV[0] eq '--verbose') { print "\033[33m" . $total_found . "\t\t" . $_ . "\n";
print "\033[36m" . $total_found . " : " . $_ . "\n";
}
} }
if ($total_found == 0) { if ($total_found == 0) {
print "\033[32m" . $total_found . "\t\t=> " . $survey. "\n"; print "\033[32m" . $total_found . "\t\t=> " . $survey. "\n";
@ -72,4 +69,5 @@ foreach $file (@files)
print "\033[31m" . $total_found . "\t\t=> " . $survey. "\n"; print "\033[31m" . $total_found . "\t\t=> " . $survey. "\n";
} }
} }
close(TXT);
} }

@ -1,4 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"> <?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<url><loc>http://example.com/</loc></url> <url><loc>http://example.com/</loc></url>
<url><loc>http://example.com/test</loc></url>
</urlset> </urlset>

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<url><loc>http://www.aoc-toiture.com/</loc></url>
</urlset>

@ -0,0 +1 @@
http://example.com/

@ -0,0 +1,127 @@
http://www.aoc-toiture.com/
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=19&pos=1&numid=1
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=19&pos=2&numid=2
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=19&pos=3&numid=3
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=19&pos=4&numid=4
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=20&pos=1&numid=5
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=20&pos=2&numid=6
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=20&pos=3&numid=7
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=20&pos=4&numid=8
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=21&pos=1&numid=9
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=21&pos=2&numid=10
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=21&pos=3&numid=11
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=21&pos=4&numid=12
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=22&pos=1&numid=13
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=22&pos=2&numid=14
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=22&pos=3&numid=15
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=22&pos=4&numid=16
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=23&pos=1&numid=17
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=23&pos=2&numid=18
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=23&pos=3&numid=19
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=23&pos=4&numid=20
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=24&pos=1&numid=21
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=24&pos=2&numid=22
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=24&pos=3&numid=23
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=24&pos=4&numid=24
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=25&pos=1&numid=25
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=25&pos=2&numid=26
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=25&pos=3&numid=27
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=25&pos=4&numid=28
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=26&pos=1&numid=29
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=26&pos=2&numid=30
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=26&pos=3&numid=31
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=26&pos=4&numid=32
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=27&pos=1&numid=33
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=27&pos=2&numid=34
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=27&pos=3&numid=35
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=27&pos=4&numid=36
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=28&pos=1&numid=37
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=28&pos=2&numid=38
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=28&pos=3&numid=39
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=28&pos=4&numid=40
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=29&pos=1&numid=41
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=29&pos=2&numid=42
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=29&pos=3&numid=43
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=29&pos=4&numid=44
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=30&pos=1&numid=45
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=30&pos=2&numid=46
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=30&pos=3&numid=47
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=30&pos=4&numid=48
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=31&pos=1&numid=49
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=31&pos=2&numid=50
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=31&pos=3&numid=51
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=31&pos=4&numid=52
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=32&pos=1&numid=53
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=32&pos=2&numid=54
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=32&pos=3&numid=55
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=32&pos=4&numid=56
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=33&pos=1&numid=57
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=33&pos=2&numid=58
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=33&pos=3&numid=59
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=33&pos=4&numid=60
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=34&pos=1&numid=61
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=34&pos=2&numid=62
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=34&pos=3&numid=63
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=34&pos=4&numid=64
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=35&pos=1&numid=65
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=35&pos=2&numid=66
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=35&pos=3&numid=67
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=35&pos=4&numid=68
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=36&pos=1&numid=69
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=36&pos=2&numid=70
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=36&pos=3&numid=71
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=36&pos=4&numid=72
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=37&pos=1&numid=73
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=37&pos=2&numid=74
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=37&pos=3&numid=75
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=37&pos=4&numid=76
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=38&pos=1&numid=77
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=38&pos=2&numid=78
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=38&pos=3&numid=79
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=38&pos=4&numid=80
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=39&pos=1&numid=81
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=39&pos=2&numid=82
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=39&pos=3&numid=83
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=39&pos=4&numid=84
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=40&pos=1&numid=85
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=40&pos=2&numid=86
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=40&pos=3&numid=87
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=40&pos=4&numid=88
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=41&pos=1&numid=89
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=41&pos=2&numid=90
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=41&pos=3&numid=91
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=41&pos=4&numid=92
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=42&pos=1&numid=93
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=42&pos=2&numid=94
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=42&pos=3&numid=95
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=42&pos=4&numid=96
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=46&pos=1&numid=101
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=46&pos=2&numid=102
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=46&pos=3&numid=103
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=46&pos=4&numid=104
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=48&pos=1&numid=97
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=48&pos=2&numid=98
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=48&pos=3&numid=99
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=48&pos=4&numid=100
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=49&pos=1&numid=105
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=49&pos=2&numid=106
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=49&pos=3&numid=107
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=49&pos=4&numid=108
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=50&pos=1&numid=109
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=50&pos=2&numid=110
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=50&pos=3&numid=111
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=50&pos=4&numid=112
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=51&pos=1&numid=113
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=51&pos=2&numid=114
http://www.aoc-toiture.com/detail_galerie.php?pg=8&numgal=51&pos=3&numid=115
http://www.aoc-toiture.com/index.php?pg=1
http://www.aoc-toiture.com/index.php?pg=11
http://www.aoc-toiture.com/index.php?pg=13
http://www.aoc-toiture.com/index.php?pg=14
http://www.aoc-toiture.com/index.php?pg=2
http://www.aoc-toiture.com/index.php?pg=3
http://www.aoc-toiture.com/index.php?pg=4
http://www.aoc-toiture.com/index.php?pg=5
http://www.aoc-toiture.com/index.php?pg=6
http://www.aoc-toiture.com/index.php?pg=8
http://www.aoc-toiture.com/index.php?pg=9

@ -0,0 +1,10 @@
http://www.firewall-services.com/
http://www.firewall-services.com/clubs-entreprises.html
http://www.firewall-services.com/contact.html
http://www.firewall-services.com/espace-presse.html
http://www.firewall-services.com/formations.html
http://www.firewall-services.com/index.html
http://www.firewall-services.com/nos-competences.html
http://www.firewall-services.com/passeport.html
http://www.firewall-services.com/plan.html
http://www.firewall-services.com/prolibre.html
Loading…
Cancel
Save