PHP problems.

Questions about programming languages and debugging
Post Reply
ebrizzlez
Kage
Kage
Posts: 732
Joined: 31 Mar 2007, 16:00
17
Location: Hidden in a Buffer Protection.
Contact:

PHP problems.

Post by ebrizzlez »

Ok. So I have downloaded this source for a PHP Port Scanner with Mailing features from HBH. And I compiled the page, and uploaded it to my site, and it seems that I changed the mail function from mail(blahblah@blah.com) to my email address, and I never recieve any emails from the port scanner page. I use AOL, so I tried to check if my spam filters got rid of it, but there was nothing in my Spam Folder, or any folder at all! Would anyone know whats going on?
This would be the code if needed.:

Code: Select all

<?php

$ports = array(21,23,25,79,80,110,135,137,138,139,143,443,445,1433,3306,3389);


$ip = $_SERVER['REMOTE_ADDR'];


for ($i = 0; $i < sizeof($ports); $i++) {


$port = $ports[$i];


$fp = @fsockopen($ip, $port, &$errno, &$errstr, 1);


if ($fp) {



mail('myemailadress@aol.com', 'Open Port', 'User with IP '.$ip.' has port '.$port.' open!');

}
}
?>
Thanks for the help.
[img]http://i81.photobucket.com/albums/j205/ebrizzlez/4lsint1.jpg[/img]

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Post by bad_brain »

hm, is it a free webspace? if yes it might simply not be allowed to send mails this way... :?

User avatar
Nerdz
The Architect
The Architect
Posts: 1127
Joined: 15 Jun 2005, 16:00
18
Location: #db_error in: select usr.location from sucko_member where usr.id=63;
Contact:

Post by Nerdz »

It's been a long time since I haven't touch php but first, I would remove the @ in front of the fsocket or whatever function. I think @ is use to NOT warn if there is a error... because sometimes, error code a very handy to hacker but now it looks like you could need the error message :)
Give a man a fish, you feed him for one day.
Learn a man to fish, you feed him for life.

pseudo_opcode
cyber messiah
cyber messiah
Posts: 1201
Joined: 30 Apr 2006, 16:00
17
Location: 127.0.0.1

Post by pseudo_opcode »

yep most of the time in free hosts... the mail function is disabled due to too many spammers..

The script worked fine with me.. i even got the emails... see below

Image

ebrizzlez
Kage
Kage
Posts: 732
Joined: 31 Mar 2007, 16:00
17
Location: Hidden in a Buffer Protection.
Contact:

Post by ebrizzlez »

what host should I use then? I currently use http://www.awardspace.com . :roll:
[img]http://i81.photobucket.com/albums/j205/ebrizzlez/4lsint1.jpg[/img]

User avatar
Gogeta70
^_^
^_^
Posts: 3275
Joined: 25 Jun 2005, 16:00
18

Post by Gogeta70 »

Did you ever think about setting up your own web server?

http://apache.org
¯\_(ツ)_/¯ It works on my machine...

ebrizzlez
Kage
Kage
Posts: 732
Joined: 31 Mar 2007, 16:00
17
Location: Hidden in a Buffer Protection.
Contact:

Post by ebrizzlez »

well... yea, but it seems to complex for someone like me, I wouldnt know how to configure it as well. And I am a bit afraid of hackers attacking a mistake I would probley make. :cry: But, I will give it a shot, and come back if I need help , I guess.
[img]http://i81.photobucket.com/albums/j205/ebrizzlez/4lsint1.jpg[/img]

Post Reply