Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
  #1  
Old 08-28-2018, 01:19 AM
Outlaw Mantis Outlaw Mantis is offline
 
Join Date: Nov 2013
Location: Manchester, UK
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default vBulletin 4 Request - Block Opera Mini

Opera Mini has been a problem for me. Though it is sometimes used by spammers, from time to time I use services like Postloop. There are some people who create multiple accounts which breaks the TOS, but they use the proxy features of Opera Mini to hide their identity. There is an online demo of the browser (uses Java I think), so they might use Opera Mini on their desktop so they can more easily exploit sites like Postloop.

I hear this should be an easy case of user agent blocking. I've given a couple of scripts a try as plugins but I can't seem to get it working. Ideally I'd like a block to redirect the Opera Mini user to a page explaining the block.

If anyone can make such a mod I'd be very thankful!
Reply With Quote
  #2  
Old 08-28-2018, 03:37 PM
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
Senior Member
 
Join Date: Sep 2008
Location: North Carolina
Posts: 5,844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A redirect type of mod based on user agent should be do-able (just not by me today too busy) but until you have time to dig into it deeper or find someone with time to code it you can try:

https://vborg.vbsupport.ru/showthread.php?t=268208

Doesn't matter if they're a spider/bot or not it will ban the user agent, the thing about Opera Mini you must realize is the fact it has so many user agents, so one of the older mods/plugins you used prior may have worked HOWEVER may not of contained references to all the OM agent strings therefor it wasn't always detected etc.

Reference:
http://www.useragentstring.com/pages...ame=Opera+Mini
Reply With Quote
  #3  
Old 08-30-2018, 10:07 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try a plugin on init_startup hook with this code:

Code:
if (strpos($_SERVER['HTTP_USER_AGENT'], 'Opera Mini') !== false) 
{
    header('Location: http://yoursire.com/path/to/explanation.php');
}
Obviously replace http://yoursire.com/path/to/explanation.php with the URL to your actual explanation. This should be accessible to guests.


WARNING - if there is a bug/issue you will need to DISABLE_HOOKS via config.php file to access the forum as the init_startup hook is run even on admincp pages. Any issue there can bring down the entire forum. I haven't tested the code so i can't say for certain it will work,
Reply With Quote
3 благодарности(ей) от:
MarkFL, Max Taxable, TheLastSuperman
  #4  
Old 09-01-2018, 05:01 PM
Outlaw Mantis Outlaw Mantis is offline
 
Join Date: Nov 2013
Location: Manchester, UK
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the suggestions guys, but no luck yet. I tried BOP5's method first but it just didn't seem to be working, so I thought I'd give TLS's a go. It's a nice plugin you've linked to but I can't get it to work. I downloaded a huge list of Opera Mini UA strings, put them in the mod and turned it all on but nothing's changed.

It doesn't seem to be registering that I'm accessing the forum on my phone with Opera Mini as there's no output to the log file. I know Opera Mini was designed to be a royal PITA through and through but I can't make sense of this...

Any ideas? Cheers!
Reply With Quote
  #5  
Old 09-02-2018, 01:22 PM
unitedpunjab unitedpunjab is offline
 
Join Date: Feb 2006
Location: Scotland
Posts: 286
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

try to block ar web server level.

Apache-

SetEnvIfNoCase ^User-Agent$ .*Opera Mini.* bad_bot
<Directory "/home/*/public_html">
Order Allow,Deny
Allow from all
Deny from env=bad_bot
</Directory>

Nginx-

if ($http_user_agent ~* (opera m(ob|in)i)) {
return 403;
}
Reply With Quote
  #6  
Old 09-04-2018, 09:25 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The problem is Opera Mini is essentially lying. I installed it, visited my own site, went to a specific thread no one else was viewing, and went to Who's Online with the browser User Agent enabled and this is what I got as the only user viewing that thread:


107.167.108.183
Mozilla/5.0 (Linux; U; Android 8.0.0; SM-G930P Build/R16NW; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/68.0.3440.91 Mobile Safari/537.36 OPR/36.2.2254.130496


First it isn't my IP address and second Opera Mini is never mentioned in the User Agent.

Doing a search on the IP it comes back as: Opera Mini Proxy

Doing some Googling it seems there are thousands of possible Opera Mini Proxy IP addresses- https://tools.tracemyip.org/search--...era+mini+proxy

So it's not a simple IP block either. Unfortunately I don't have an answer other than why the User Agent isn't working.

--------------- Added [DATE]1536090887[/DATE] at [TIME]1536090887[/TIME] ---------------

Opera desktop use agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36 OPR/55.0.2994.44
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:54 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04254 seconds
  • Memory Usage 2,210KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (3)post_thanks_box_bit
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete