minifrij
Legendary
Offline
Activity: 2352
Merit: 1267
In Memory of Zepher
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 02, 2015, 04:57:50 PM |
|
Well...
I just created a php file with you example above and installed it into my host.
A did run the php file and it doesn't execute the code inside the if.
Are you sure that your example returns true?
Almost none of my codes posted here are tested and are just from the top of my head. They should be used as a guideline if nothing else. Which part of the If are you talking about? The one in the foreach loop? Could you do a var_dump of the IP given by the explode+str_replace method and some of the TOR ips the foreach loop returns?
|
|
|
|
misterbit
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 02, 2015, 04:59:11 PM |
|
OK thanks, seems that the code was changed when I put it here. Then I activate Nastyhost to run the torlist?
The Tor list and NastyHosts are two seperate services. The Tor list stops Tor only stops Tor, whereas NastyHosts stops malicious hostnames and other things. Yes, that I know it, but from the Faucetina panel must enable Nastyhost so both are running?
|
|
|
|
minifrij
Legendary
Offline
Activity: 2352
Merit: 1267
In Memory of Zepher
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 02, 2015, 05:01:57 PM |
|
Yes, that I know it, but from the Faucetina panel must enable Nastyhost so both are running?
Yeah, you should definitely have NastyHosts on in the FaucetInABox admin panel. Apologies, I seem to have misunderstood you.
|
|
|
|
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) |
November 02, 2015, 05:05:43 PM |
|
Well...
I just created a php file with you example above and installed it into my host.
A did run the php file and it doesn't execute the code inside the if.
Are you sure that your example returns true?
Almost none of my codes posted here are tested and are just from the top of my head. They should be used as a guideline if nothing else. Which part of the If are you talking about? The one in the foreach loop? Could you do a var_dump of the IP given by the explode+str_replace method and some of the TOR ips the foreach loop returns? I am talking about this code: if(strpos('abcdefghijklmnopqrstuvwxyz', 'hello') !== false){ //executable code } It isn't returning true as you suggested. Th code inside the if does't execute. However now I'm logging the recently banned IPs from my site. Then I will check if some false positive is occurring because of the strpos().
|
|
|
|
minifrij
Legendary
Offline
Activity: 2352
Merit: 1267
In Memory of Zepher
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 02, 2015, 05:11:11 PM |
|
I am talking about this code: if(strpos('abcdefghijklmnopqrstuvwxyz', 'hello') !== false){ //executable code } It isn't returning true as you suggested. Th code inside the if does't execute. In that case, I may have made a mistake and mixed it up with another function. My apologies. E: Yes, I am incorrect about strpos. My greatest apologies.
|
|
|
|
misterbit
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 02, 2015, 05:12:53 PM |
|
Yes, that I know it, but from the Faucetina panel must enable Nastyhost so both are running?
Yeah, you should definitely have NastyHosts on in the FaucetInABox admin panel. Apologies, I seem to have misunderstood you. That is the bad thing, apparently Nastyhost can block legitimate ips. Is there no way to use the Tor ip only?
|
|
|
|
minifrij
Legendary
Offline
Activity: 2352
Merit: 1267
In Memory of Zepher
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 02, 2015, 05:17:09 PM |
|
That is the bad thing, apparently Nastyhost can block legitimate ips. Is there no way to use the Tor ip only?
I expect that it is a very low chance of doing so. You can use the Tor test without NastyHosts by not turning it on, as the Tor checker runs separately. I wouldn't advise it though, as your faucet would be less secure.
|
|
|
|
BitMaxz
Legendary
Offline
Activity: 3360
Merit: 3085
BTC price road to $80k
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 02, 2015, 05:18:45 PM |
|
Hi guys do you have any anti script? I need anti proxy anti vpn and anti bot.. for my faucet can you share few script guys?
|
|
|
|
misterbit
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 02, 2015, 05:23:50 PM |
|
That is the bad thing, apparently Nastyhost can block legitimate ips. Is there no way to use the Tor ip only?
I expect that it is a very low chance of doing so. You can use the Tor test without NastyHosts by not turning it on, as the Tor checker runs separately. I wouldn't advise it though, as your faucet would be less secure. How would you do it? It is that I have the full IPS htaccess
|
|
|
|
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) |
November 02, 2015, 05:27:30 PM |
|
I am talking about this code: if(strpos('abcdefghijklmnopqrstuvwxyz', 'hello') !== false){ //executable code } It isn't returning true as you suggested. Th code inside the if does't execute. In that case, I may have made a mistake and mixed it up with another function. My apologies. E: Yes, I am incorrect about strpos. My greatest apologies. No problem. You were just trying to help. Both of us learn with these tests. ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif)
|
|
|
|
minifrij
Legendary
Offline
Activity: 2352
Merit: 1267
In Memory of Zepher
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 02, 2015, 05:32:08 PM |
|
How would you do it? It is that I have the full IPS htaccess
Personally I would keep on checks like NastyHosts and keep the minority of real people that are blacklisted wouldn't be able to access the faucet. I cannot imagine there being a safe way to prove that you are an owner of a real IP for whitelisting, and not just a bot owner asking for his bot to be unblocked. However, I am not a faucet owner and I'm only speaking from what I have read and my own judgement. You would be better perhaps asking other owners of major faucets how they keep away bots and such. No problem. You were just trying to help. Both of us learn with these tests. ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) Thank you for being understanding.
|
|
|
|
misterbit
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 02, 2015, 05:38:23 PM |
|
I friend, if I put the torlist.txt in the index should activate the Nastyhost? foreach (file('torlist.txt') as $torIP) { If (getIP () == trim ($torIP)) { banned(); } } Greetings thank you.
The Tor list and NastyHosts both achieve different purposes. You should have both. Also. I fixed your code. You only need the opening brace '{' on lines 1 and 2, not both braces. OK thanks, seems that the code was changed when I put it here. Then I activate Nastyhost to run the torlist? Friend... you can do this way: // Put your site IP bellow (you can ping your URL to get the IP) $mySiteIp = '111.111.111.111'
//Get the visitor IP $ip=$_SERVER['REMOTE_ADDR'];
//get the list of nodes that can achieve your site $torList = file_get_contents("https://check.torproject.org/cgi-bin/TorBulkExitList.py?ip=$mySiteIp&port=80");
//remove your IP address from the list. It is listed in the file header. $torList = str_replace((string)$mySiteIp,"",$torList);
//check if the visitor IP is in the TOR list if ((strpos((string)$torList, (string)$ip)) !== false) { banned(); } Thank you, this we put it in the index.php instead torlist?
|
|
|
|
ONLYfree
Legendary
Offline
Activity: 1288
Merit: 1000
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 02, 2015, 06:08:37 PM |
|
Dashboard not working. Like see payouts or faucet stats.
|
-2: -1 / +0 Warning: Trade with extreme caution!
|
|
|
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) |
November 02, 2015, 06:30:16 PM |
|
I friend, if I put the torlist.txt in the index should activate the Nastyhost? foreach (file('torlist.txt') as $torIP) { If (getIP () == trim ($torIP)) { banned(); } } Greetings thank you.
The Tor list and NastyHosts both achieve different purposes. You should have both. Also. I fixed your code. You only need the opening brace '{' on lines 1 and 2, not both braces. OK thanks, seems that the code was changed when I put it here. Then I activate Nastyhost to run the torlist? Friend... you can do this way: // Put your site IP bellow (you can ping your URL to get the IP) $mySiteIp = '111.111.111.111'
//Get the visitor IP $ip=$_SERVER['REMOTE_ADDR'];
//get the list of nodes that can achieve your site $torList = file_get_contents("https://check.torproject.org/cgi-bin/TorBulkExitList.py?ip=$mySiteIp&port=80");
//remove your IP address from the list. It is listed in the file header. $torList = str_replace((string)$mySiteIp,"",$torList);
//check if the visitor IP is in the TOR list if ((strpos((string)$torList, (string)$ip)) !== false) { banned(); } Thank you, this we put it in the index.php instead torlist? Yes. Tell us if this is working well. ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) If you are interested, I developed a Protection Barrier with 8 layers of protection agains Bots, Proxies and malicious IPs. Send me a PM to know more...
|
|
|
|
LosingAlpha
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 02, 2015, 06:37:27 PM |
|
Friend... you can do this way: // Put your site IP bellow (you can ping your URL to get the IP) $mySiteIp = '111.111.111.111'
//Get the visitor IP $ip=$_SERVER['REMOTE_ADDR'];
//get the list of nodes that can achieve your site $torList = file_get_contents("https://check.torproject.org/cgi-bin/TorBulkExitList.py?ip=$mySiteIp&port=80");
//remove your IP address from the list. It is listed in the file header. $torList = str_replace((string)$mySiteIp,"",$torList);
//check if the visitor IP is in the TOR list if ((strpos((string)$torList, (string)$ip)) !== false) { banned(); } Pulling the list from torproject.org on every hit is a Very Bad Idea, just grab it once a day and store a copy on the local filesystem. I wouldn't worry about your own server's IP either. It's not ever going to be trying to hit itself.
|
|
|
|
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) |
November 02, 2015, 06:48:28 PM |
|
Friend... you can do this way: // Put your site IP bellow (you can ping your URL to get the IP) $mySiteIp = '111.111.111.111'
//Get the visitor IP $ip=$_SERVER['REMOTE_ADDR'];
//get the list of nodes that can achieve your site $torList = file_get_contents("https://check.torproject.org/cgi-bin/TorBulkExitList.py?ip=$mySiteIp&port=80");
//remove your IP address from the list. It is listed in the file header. $torList = str_replace((string)$mySiteIp,"",$torList);
//check if the visitor IP is in the TOR list if ((strpos((string)$torList, (string)$ip)) !== false) { banned(); } Pulling the list from torproject.org on every hit is a Very Bad Idea, just grab it once a day and store a copy on the local filesystem. I wouldn't worry about your own server's IP either. It's not ever going to be trying to hit itself. In my faucet I'm storing/caching the result. But I think that consulting one time per day is less than the recommended. TOR nodes are borning every hour... Myabe check it every two hours could be a good move.
|
|
|
|
Kazuldur (OP)
Legendary
Offline
Activity: 971
Merit: 1000
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 02, 2015, 07:00:29 PM |
|
We're forced to move FaucetBOX.com to new data center sooner that we expected. No payouts will be done in this time. We'll send all pending withdrawals after successful migration. Also you may experience decreased performance and random failed requests. We're really sorry for any inconvenience caused by this.
|
Unless stated otherwise, all opinions are of my own, not FaucetBOX.com's.
|
|
|
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) |
November 02, 2015, 07:17:01 PM |
|
We're forced to move FaucetBOX.com to new data center sooner that we expected. No payouts will be done in this time. We'll send all pending withdrawals after successful migration. Also you may experience decreased performance and random failed requests. We're really sorry for any inconvenience caused by this.
When it starts and when should be done?
|
|
|
|
Kazuldur (OP)
Legendary
Offline
Activity: 971
Merit: 1000
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 02, 2015, 07:33:57 PM |
|
We're forced to move FaucetBOX.com to new data center sooner that we expected. No payouts will be done in this time. We'll send all pending withdrawals after successful migration. Also you may experience decreased performance and random failed requests. We're really sorry for any inconvenience caused by this.
When it starts and when should be done? It has already started an hour ago and if everything goes right, it should end tomorrow evening. But there's quite good chance that something will go wrong, so even 2-3 days without transactions are possible. Just to clarify: API /send requests will mostly work, altough they may be slower than usual. What won't work for a day or two are blockchain withdrawal transactions to users.
|
Unless stated otherwise, all opinions are of my own, not FaucetBOX.com's.
|
|
|
P1R4T3
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 02, 2015, 07:34:40 PM |
|
We're forced to move FaucetBOX.com to new data center sooner that we expected. No payouts will be done in this time. We'll send all pending withdrawals after successful migration. Also you may experience decreased performance and random failed requests. We're really sorry for any inconvenience caused by this.
Hi, i send you pm please replay when you can ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif)
|
|
|
|
|