vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Text Obfuscate (https://vborg.vbsupport.ru/showthread.php?t=102588)

thalamus 12-09-2005 10:15 AM

Text Obfuscate
 
I'm trying to find something that will allow me to add a set of bbcode tags (something like [safe]text here[/safe] which, although showing the text on the post, will basically encode the output on the searchable page to an 'encode64' result - this to avoid search engines etc from picking up on the "text here" and thereby adding a little security to what's posted.

I'm sure I saw this somewhere before and if anyone's done this I'd appreciate any info rather than having to reinvent the wheel. Please? TIA.

Andreas 12-09-2005 10:17 AM

How would users decode it?

thalamus 12-09-2005 10:30 AM

Automated, hopefully - simply, the user would post thus:

"I spoke to [safe]Andrew Smith[/safe] today and we were talking about...."

so the post itself would read:

"I spoke to Andrew Smith today and we were talking about..."

but the View Source on the html page itself would read:

"I spoke to gtYdhjdjijrh8aeh today and we were talking about... "

so that the actual name, for instance, could not be seen by search bots/spiders. This would add a certain safety to any posts that may contain names and such who's privacy is to be respected. I was thinking of using a base64 javascript function for this, would this be the best way to go?

Marco van Herwaarden 12-09-2005 12:00 PM

Impossible!

If it shows to the user, it is in the html source. You could however create 1 that would not display to guests.

thalamus 12-09-2005 12:35 PM

hmm - I think its possible by using javascript so that the view source would say something like:

""I spoke to <script type="javascript">document.write(base64_decode('gt Ydhjdjijrh8aeh'))</script> today and we were talking about... "

but I'm sure there's no such function built in... or am I wrong?

sully02 12-09-2005 01:33 PM

Quote:

Originally Posted by thalamus
hmm - I think its possible by using javascript so that the view source would say something like:

""I spoke to <script type="javascript">document.write(base64_decode('gt Ydhjdjijrh8aeh'))</script> today and we were talking about... "

but I'm sure there's no such function built in... or am I wrong?

I know there is a product/plugin here that obfuscates email addresses on the boards. Let me link you to that, perhaps you can work on that to get what you need...

https://vborg.vbsupport.ru/showthrea...ess+obfuscator

thalamus 12-09-2005 02:07 PM

Thanks for the link - I've had a look and it's not quite the solution I'm looking for. I'll have to see how I can get it to be set up within the class_bbcode.php and find the hooks that will be needed to parse it up. Looks like I'll have to use the php base64_encode() function within the parser, then use a javascript decode as document.write (as above) to reproduce the original text on the posts. I'll keep this thread posted as to my progress ;)

thalamus 12-11-2005 07:35 AM

Well for anyone who's interested, I managed to work this out although it meant adding code to two php files (class_bbcode.php and class_bbcode_alt.php) and adding a function to vbulletin_global.js.

Basically I'm using the php function base64_encode within the class_bbcode.php call when parsing the text for the tag, and returning a html string that contains a javascript call to a decode64 function that I've added to the .js file. Seems to work great, and the html return string can also have a 'span style=color:' tag to highlight the obfuscated word.

If anyone wants the code and instructions (I have no idea how to write it up as a plugin etc) let me know.


All times are GMT. The time now is 07:10 AM.

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.01077 seconds
  • Memory Usage 1,726KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete