http://sulfericacid.perlmonk.org/rac/rac/mark/delete.pl is the page I am working on. I am trying to get rid of the large paragraph that's there, please don't click on the other delete's!! I have a backup of the db, but just try the big one :)
I am doing a print-all on everything in the database and trying to delete the hash key, but for some reason on the messed up data it keeps saying "information not found!".
The script I am using to try and delete these evil things is:
On the email-add form itself, I tried to add my own "anti-hack" security and it worked..a lot better than not using it. What I used for each field was something that looked like this:use warnings; use POSIX; use CGI qw/:standard/; use CGI::Carp qw(fatalsToBrowser); # You are requested not to change any configurations in this file. # Everything is setup to function as-is, any tamporing may damage # the script. require SDBM_File; my %emails; my %snailmail; my $snail = "snail.dbm"; #change to location of snail mail databa +se my $list = "mylist.dbm"; #change to location of email database my $del = url_param('del'); tie %emails, 'SDBM_File', $list, O_CREAT | O_RDWR, 0644; if ( !tied %emails ) { print "database unsuccessful $!.\n"; } tie %snailmail, 'SDBM_File', $snail, O_CREAT | O_RDWR, 0644; if ( !tied %snailmail ) { print "database unsuccessful $!.\n"; } print header, start_html('Email Management'); foreach(keys %emails) { print qq($_ => $emails{$_} [<a href="delete.pl?del=$_">delete?</a +>]<br><br>); } if ($del ne "") { if (exists $emails{$del}) { delete $emails{$del}; } else { print "<center><font color=red>This data can not be found!</f +ont></center>";} }
Which removes all the nasty things that I can't have in my database because this connects to an emailer. Any tips on how to get my delete script to work to get rid of this crap would be very helpful and if you know of better ways to keep this data from getting into the DB to begin with, I am more than willing to learn the security I need.$name =~ s/</<\;/gi; $name =~ s/://gi; $name =~ s/TO//gi; $name =~ s/FROM//gi; $name =~ s/SUBJECT//gi;
Thank you!
In reply to deleting hash keys (script has been tampered with) by sulfericacid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |