vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   MD5 Version File Generator (https://vborg.vbsupport.ru/showthread.php?t=108567)

Marco van Herwaarden 02-20-2006 10:00 PM

MD5 Version File Generator
 
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

Marco van Herwaarden 02-21-2006 07:49 PM

Product file uploaded

/me proud to be the first to release a (real!) vB 3.5.4 modification

Revan 02-21-2006 07:57 PM

/me clix install.
Cheers =D

Brad 02-21-2006 07:57 PM

[high]* Brad installs :)[/high]

Smiry Kin's 02-21-2006 08:01 PM

3.5.4 out whats new? lol

Marco van Herwaarden 02-21-2006 08:07 PM

Quote:

Originally Posted by Smiry Kin's
3.5.4 out whats new? lol

This new function was "announced" in the vB3.5.4 discussion thread at vb.com: http://www.vbulletin.com/forum/showp...9&postcount=16

For other changes, see the official announcements at vb.com

Reeve of shinra 02-21-2006 08:26 PM

Nice work Marco!!

Marco van Herwaarden 02-21-2006 08:34 PM

HEhe just a quick job that i started when i saw that post at vb.com.

Couldn't imagine that anybody wanted to create these files manual. :)

Marco van Herwaarden 02-22-2006 09:33 AM

Could anyone provide feedback if all work correct on a Mac/Linux client?

Floris 02-22-2006 10:14 AM

Nice stuff Marco :D banana-thumbsup

Marco van Herwaarden 02-22-2006 10:17 AM

Thx Floris

msgotit 03-24-2006 04:25 PM

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.

IamLoBAS 03-28-2006 01:15 PM

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

Pls., Help me.

msgotit 03-29-2006 12:57 AM

Take the debug="1" out of the navoptions tab. I think that will do it.

IamLoBAS 03-29-2006 06:41 AM

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?

msgotit 03-29-2006 12:59 PM

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.

IamLoBAS 03-30-2006 06:29 AM

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 :)

IamLoBAS 04-02-2006 06:20 AM

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:

Marco van Herwaarden 05-12-2006 01:58 PM

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.

msgotit 05-25-2006 04:20 PM

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


All times are GMT. The time now is 05:49 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.01684 seconds
  • Memory Usage 1,774KB
  • 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
  • (7)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (20)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