Login Register






developer wanted for a php script filter_list
Author
Message
developer wanted for a php script #1
developer wanted for a php script

1) Get a page from a site outside the same origin
2) Extract the emails from the page
3) Assign every individual email to a variable
4) Use a mailer/smtp script to send an email to each of them
5) Set a timer (12 or 24 hours) and repeat the process

Reply

RE: developer wanted for a php script #2
Code:
<?php $html = file_get_contents('https://pastebin.com/AiVeXqjQ'); $pattern = '/[a-z0-9_\-\+]+@[a-z0-9\-]+\.([a-z]{2,3})(?:\.[a-z]{2})?/i'; preg_match_all($pattern, $html, $matches); foreach($matches[0] as $emailaddress){ $message = "hello"; mail($emailaddress, 'Subject', $message); print "Sent email to " . $emailaddress . "<BR>"; } ?>

Output would be:
[Image: dZ5U2rj.png]

This would use the php mail function , you would need to setup the smtp server in php.ini like so
http://www.quackit.com/php/tutorial/php_...ration.cfm
You can swap that for a different script if need be.

To run the script every X hour setup a chron job.

Like so :
http://www.jitendrazaa.com/blog/others/l...in-cpanel/
(This post was last modified: 04-29-2017, 09:25 PM by Darkbyte.)

Reply

RE: developer wanted for a php script #3
Nice work, Thanks

Using pastebin it works fine, but, when using the site below i'm having this error on hostinger servers.

Warning: file_get_contents(https://leakforums.net/bans.php): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in /home/u162314353/public_html/index.php on line 2

The idea is to drive people to other related sites by sending a notification by email.

Reply

RE: developer wanted for a php script #4
This is due to cloudfair protecting the site , file get contents does not set a user agent ect so is flagged by cloudfair we need to accept cookies also.

Using curl we can bypass this though..

Code:
<?php function FuckOffCloudFair($url) {    $ch = curl_init();    curl_setopt($ch,CURLOPT_USERAGENT,'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13');    curl_setopt($ch, CURLOPT_COOKIEJAR, './cookies.txt');    curl_setopt($ch, CURLOPT_COOKIEFILE, './cookies.txt');    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);    curl_setopt($ch, CURLOPT_HEADER, false);    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);    curl_setopt($ch, CURLOPT_URL, $url);    curl_setopt($ch, CURLOPT_REFERER, $url);    curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);    $result = curl_exec($ch);    curl_close($ch);    return $result; }                 $html = FuckOffCloudFair('https://leakforums.net/bans.php?pq=1');     $pattern = '/[a-z0-9_\-\+]+@[a-z0-9\-]+\.([a-z]{2,3})(?:\.[a-z]{2})?/i'; preg_match_all($pattern, $html, $matches); foreach($matches[0] as $emailaddress){ $message = "hello"; mail($emailaddress, 'Subject', $message); print "Sent email to " . $emailaddress . "<BR>"; } ?>


Gives us:

[Image: GIoNh5G.png]

If I was you I would insert each email address to a mysql database with a unique column on the addreess , then check the mysql database using a SELECT/num_rows statement to see if a email is already there before emailing the person. This will prevent you emailing the same person twice.

P.S this might attract a bunch of scammers to any forum you are directing people too , so just keep that in mind!
(This post was last modified: 04-30-2017, 04:21 PM by Darkbyte.)

Reply

RE: developer wanted for a php script #5
Thanks for the tip but the list is constantly updated. I do however have an issue.

I setup the script on the server and run two tests, the first was with LeakForums using Curl but didn't send any email.
I cross reference your image with the emails and they match.

Since it fail i tried to test with the pastebin and all worked fine.

Do you know the strings to debug a function to see if they have installed ex:CURL?
(This post was last modified: 04-30-2017, 04:39 PM by hacxx.)

Reply

RE: developer wanted for a php script #6
PHP Code:
<?php // Script to test if the CURL extension is installed on this server // Define function to test function _is_curl_installed() {    if  (in_array  ('curl', get_loaded_extensions())) {        return true;    }    else {        return false;    } } // Ouput text to user based on test if (_is_curl_installed()) {  echo "cURL is <span style=\"color:blue\">installed</span> on this server"; } else {  echo "cURL is NOT <span style=\"color:red\">installed</span> on this server"; } ?>

This would check if curl is installed on ur server , in your last reply did u mean you tried the curl code on pastebin and it worked? If so then the issue is more than likely with your server not having ssl installed.


Try replacing the FuckOffCloudFair function with this:


PHP Code:
function FuckOffCloudFair($url) {    $ch = curl_init();    curl_setopt($ch,CURLOPT_USERAGENT,'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13');    curl_setopt($ch, CURLOPT_COOKIEJAR, './cookies.txt');    curl_setopt($ch, CURLOPT_COOKIEFILE, './cookies.txt');    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);    curl_setopt($ch, CURLOPT_HEADER, false);    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);    curl_setopt($ch, CURLOPT_URL, $url);    curl_setopt($ch, CURLOPT_REFERER, $url);    curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);    $result = curl_exec($ch);    curl_close($ch);    return $result; }
If that fails also try this

PHP Code:
<?php $v = curl_version(); print $v['ssl_version']; // I get: OpenSSL/0.9.8 - I presume you won't if it is not enabled ?>

and let me know the output , if its empty your server does not have open ssl installed.
(This post was last modified: 04-30-2017, 05:09 PM by Darkbyte.)

Reply

RE: developer wanted for a php script #7
I changed the curl request and it show a blank page. Using the last php code in the post i get
OpenSSL/1.0.1e

So i assume that it's SSL enabled.

Do you know any free hosting company were i can host the file without any error (Tested by you)?

Reply

RE: developer wanted for a php script #8
I do not know any I am running it off my own pc using xamp from https://www.apachefriends.org/download.html ( i use the version at the top of the list).

Start the apache / mysql service
stick ur php script in C:\xampp\htdocs
then open localhost in your browser.

Like so:
[Image: Amal2vV.png]


Most free servers will not let you use curl though and certainly not chronjobs. It might be worth spending a few $$ to get a cpannel host. It will cost like 3-5$ a month.

Reply

RE: developer wanted for a php script #9
Yes using Xampp works Smile
the problem is to send the emails as i don't know how to setup Mercury.

I do, however have a domain all configured (don't have curl) but has smtp activated, it only require authentification that can be made in php.
Do you know how? Combining both i will achieve my goal.

Thanks

Reply

RE: developer wanted for a php script #10
Hmm for that open the xamp control panel next to apache press config and choose php.ini

press ctrl + f and search for

[mail function]
change
SMTP=localhost

to
SMTP=mail.yourserver.com

and
smtp_port = 25
if required (its usually 25 though)

under the smtp_port line add this:
auth_username = smtp-username
auth_password = smtp-password
sendmail_from = you@yourserver.com

You could also just press start on mecury on the xamp control panel and run a mail server off your own pc.
No changes should need to be made if you run it locally , but you could edit the mail from adress if you like.

Now start/stop apache to reboot it and try again.

I am not to experinced with mecury so you may have to google some things but that looks like its working.
(This post was last modified: 04-30-2017, 07:26 PM by Darkbyte.)

[+] 1 user Likes Darkbyte's post
Reply