0 Members and 1 Guest are viewing this topic.

*

heebeha

  • ***
  • 102
  • Me
BOTS killing you? Lets fix the problem together
« on: April 26, 2017, 05:20:44 PM »
There are a number of BOTS (Web Robots) automatically registering fake users in order SPAM advertisements and such.  They are registering using a username they are using as the first and last name at the time of registration. 

Does anyone know how I can combat this?
I thought if we could add some code that checks to see if the first name and last are the same then error message "first name and last name cannot be the same"  please correct.

Can anyone help me with this and I share this fix with the rest of the community after we can confirm it works?

*

Pharg

  • *****
  • 2,789
    • OsDateFourm
  • osDate Version: osDate Evo v1.2
Re: BOTS killing you? Lets fix the problem together
« Reply #1 on: April 26, 2017, 09:51:28 PM »
Hi hebeha,

You can block bots using the robots.txt and if you know there IP's or domains they can also be block in htaccess.

In the robots.txt you would have it like this:
Code: [Select]
User-agent: *
 Disallow: /
 
User-agent: Googlebot
Allow: /
User-agent: Mediapartners-Google*
Allow: /
User-agent: Googlebot-Image
Allow: /
User-agent: Yahoo-MMCrawler
Allow: /
 
User-agent: Yahoo-slurp
Allow: /
User-agent: slurp
Allow: /
 
User-agent: Msnbot
Allow: /
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.2 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35

*

heebeha

  • ***
  • 102
  • Me
Re: BOTS killing you? Lets fix the problem together
« Reply #2 on: April 27, 2017, 02:08:56 PM »
I tried to block countries but with TOR and VPN's, proxies, etc anyone can spoof their IPs and locations.

As for Blocking BOTS, I don't want to block search engine bots like  google, Yahoo, MSN, etc just the hacker bots, but who knows who or what they are using?  Unless you think using your formula is best to combat them....  I will try your suggestion if so.

Do you know what code I would use if I wanted to check if first name and last name match then send error message?  All the mass registrants are using the same username, first name, last name to register.  I think if I could use a if then not statement it would help

*

Pharg

  • *****
  • 2,789
    • OsDateFourm
  • osDate Version: osDate Evo v1.2
Re: BOTS killing you? Lets fix the problem together
« Reply #3 on: April 27, 2017, 10:20:45 PM »
Hi heebeha,

The above code I gave you allows bots google, Yahoo, MSN and blocks the rest.

Notice it says allow in them  ;)

You can also use these:
https://iprodev.com/block-bad-bots-spiders-and-site-rippers-using-htaccess/

https://github.com/bluedragonz/bad-bot-blocker/blob/master/.htaccess

Block proxy servers from site access
Code: [Select]
# block proxy servers from site access
# https://perishablepress.com/press/2008/04/20/how-to-block-proxy-servers-via-htaccess/

RewriteEngine on
RewriteCond %{HTTP:VIA}                 !^$ [OR]
RewriteCond %{HTTP:FORWARDED}           !^$ [OR]
RewriteCond %{HTTP:USERAGENT_VIA}       !^$ [OR]
RewriteCond %{HTTP:X_FORWARDED_FOR}     !^$ [OR]
RewriteCond %{HTTP:PROXY_CONNECTION}    !^$ [OR]
RewriteCond %{HTTP:XPROXY_CONNECTION}   !^$ [OR]
RewriteCond %{HTTP:HTTP_PC_REMOTE_ADDR} !^$ [OR]
RewriteCond %{HTTP:HTTP_CLIENT_IP}      !^$
RewriteRule ^(.*)$ - [F]
« Last Edit: April 28, 2017, 01:57:51 AM by Pharg »
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.2 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35

*

heebeha

  • ***
  • 102
  • Me
Re: BOTS killing you? Lets fix the problem together
« Reply #4 on: April 28, 2017, 04:59:28 PM »
Thank you so much.  I did not see that it said allow.  Sorry.

Ok I added the following to my .htaccess file

# block proxy servers from site access
# https://perishablepress.com/press/2008/04/20/how-to-block-proxy-servers-via-htaccess/

RewriteEngine on
RewriteCond %{HTTP:VIA}                 !^$ [OR]
RewriteCond %{HTTP:FORWARDED}           !^$ [OR]
RewriteCond %{HTTP:USERAGENT_VIA}       !^$ [OR]
RewriteCond %{HTTP:X_FORWARDED_FOR}     !^$ [OR]
RewriteCond %{HTTP:PROXY_CONNECTION}    !^$ [OR]
RewriteCond %{HTTP:XPROXY_CONNECTION}   !^$ [OR]
RewriteCond %{HTTP:HTTP_PC_REMOTE_ADDR} !^$ [OR]
RewriteCond %{HTTP:HTTP_CLIENT_IP}      !^$
RewriteRule ^(.*)$ - [F]

And this to a new robots.txt file

User-agent: *
 Disallow: /
 
User-agent: Googlebot
Allow: /
User-agent: Mediapartners-Google*
Allow: /
User-agent: Googlebot-Image
Allow: /
User-agent: Yahoo-MMCrawler
Allow: /
 
User-agent: Yahoo-slurp
Allow: /
User-agent: slurp
Allow: /
 
User-agent: Msnbot
Allow: /


Fingers crossed. ;D

*

heebeha

  • ***
  • 102
  • Me
Re: BOTS killing you? Lets fix the problem together
« Reply #5 on: May 02, 2017, 06:46:19 PM »
It did not help.  I also upgraded to OsdateEvo 1.2 and still I am getting bots registering.  If I could set it up so the signup form checks if First and Last name match then fail it will help greatly.  Any help would be greatly appreciated.

I just need to know what to put here in the code on the signup.tpl file to ask the question if firstname = lastname then error message, do not submit form.

         {if $config.accept_firstname == 'Y' or $config.accept_firstname == '1'}
            <tr>
               <td width="33%">{lang mkey='signup_firstname'}
               {if $config.firstname_mandatory == 'Y' or $config.firstname_mandatory == '1'}
                  <font class="required_info">{$smarty.const.REQUIRED_INFO}</font>
               {/if}
               </td>
               <td width="67%"><input class="textinput" maxlength="50" name="txtfirstname" value="{$smarty.session.firstname}" /></td>
            </tr>
         {/if}
         {if $config.accept_lastname == 'Y' or $config.accept_lastname == '1'}
            <tr>
               <td>{lang mkey='signup_lastname'}
               {if $config.lastname_mandatory == 'Y' or $config.lastname_mandatory == '1'}
                  <font class="required_info">{$smarty.const.REQUIRED_INFO}</font>
               {/if}
               </td>
               <td> <input class="textinput" maxlength="50" name="txtlastname" value="{$smarty.session.lastname}" /> </td>
            </tr>
         {/if}

*

Pharg

  • *****
  • 2,789
    • OsDateFourm
  • osDate Version: osDate Evo v1.2
Re: BOTS killing you? Lets fix the problem together
« Reply #6 on: May 02, 2017, 10:15:56 PM »
Hi heebeha,

The only problem when checking first and last names is people do have the same name a lot, so I don't think
name checking like the username checking will work.

I found this about robots.txt and has stuff about bad bots in it, it might help.
https://en.wikipedia.org/wiki/Robots_exclusion_standard
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.2 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35

*

heebeha

  • ***
  • 102
  • Me
Re: BOTS killing you? Lets fix the problem together
« Reply #7 on: May 03, 2017, 12:08:44 AM »
I know but 99.9% of people don't have the same first and last name so it would be a huge help to me.  Any ideas how to code it to disallow first and last to be the same via code.  They are also using the same username, firstname, last name so if you prefer username and first name cant be the same.

See a sample of spam registrants attached.

*

Pharg

  • *****
  • 2,789
    • OsDateFourm
  • osDate Version: osDate Evo v1.2
Re: BOTS killing you? Lets fix the problem together
« Reply #8 on: May 03, 2017, 04:51:34 AM »
Hi heebeha,

I have seen this before on another site I use that's not a dating site and yet the members sign up with the same name, he is the thing about it, it's not bots doing it on mine, it's real people, scammers, spammers and they just don't let up.

If it was a bot on yours, you would find they wouldn't be getting passed the new google recaptcha, very hard to bot that.
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.2 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35

*

heebeha

  • ***
  • 102
  • Me
Re: BOTS killing you? Lets fix the problem together
« Reply #9 on: May 03, 2017, 03:16:05 PM »
They are relentless.  They are registering on several of my sites this way.  So can you help me please with my request?


*

Pharg

  • *****
  • 2,789
    • OsDateFourm
  • osDate Version: osDate Evo v1.2
Re: BOTS killing you? Lets fix the problem together
« Reply #10 on: May 03, 2017, 10:11:21 PM »
Hi heebeha,

I will try to convert the username checker into a real name checker and look for other scripts to help, no guarantees this
will work though.
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.2 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35

*

heebeha

  • ***
  • 102
  • Me
Re: BOTS killing you? Lets fix the problem together
« Reply #11 on: May 03, 2017, 10:42:09 PM »
You are the man.  I cant be the only one with this problem.  Im sure it will help everyone. 
Thank you...

*

Pharg

  • *****
  • 2,789
    • OsDateFourm
  • osDate Version: osDate Evo v1.2
Re: BOTS killing you? Lets fix the problem together
« Reply #12 on: May 03, 2017, 10:53:06 PM »
Hi heebeha,

I get them now and then, but I block there IP's since on every signup on mine records their IP's.
It's a old method used from way back in the tufat.com forum days.
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.2 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35

*

heebeha

  • ***
  • 102
  • Me
Re: BOTS killing you? Lets fix the problem together
« Reply #13 on: May 03, 2017, 10:56:35 PM »
How are you recording the IP?  I think they are jumping IP's via a proxy because I blocked most of Europe from accessing the sites

*

Pharg

  • *****
  • 2,789
    • OsDateFourm
  • osDate Version: osDate Evo v1.2
Re: BOTS killing you? Lets fix the problem together
« Reply #14 on: May 03, 2017, 11:05:26 PM »
Hi heebeha,

From what I remember, osDate 2.6 and onward's has recorded the IP's on signup, it just doesn't show them in the template if I remember correctly that is.

I will have a look and see if I am right, as my live site does this on every signup and every time they login it changes the IP to what they are on.
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.2 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35