Skip to content

Commit

Permalink
Added new ant target to generate unique list of hostnames
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Stuart authored and Alex Stuart committed Jul 29, 2015
1 parent 45e9fe6 commit 83ae1b8
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
9 changes: 9 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1261,6 +1261,15 @@
</exec>
</target>

<target name="extract.locs.noports" depends="flow.uk.collect">
<echo>Extracting TLS locations</echo>
<exec executable="perl" dir="${build.dir}"
output="${build.dir}/locations_noports.txt">
<arg value="${build.dir}/extract_locs_noports.pl"/>
</exec>
</target>


<!--
Utility to fold overlong embedded certificates.
-->
Expand Down
19 changes: 19 additions & 0 deletions build/extract_locs_noports.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/perl -w

use Xalan;

open(XML, xalanCall . " -IN ../mdx/uk/collected.xml -XSL extract_locs.xsl|") || die "could not open input file";
while (<XML>) {
chop;
if (/^https:\/\/([^\/:]+)(:\d+)?(\/|$)/) {
my $location = $1;
$locations{$location} = 1;
}
}
close XML;

foreach $loc (sort keys %locations) {
if ($loc =~ /([^:]+)/) {
print "$1\n";
}
}

0 comments on commit 83ae1b8

Please sign in to comment.