#!/usr/bin/perl -w use strict; use Fcntl ':flock'; # import LOCK_* constants use CGI; use CGI::Carp qw/fatalsToBrowser /; use CGI ':standard'; use POSIX qw(strftime); my $megabyte = 1024 * 1024; # bytes my $max_mb = 1; # max no. of MB we will allow $CGI::DISABLE_UPLOADS = 0; # CGI module variable for en/disabling uploads (non-zero to disable) $CGI::POST_MAX = $megabyte * $max_mb; # CGI module variable for maximum upload size (bytes) my $q = CGI->new(); ####### CONFIG ######################## my $mail ='thoseguys@mysite.com'; my $news_directory='D:\\Inetpub\\theirsite.org\\alerts\\'; my $path_to_text= "$news_directory\\body.txt"; my $path_to_header="$news_directory\\index.shtml"; my $goodpass="news"; my $newspage_url = "http://www.theirsite.org/alerts/"; my $this_script_url="http://www.theirsite.org/cgi-bin/alerts.cgi"; my $max_break_count= 20; #maximum number of lines before making post into seperate page my $default_mail="theirsite"; #used in post if no name is given my $domain="theirsite.org"; #no www. please ### File Upload Config### my $base_dir = "/"; my $base_dom = "http://www.theirsite.org/"; my $target_dir = "alerts/images/"; ######################################### #declare some vars my ($time_words,$topic,$words,$pass,$name,$user,$edit,$edit_done); my ($line_break_count,$seperate_page,$textcolor,$textface,$textsize,$topicsize); my ($post_number,@updated_text,$plain_words,$upload_file,$image_link); $/="\n\n\n"; #this is the delimiter for writing and rewriting the file #Main routine parse_form(); show_news(); get_time(); if ($pass ne $goodpass){ bad_hacker_no_cookie(); }else { post_new_news(); } mail_routine(); exit;