rkandrades
Sr. Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 392
Merit: 251
Bitcoin Faucet & Blog
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 18, 2015, 04:20:02 PM |
|
Hi...
I'm trying to change the Faucetbox code to give different reward according to the country.
Where is the code that define/set de reward to be paid? I want to put some IFs/Switches/Cases there.
Thank you.
I think your best bet is changing $data['rewards'] right before line 2156 (if you're using r60) in main index.php. Thank you. I spent some good hours this evening and now It works. GeoLocation Rewards is really a very good feature. You should think about include this feature in a future realease. Well.. Help me with one more doubt please. Has Faucetbox the lifetime referral option?
|
|
|
|
NeedIfFindIt
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 18, 2015, 04:41:36 PM |
|
Can i do this to block tor ips? By going to https://www.dan.me.uk/torlist/, can I copy and paste these IPs into my IP blacklist in the security tab on my faucetinabox admin page? Or do I have to do something more? If you're planning to do this, I would suggest having your code do it automatically to save you trouble and increase security. To do this, I believe that you can just input this code at line 1512: foreach(file('https://www.dan.me.uk/torlist/') as $torIP){ if(ipSubnetCheck($ip, $torIP)){ banned(); } }
If this is incorrect, please correct me Kazul; I'm having trouble understanding the code lol. Do you read that at the header of the list.
" Please keep in mind that this list is not moderated by FaucetBOX.com Staff."
That is irrelevant to his question. I think it depends on how many people are visiting.
I was going to say that it might be on the like to dislike ratio, but looking at the list that doesn't seem like it would work. https://www.dan.me.uk/torlist/ will return the tor list once every 30 minutes. You need to make a script to download the list locally every 35 minutes. Then use your local file to compare. Otherwise you are not really stopping the tor users.
|
|
|
|
misterbit
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 18, 2015, 04:49:23 PM |
|
Go here is code? if($_SERVER["REQUEST_METHOD"] == "POST") { if($security_settings["ip_check_server"]) { if(!preg_match("#/$#", $security_settings["ip_check_server"])) { $security_settings["ip_check_server"] .= "/"; } }
// banning $ip = ip2long(getIP()); if($ip) { // only ipv4 supported here foreach($security_settings["ip_ban_list"] as $ban) { if(ipSubnetCheck($ip, $ban)) { banned(); } } ----> foreach(file('https://www.dan.me.uk/torlist/') as $torIP){ if(getIP() == trim($torIP)){ banned(); } -----> } }
if($security_settings["ip_check_server"]) {
|
|
|
|
minifrij
Legendary
Offline
Activity: 2352
Merit: 1267
In Memory of Zepher
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 18, 2015, 05:05:40 PM |
|
Yes, but you will need to edit it slightly due to what NeedIfFindIt pointed out. Since you can only access the list once every 30 minutes, you will need to set up a CRON job every 30 minutes to 1 hour or so to get an up to date list. Luckily this is fairly simple to do. You will just need a file with this code inside (call it tor.php or something similar): <?php $torList = file_get_contents('https://www.dan.me.uk/torlist/'); file_put_contents('torlist.txt', $torList); ?>
This will get the code from the torlist and store it in your server under torlist.txt. To set up a CRON job, you will have to look on your cPanel and find where 'CRON Jobs' or 'Scheduled Tasks' are. Simply link that to tor.php and set it to run every hour or so. Next, you will need to edit the check slightly. Instead of this: foreach(file('https://www.dan.me.uk/torlist/') as $torIP){
It will have to be this: foreach(file('torlist.txt') as $torIP){
|
|
|
|
Kazuldur (OP)
Legendary
Offline
Activity: 971
Merit: 1000
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 18, 2015, 05:12:01 PM |
|
Can i do this to block tor ips? By going to https://www.dan.me.uk/torlist/, can I copy and paste these IPs into my IP blacklist in the security tab on my faucetinabox admin page? Or do I have to do something more? If you're planning to do this, I would suggest having your code do it automatically to save you trouble and increase security. To do this, I believe that you can just input this code at line 1512: foreach(file('https://www.dan.me.uk/torlist/') as $torIP){ if(ipSubnetCheck($ip, $torIP)){ banned(); } }
If this is incorrect, please correct me Kazul; I'm having trouble understanding the code lol. https://www.dan.me.uk/torlist/ will return the tor list once every 30 minutes. To be honest I'm not sure if using this list is a good idea at all. It lists all Tor nodes, including relay nodes, not only exit nodes. In practice you'll only see exit-nodes on your faucet, so I think it's better to use the official list: https://check.torproject.org/exit-addressesEDIT: also Nastyhosts.com uses https://check.torproject.org/exit-addresses as one of sources, so you can just use it to block Tor.
|
Unless stated otherwise, all opinions are of my own, not FaucetBOX.com's.
|
|
|
misterbit
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 18, 2015, 08:44:31 PM |
|
Great friend Yes, but you will need to edit it slightly due to what NeedIfFindIt pointed out. Since you can only access the list once every 30 minutes, you will need to set up a CRON job every 30 minutes to 1 hour or so to get an up to date list. Luckily this is fairly simple to do. You will just need a file with this code inside (call it tor.php or something similar): <?php $torList = file_get_contents('https://www.dan.me.uk/torlist/'); file_put_contents('torlist.txt', $torList); ?>
This will get the code from the torlist and store it in your server under torlist.txt. To set up a CRON job, you will have to look on your cPanel and find where 'CRON Jobs' or 'Scheduled Tasks' are. Simply link that to tor.php and set it to run every hour or so. Next, you will need to edit the check slightly. Instead of this: foreach(file('https://www.dan.me.uk/torlist/') as $torIP){
It will have to be this: foreach(file('torlist.txt') as $torIP){
|
|
|
|
misterbit
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 18, 2015, 10:13:11 PM |
|
He left me this message in the file Umm... You can only fetch the data every 30 minutes - sorry. It's pointless any faster as I only update every 30 minutes anyway. If you keep trying to download this list too often, you may get blocked from accessing it completely. (this is due to some people trying to download this list every minute!)
Yes, but you will need to edit it slightly due to what NeedIfFindIt pointed out. Since you can only access the list once every 30 minutes, you will need to set up a CRON job every 30 minutes to 1 hour or so to get an up to date list. Luckily this is fairly simple to do. You will just need a file with this code inside (call it tor.php or something similar): <?php $torList = file_get_contents('https://www.dan.me.uk/torlist/'); file_put_contents('torlist.txt', $torList); ?>
This will get the code from the torlist and store it in your server under torlist.txt. To set up a CRON job, you will have to look on your cPanel and find where 'CRON Jobs' or 'Scheduled Tasks' are. Simply link that to tor.php and set it to run every hour or so. Next, you will need to edit the check slightly. Instead of this: foreach(file('https://www.dan.me.uk/torlist/') as $torIP){
It will have to be this: foreach(file('torlist.txt') as $torIP){
|
|
|
|
Kazuldur (OP)
Legendary
Offline
Activity: 971
Merit: 1000
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 18, 2015, 10:53:56 PM |
|
He left me this message in the file Umm... You can only fetch the data every 30 minutes - sorry. It's pointless any faster as I only update every 30 minutes anyway. If you keep trying to download this list too often, you may get blocked from accessing it completely. (this is due to some people trying to download this list every minute!)
You can't run tor.php more than once every 30 minutes.
|
Unless stated otherwise, all opinions are of my own, not FaucetBOX.com's.
|
|
|
misterbit
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 18, 2015, 10:57:10 PM |
|
But it is the first time that I put it, and I put an hour to cron He left me this message in the file Umm... You can only fetch the data every 30 minutes - sorry. It's pointless any faster as I only update every 30 minutes anyway. If you keep trying to download this list too often, you may get blocked from accessing it completely. (this is due to some people trying to download this list every minute!)
You can't run tor.php more than once every 30 minutes.
|
|
|
|
Kazuldur (OP)
Legendary
Offline
Activity: 971
Merit: 1000
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 18, 2015, 11:04:39 PM |
|
But it is the first time that I put it, and I put an hour to cron
Please don't top-post, it's confusing ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) . If you had a code with file(' https://www.dan.me.uk/torlist/'); in your index.php right before you created tor.php, then it already used the limit of 1 request per 30 minutes. Wait till your cron runs again and see if it's correct then. If it's not, then - as you're probably on a shared hosting - someone else on your server is also requesting this list. Then there's nothing you can do about that without changing hosting. What I can suggest in that case is either using Nastyhosts.com or the official list from Tor Project.
|
Unless stated otherwise, all opinions are of my own, not FaucetBOX.com's.
|
|
|
misterbit
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 18, 2015, 11:31:48 PM Last edit: October 18, 2015, 11:42:53 PM by misterbit |
|
Please don't top-post, it's confusing ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) . If you had a code with file(' https://www.dan.me.uk/torlist/'); in your index.php right before you created tor.php, then it already used the limit of 1 request per 30 minutes. Wait till your cron runs again and see if it's correct then. If it's not, then - as you're probably on a shared hosting - someone else on your server is also requesting this list. Then there's nothing you can do about that without changing hosting. What I can suggest in that case is either using Nastyhosts.com or the official list from Tor Project. OK thank you, because I changed the cron to 30 minutes and now if ran ![Wink](https://bitcointalk.org/Smileys/default/wink.gif)
|
|
|
|
misterbit
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 19, 2015, 10:12:43 AM |
|
Already left the r61 ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) , but I see this error in the error_log, what? PHP Notice: Undefined variable: fake_address_input_used in /index.php on line 2336
|
|
|
|
ragi
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 19, 2015, 02:13:51 PM |
|
Already left the r61 ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) , but I see this error in the error_log, what? PHP Notice: Undefined variable: fake_address_input_used in /index.php on line 2336
Same here. It's has something to do with the hidden honeypot fields.
|
no.
|
|
|
Kazuldur (OP)
Legendary
Offline
Activity: 971
Merit: 1000
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 19, 2015, 04:22:57 PM |
|
Already left the r61 ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) , but I see this error in the error_log, what? PHP Notice: Undefined variable: fake_address_input_used in /index.php on line 2336
Same here. It's has something to do with the hidden honeypot fields. Oops, sorry about that. It doesn't break anything except for cluttering logs. We will fix it in r62.
|
Unless stated otherwise, all opinions are of my own, not FaucetBOX.com's.
|
|
|
NeedIfFindIt
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 19, 2015, 04:30:58 PM |
|
Great friend Yes, but you will need to edit it slightly due to what NeedIfFindIt pointed out. Since you can only access the list once every 30 minutes, you will need to set up a CRON job every 30 minutes to 1 hour or so to get an up to date list. Luckily this is fairly simple to do. You will just need a file with this code inside (call it tor.php or something similar): <?php $torList = file_get_contents('https://www.dan.me.uk/torlist/'); file_put_contents('torlist.txt', $torList); ?>
This will get the code from the torlist and store it in your server under torlist.txt. To set up a CRON job, you will have to look on your cPanel and find where 'CRON Jobs' or 'Scheduled Tasks' are. Simply link that to tor.php and set it to run every hour or so. Next, you will need to edit the check slightly. Instead of this: foreach(file('https://www.dan.me.uk/torlist/') as $torIP){
It will have to be this: foreach(file('torlist.txt') as $torIP){
Here is little correction to your idea: <?php $torList = file_get_contents('https://www.dan.me.uk/torlist/'); if (strpos($torList, 'You can only fetch')===false) { file_put_contents('torlist.txt', $torList); } ?>
This is to make sure it does not replace old but good file with junk.
|
|
|
|
examplens
Legendary
Offline
Activity: 3388
Merit: 3379
Crypto Swap Exchange
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 20, 2015, 12:45:55 AM |
|
does anyone have an idea why ihave blank white page when i click on reward claim? no error message, nothing, just blank page. i try to install new r61 version, nut again this problem. everything is fine, edit the claim rewards, timer, API key, captcha keys, all of this thing i can to save, but after that in same faucet, and admin page have a blank page? any idea where is a problem? on same hosting there are other FB faucets on different domains, and all work good. exclude the possibility that the software on the server not good. thanks
|
|
|
|
nawaraj
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 20, 2015, 04:41:57 AM |
|
does anyone have an idea why ihave blank white page when i click on reward claim? no error message, nothing, just blank page. i try to install new r61 version, nut again this problem. everything is fine, edit the claim rewards, timer, API key, captcha keys, all of this thing i can to save, but after that in same faucet, and admin page have a blank page? any idea where is a problem? on same hosting there are other FB faucets on different domains, and all work good. exclude the possibility that the software on the server not good. thanks
I habe also face this problem but in that case it was due to dad server means free hosting.
|
|
|
|
examplens
Legendary
Offline
Activity: 3388
Merit: 3379
Crypto Swap Exchange
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 20, 2015, 08:15:25 AM |
|
does anyone have an idea why ihave blank white page when i click on reward claim? no error message, nothing, just blank page. i try to install new r61 version, nut again this problem. everything is fine, edit the claim rewards, timer, API key, captcha keys, all of this thing i can to save, but after that in same faucet, and admin page have a blank page? any idea where is a problem? on same hosting there are other FB faucets on different domains, and all work good. exclude the possibility that the software on the server not good. thanks
I habe also face this problem but in that case it was due to dad server means free hosting. it is not a free hosting, i have fb script already installed on this server. on this domain normally works faucetbox doge script
|
|
|
|
Kazuldur (OP)
Legendary
Offline
Activity: 971
Merit: 1000
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 20, 2015, 09:58:03 AM |
|
does anyone have an idea why ihave blank white page when i click on reward claim? no error message, nothing, just blank page. i try to install new r61 version, nut again this problem. everything is fine, edit the claim rewards, timer, API key, captcha keys, all of this thing i can to save, but after that in same faucet, and admin page have a blank page? any idea where is a problem? on same hosting there are other FB faucets on different domains, and all work good. exclude the possibility that the software on the server not good. thanks
I habe also face this problem but in that case it was due to dad server means free hosting. it is not a free hosting, i have fb script already installed on this server. on this domain normally works faucetbox doge script I think I've just replied to you on support. It's a problem with combination of enabling IP address banning and using reverse proxy without configuring it properly. Reverse proxy wasn't configured in the script, so it seems like all requests came from the proxy. The script assumes that requests from proxy can't be trusted, so it refuses to handle them. That somewhat protects from password-guessing attacks on the admin panel. If anyone has a similar problem (you can check that by setting $display_errors = true; in your config.php file), you can use this script to reset your faucet's Security settings: https://static.faucetinabox.com/download/tools/clear-security.php
|
Unless stated otherwise, all opinions are of my own, not FaucetBOX.com's.
|
|
|
examplens
Legendary
Offline
Activity: 3388
Merit: 3379
Crypto Swap Exchange
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 20, 2015, 10:32:44 AM |
|
does anyone have an idea why ihave blank white page when i click on reward claim? no error message, nothing, just blank page. i try to install new r61 version, nut again this problem. everything is fine, edit the claim rewards, timer, API key, captcha keys, all of this thing i can to save, but after that in same faucet, and admin page have a blank page? any idea where is a problem? on same hosting there are other FB faucets on different domains, and all work good. exclude the possibility that the software on the server not good. thanks
I habe also face this problem but in that case it was due to dad server means free hosting. it is not a free hosting, i have fb script already installed on this server. on this domain normally works faucetbox doge script I think I've just replied to you on support. It's a problem with combination of enabling IP address banning and using reverse proxy without configuring it properly. Reverse proxy wasn't configured in the script, so it seems like all requests came from the proxy. The script assumes that requests from proxy can't be trusted, so it refuses to handle them. That somewhat protects from password-guessing attacks on the admin panel. If anyone has a similar problem (you can check that by setting $display_errors = true; in your config.php file), you can use this script to reset your faucet's Security settings: https://static.faucetinabox.com/download/tools/clear-security.phpyes, this is a problem. solved now. i make mistake when enable nastyhosts before set reverse proxy, and after that i can't access on any changes thanks for support, i am not be a sure where will get faster answer and because that post in here and on support. thanks again.
|
|
|
|
|