gaea
Oct 30 2006, 01:38 AM
So I'm trying to write a script to check if someone is trying to do a header inject using my web based email form. The problem is that, regardless of the content, it is being tagged as hijacked. The following is the relevant part of my code: CODE $ip=$_POST['ip']; $httpref=$_POST['httpref']; $httpagent=$_POST['httpagent']; $visitor=$_POST['visitor']; $visitormail=$_POST['visitormail']; $subject=$_POST['subject']; $notes=$_POST['notes'];
$passedTests = "yes"; $Hijacked = "no"; $HijackAttempt=$visitormail;
if(!$visitormail == "" && (!strstr($visitormail,"@") || !strstr($visitormail,"."))) { echo "<div class=\"centerIt\">"; echo "The following error(s) were encountered: <br />"; echo "<font color='red'>Invalid email address. <br /></font>"; $passedTests = "no"; }
if(empty($visitor) || empty($visitormail) || empty($notes )) { if($passedTests == "yes") { echo "<div class=\"centerIt\">"; echo "The following error(s) were encountered: <br />"; } echo "<font color='red'>Please fill in ALL of the required fields.</font>"; $passedTests = "no"; } if (!preg_match("/(%0A|%0D|\n+|\r+)(content-type:|to:|cc:|bcc:)/i", $HijackAttempt) && ($passedTests == "yes")) { $passedTests = "no"; $Hijacked = "yes"; } Any help identifying the problem with this code would be much appreciated.
Reply
Similar Topics
Keywords : email header inject- An Interesting Approach To Email Verification...
- (6)
- Php Email Validation
- A PHP data validation class with many functions (1)
I've been reading through my old php book (PHP 4.1) and came across this data validation class.
It can check a number of things ranging from telephone numbers , credit card number formats, email
address and some others. I checked out some of the methods although I didnt expect it to work 100%
because I've found source code errors thoughout the book and CD. I tested out a few of the
methods to check and some of them did return expected results but some didnt either so the data
validation class was not perfect and it didnt really bother me. The cool thing I found...
Encode Your Email Address
- Confuse the Spam Bots, but not your viewing clients (5)
Spam bots often 'scrape' pages to glean information and collect email addresses. I don't
like that. To combat the Bots from collecting my address off of my site, I wrote a script that
includes 'obscures' the address in several ways. It adds 'AT' where the '@'
sign is and then replaces the '.' with 'DOT' so it is humanly readable, but not by
the Bots. Also, it encodes the 'mailto' and the address used in the 'mailto' so it
shows okay on the web page and on:hover, but it is actually encode into hex value...
Trouble With Phpbb Email
- (1)
Hi guys, I want to know if there is anything you can do for sending confirmation email to your
users automatically when they have just regeistered, when the host server does not support SMTP
(Simple Mail Transfer Protocol). ? Thanks alot....
Email Sending.
- email sending with php. (1)
this script allow user to send an email for you. i hope you enjoy /wink.gif"
style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /> CODE
[color="#0000ff"][indent]<? $top='<html
dir="rtl"> <head> <meta http-equiv="Content-Language"
content="fa"> <meta http-equiv="Content-Type" content="text/html;
charset=utf-8"> </head> <body> <div
align="center"> <p style="margin-top&...
[php] Header Function
- (2)
Header function Greetings we are going to use the header() funtion to redirect start making a
file called page.php at the top of the file add CODE <?php ?> Example 1 After
CODE header('Location: http://www.trap17.com'); the LOCATION means
where you want it to go. Example 2 you also can define a file that you want to redirect to After
CODE header('Location: index.php'); Example 3 you also can add a timer to
it /laugh.gif" style="vertical-align:middle" emoid=":lol:" border="0" alt=...
Header Redirect Errors
- (5)
Hi, I am using the header function to redirect after the processing of the form. I have to specify
a internal link using '#link'. This works in Firefox and opera. But in Internet Explorer
internal linking when done from a redirect is not working for somewhat reasons. e.g.
header("Location: http://www.example.com/index.php#link"); this works in Firefox and Opera but
not in Internet Explorer . IE just accepts 'http://www.example.com/index.php' instead of
http://www.example.com/index.php#link Please help me if you know anything about this. Well ther...
Add Users On Email Program With Php?
- (1)
First of all Marry Christmas, Well so i am in some kind of a problem, i can't find out how to
add users to my mail service, i have no idea what SMTP/IMAP program the server runs, neither does
the system administrator. But it should be kinda the same thing for all of them if i am not wrong,
Anyways i have full access to server so i can do whatever i want to do, i have SSH access too (Root
access /rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0"
alt="rolleyes.gif" /> )...
Wappymail_v1.50
- wap free mail/ email admin script :-) (15)
Here is my new wap mail script. You can use it as a free email sending service or an email admin
form (can set this option in config.php) its extremly simple to install and you will find full
instructions in the zip file. Please feel free to comment, rate, or update this script :-)
/tongue.gif" style="vertical-align:middle" emoid=":P" border="0" alt="tongue.gif" /> ...
Email Form
- Very Simple (12)
This is another little script that I devised. It's very simple. As the name suggests, it's
a script that lets the user send an email via a form. CODE SENDMAIL.PHP echo "<form
action='form-send.php' method='get'>"; echo "To: <input
type='text' name='email' size=20>"; echo "Subject: <input
type='text' name='title' size=20>"; echo "Message: <textarea
cols=50 rows=25 name='message'></textarea>"; echo "<input typ...
Yet Another Problem With A Form Script
- Maybe I should just use email? lol (6)
Okay, here is what I got. I know, three topics on form scripts, but hey, I am learning. I used a
generator, and then put it on, but it is giving me a santax (is that how you spell it) on line 13
with an unexpected = sign. I recited taht the best I could. Anyway, so I need some help. The form
is located in http://inneed.mxweb.co.uk/askandanswer.html The script behind the whole works, I
named, aaform.php. Moving right along here, I got this error, so here is the code that I called
aaform.php, you know the one that works the whole thing: CODE <?php // Webs...
Email Server Help Please
- I need noob detailed help on setting up a email server on windows XP (0)
Hello I would like to say thank you for any help you might give me. I'm new to Apache / PHP and
MySQL I have all them up and running propertly I think. I want to make a PHP online game and I need
to set up an email server so I can have and authincation system. When the player creates an account
I want the computer to email the player a link the have to click on to make there account active.
I have a Comcast 8mbits broadband connection My server is running at http://192.168.1.105 My
PHPinfo file is http://192.168.1.105/phpinfo.php My FormMail File http://192...
Php Header Problem
- i always got header problem (9)
i really hate the header function it always get an error saying ( cannot ------- headers already
sent by----- ) and here's my error: Warning: session_start(): Cannot send session cookie -
headers already sent by (output started at /home/adly3000/public_html/Mail/index.php:5) in
/home/adly3000/public_html/Mail/index.php on line 81 Warning: session_start(): Cannot send session
cache limiter - headers already sent (output started at /home/adly3000/public_html/Mail/index.php:5)
in /home/adly3000/public_html/Mail/index.php on line 81 Warning: Cannot modify header ...
php header() function help needed
- automatic re-direct (4)
hey ppl, u seem to have real gud knowledge about php, i just wanted a little help...i designed this
website, but i want that if i click on certain page, it should open for some few seconds and then
browser should automatically redirect me to some other page....i tried this with header() function
but i couldnt do the wait n redirect part, ... so somebody plz help.... -thanx in advance!...
Need Help With The Header() Function
- I am redirecting from my old site (2)
Over a month ago, I bought a domain name for my site, but my site is still not indexed. I did
everything needed to get indexed, but I forgot one thing: The old site had exactly the same content
as the new one. So I had duplicate content. Therefore, I want my old site to redirect the user to
the new site with this script: CODE <?php header("Location:
http://www.global-rs.com" . $_SERVER['REQUEST_URI']); exit; ?>
global-rs.com is my new URL. However, on my old site, which I will be placing this code on, there
i...
Sending Attachments Using Email Function In Php
- (2)
I'm trying to send an attachment using the mail Php function. It gets caught by the email
server with an error. It seems to have a problem with the separator or who knows what. The server
says something like "invalid separator on mime type." The code is: Code: CODE // subject
$subject = "Hello There "; $mime_boundary =
"<<<--==-->>>"; // headers $headers =
"From: " . 'Tom' . " <" . 'texample@aol.com' .
">\r\n"; ...
Protecting Web Email Forms
- (3)
i have a web form on my site which can be filled in with a customers email, name and question or
comment. when the form is submitted an email is sent to an address i setup with all the info.
recently i've been getting alot of spam/junk coming from the web form. for the most part, they
usually come pretty close together, which makes it seem like just one spammer (at least at a time).
also i'm talking like 5-10 messages at a time. i'm wondering if people have any
suggestions how to protect these types of web forms from spammers. any ideas/help is appreciate...
Spacer Below Header :s
- (3)
Below my header, which includes the logo and a horizontal menu bar, there is an empty space of the
size of a linebreak. I'm completely new to PHP... My header is an include tag , and where the
top.htm site should end, there is a linebreak that I can't remove... Is there a way to remove
it? Also, it happens in my vertical menu too, and below the footer, but it doesn't really
affect the design....
Form To Pdf, With Email?
- Wanting to Submitt Data to PDF (3)
Hi all, This sounds like a good place to ask this, I have a form Click Here to View that when
submitted will put the values into the PDF Here Is there a way in which to have the filled in
form both viewed to the user? and also have it emailed to me as an attachment. Any code or help
would be good... I get basics, but this stuff is hard to get to work and i can't get it to....
Trouble With Emailer.php
- failed sending email error (5)
Whenever someone registers at my forum, they get this error: Failed sending email :: PHP :: DEBUG
MODE Line : 234 File : emailer.php however, the account will be sucessfully registered. It is
weird because i did not change the original emailer.php at all. O__O||| anyone know whats up with
it?...
Email Code
- (3)
CODE if($submit) //If submit is pressed { mail("youremailaddress@whatever.com",
"$subject", "$email", "$comments"); } else {?> '> E-Mail: Subject:
Comments: ...
Question On Header() Function
- (3)
Hello I have a question regarding the header(location:http:// etc) function. I have a php document
that looks similar to the followiing //now some code specific to this page only if blah blah {
do some stuff } else { header("location : http://some_page.php"); } include ("./bottom.php");
//this file contains loads of html and is resident on all pages in the site IT HAS TO BE HERE -----
my question is this, how can i redirect to a new page using the header() function in the middle of
a file like this ie when i have already passed a load of html and other stuf...
header()
- redirection (1)
CODE <?php if($_REQUEST['name']==NULL) {
header("Location:?name=Guest"); } else { ?> <html> <head>
<title>Welcome</title> </head> <body bgcolor=black> <?php
echo "<font color=gray><b>Hello, "; echo
$_REQUEST['name']."</b><p>"; ?><pre>
<?php for($i=0;$i<10;$i++) {
for($j=0;$j<10;$j++...
Looking for email, header, inject, test
|
|
Searching Video's for email, header, inject, test
|
advertisement
|
|