diff --git a/files/www/cgi-bin/supporttool b/files/www/cgi-bin/supporttool index e2cb8a1a..9e41ff65 100755 --- a/files/www/cgi-bin/supporttool +++ b/files/www/cgi-bin/supporttool @@ -50,6 +50,13 @@ use perlfunc; "/var/run/hosts_olsr", ); +@sensitive = ( "/etc/config/vtun", + "/etc/config.mesh/vtun", + "/etc/httpd.conf", + ); + + + @cmds = ( "cat /proc/cpuinfo", "df -k", "dmesg", @@ -100,6 +107,15 @@ foreach $path (@files) { } +#Remove sensitive files +foreach $path (@sensitive) { + if ( $path =~ /^\/(.*)/ ) { + my $sourcepath = $1; + system("rm", "-r", "-f", "/tmp/sd/$sourcepath"); + } +} + + system("touch","/tmp/sd/data.txt"); open (my $CMDS_OUT, '>', '/tmp/sd/data.txt') or die "Could not open dump file";