Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
MD5 Version File Generator Details »»
MD5 Version File Generator
Version: 1.00, by Marco van Herwaarden Marco van Herwaarden is offline
Developer Last Online: Dec 2010 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 02-20-2006 Last Update: 02-20-2006 Installs: 20
DB Changes Uses Plugins
Additional Files  
No support by the author.

MD5 Version File Generator - Version 1.00

Hack: MD5 Version File generator
Version: v1.00
Author: MarcoH64
vB Version: 3.5.4 and higher (WILL NOT WORK ON LOWER VERSIONS!)

See for the "announcement" of this new function in vB3.5.4: http://www.vbulletin.com/forum/showp...9&postcount=16

Description
This Modification is a tool for Hack Coders.

Since vB version 3.5.4 there is an improved File Version checker included as part of the diagnostics. All files in the forumhome directory will be checked if they are know and if the content is not changed.

To do this vBulletin uses a file called ./includes/md5_sums_PRODUCTID.php
This file contains all known files (for the hack the file is written for) and a MD5 hash of the files.

If you don't supply this file, admins will be warned for unknown files in their forumhome directory if you hack upload new files there. To create such a file by hand is not easy, but this hack can do it for you.

How to use:
  • AdminCP->Plugin System->Version File Manager
  • You will see a list of all Products installed on the board.
    Click edit behind your Product and on the next screen, place all files that will be uploaded for your Hack in the text box. Each on their own line, with a absolut path as from the forumhome directory.
  • When you are ready to package and release your product, choose Generate MD5 File from the Dropdown menu.
  • There will now a new file be generated in your includes directory named md5_sums_PRODUCTID.php
  • Include this file in your Product zip-file (upload/includes directory).
    Finished
You must have write access to your ./includes directory!
Not tested on systems with open_basedir restriction.

Example generated file:
PHP Code:
<?php
// Checksum file
// Product: mh_md5gen - MD5 Version File generator
// Version: 1.00
// File generated by: $RCSfile: mh_md5gen.php,v $ - $Revision: 1.00 $
// Generator: MD5 Version File generator by MarcoH64 (c)
$md5_sums = array(
'/admincp' => array(
'mh_md5gen.php' => '0fef72130b665a6537d1b410c4337e1b',
),
'/includes/xml' => array(
'cpnav_mh_md5gen.xml' => 'eaca42281128a61f40cc820596b4af41',
),
);
?>
Copyright etc.
# Copyright ?2006 MarcoH64
# This Modification may not be redistributed in whole or significant part or changed without prior written agreement of author.
Please don't forget to click Install at vbulletin.org.
If you like this work and would like to support the author, donations are always welcome at Paypal: marcoh64@gmail.com

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 02-22-2006, 10:17 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thx Floris
Reply With Quote
  #13  
Old 03-24-2006, 04:25 PM
msgotit msgotit is offline
 
Join Date: May 2005
Location: Idaho, US
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Probably a user error, but it wasn't working so I replace this line:

PHP Code:
$filehash = @md5_file(DIR $productfile['filename']); 
With this:

PHP Code:
$filehash = @md5(str_replace("\r\n""\n"file_get_contents(DIR $productfile['filename']))); 
That seemed to solve my problem... Is there a reason? Or just user error.
Reply With Quote
  #14  
Old 03-28-2006, 01:15 PM
IamLoBAS's Avatar
IamLoBAS IamLoBAS is offline
 
Join Date: Mar 2006
Location: Bangkok, TH
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, I don't have AdminCP->Plugin System->Version File Manager. So I can't click it.

Pls., Help me.
Reply With Quote
  #15  
Old 03-29-2006, 12:57 AM
msgotit msgotit is offline
 
Join Date: May 2005
Location: Idaho, US
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Take the debug="1" out of the navoptions tab. I think that will do it.
Reply With Quote
  #16  
Old 03-29-2006, 06:41 AM
IamLoBAS's Avatar
IamLoBAS IamLoBAS is offline
 
Join Date: Mar 2006
Location: Bangkok, TH
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by msgotit
Take the debug="1" out of the navoptions tab. I think that will do it.
Thanks msgotit. I already saw it. :banana: OK. I could made MD5 then How do I compare it?
Reply With Quote
  #17  
Old 03-29-2006, 12:59 PM
msgotit msgotit is offline
 
Join Date: May 2005
Location: Idaho, US
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When you click on the diagnostic tool and suspect version, the files that you have done this too should no longer show up as suspect. If it isn't doing what it is supposed to it will say that they don't contain the expected contents.
Reply With Quote
  #18  
Old 03-30-2006, 06:29 AM
IamLoBAS's Avatar
IamLoBAS IamLoBAS is offline
 
Join Date: Mar 2006
Location: Bangkok, TH
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by msgotit
When you click on the diagnostic tool and suspect version, the files that you have done this too should no longer show up as suspect. If it isn't doing what it is supposed to it will say that they don't contain the expected contents.
Thanks very much for your ans. msgotit
Reply With Quote
  #19  
Old 04-02-2006, 06:20 AM
IamLoBAS's Avatar
IamLoBAS IamLoBAS is offline
 
Join Date: Mar 2006
Location: Bangkok, TH
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by msgotit
Probably a user error, but it wasn't working so I replace this line:

PHP Code:
$filehash = @md5_file(DIR $productfile['filename']); 
With this:

PHP Code:
$filehash = @md5(str_replace("\r\n""\n"file_get_contents(DIR $productfile['filename']))); 
That seemed to solve my problem... Is there a reason? Or just user error.
Thanks very much for your mod. :banana:
Reply With Quote
  #20  
Old 05-12-2006, 01:58 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by msgotit
Probably a user error, but it wasn't working so I replace this line:

PHP Code:
$filehash = @md5_file(DIR $productfile['filename']); 
With this:

PHP Code:
$filehash = @md5(str_replace("\r\n""\n"file_get_contents(DIR $productfile['filename']))); 
That seemed to solve my problem... Is there a reason? Or just user error.
And that still gives you a valid MD5?

If you don't tell what was not working, i can't fix it.
Reply With Quote
  #21  
Old 05-25-2006, 04:20 PM
msgotit msgotit is offline
 
Join Date: May 2005
Location: Idaho, US
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm an idiot. Sorry about that and sorry that I didn't respond sooner, when I would run the md5 generator on the files, then go back to the diagnostic tools it would say that the file did not contain the expected content. So what I did was go into the code in vbulletin and grab the function that they were using and it seemed to work, like I said it very likely could be user error but it didn't seem to create an md5 hash that matched what vbulletin would get. Sorry about the lack of explanation, I hate it when people do that

Mark
Reply With Quote
Reply


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 02:26 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07542 seconds
  • Memory Usage 2,328KB
  • Queries Executed 27 (?)
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
  • (7)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_postinfo_query
  • fetch_postinfo
  • 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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete