#!/usr/bin/perl # Copyright Andrew Gavin 2009, 2010 # # This file is part of OpenDLP. # # OpenDLP is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # OpenDLP is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with OpenDLP. If not, see . use CGI qw/:standard/; use DBI; my $user = remote_user(); my $db_admin_file = "../etc/db_admin"; my( $db_username, $db_password ) = ""; open( DB, $db_admin_file ); my $db_line = ; close( DB ); chomp $db_line; ($db_username, $db_password) = split( ":", $db_line ); header(); print qq { Create a new scan profile

}; print "
Profile Name
Username
Password
Windows Domain/Workgroup
(required)
Installation Path
(Must be new directory)
Directories
(Newline-delimit the file extensions in this list)
Scan all directories
Scan all directories except these (recursive)
Only scan the following directories (recursive)

File Extensions
(Newline-delimit the file extensions in this list)
Scan all files
Scan all files except files with the following extensions
Only scan files with the following file extensions

Regular Expressions"; my $dbh = DBI->connect("DBI:mysql:database=OpenDLP;host=localhost",$db_username,$db_password); my $string = "SELECT number,name,pattern from regexes"; my $sth = $dbh->prepare( $string ); $sth->execute(); while( my $results = $sth->fetchrow_arrayref() ) { print "$$results[1]
\n"; } $sth->finish; $dbh->disconnect; print qq {
Credit Cards
(Newline-delimit the names of the regex aliases)
Upload URL
(This is the URL on your web server)
Upload URL username
Upload URL password
Time between uploads
Concurrent deployments
(only for deploying, not running)
Description
(will show as Windows Service description)
Log Verbosity




}; footer(); sub header { print "Content-type: text/html\n\n"; print "\n\n"; print "OpenDLP 0.1\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print '
' . "\n"; } sub footer { print "
\n"; }