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)
-   -   Miscellaneous Hacks - MD5 Version File Generator (https://vborg.vbsupport.ru/showthread.php?t=155935)

PitchouneN64ngc 08-21-2007 10:00 PM

MD5 Version File Generator
 
This mod is an adaptation of the Marco's mod ( https://vborg.vbsupport.ru/showthread.php?t=108567 ) because there is some little things changed and added some new things too. Thank you for allow me to re-release it , Marco ;)

MD5 Version File Generator - Version 2.0.1

Hack: MD5 Version File generator
Version: v2.0.1
Author: MarcoH64
Adapted for vB 3.6.8+ by Pitchoune (PitchouneN64ngc)
vB Version: 3.6.8 - 3.8.x (can work but will be more useful since vB 3.6.8 due to the added things).

For lower versions of vBulletin, you can see the original 1.0.0 mod here.

You can see this function in the vB3.5.4 release announce thread: 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.

Since vB 3.6.8, there is a new add in the md5 files, you can look to it at the end of the official addons md5 files like this:

$md5_sum_softwareid = 'vbprojecttools';
$md5_sum_versions['vbprojecttools'] = '1.0.1';

This new version adds these 2 lines for you.

An other new thing is to adapt this modification to your configuration. If your admincp and/or modcp directories didn't have the default values (admincp or modcp), when you're saving files, it will be checked correctly, and the default values will be registered.

And it's the same thing when you generate the md5 file (it will create the md5 value from your configuration, and it will write in the file
the default values with the correct md5 of your configuration).

How to use:
  • AdminCP->Plugin & Products->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: 2.0.1
// File generated by: $RCSfile: mh_md5gen.php,v $ - $Revision: 2.0.1 $
// Generator: MD5 Version File generator by MarcoH64 and PitchouneN64ngc (c)

$md5_sums = array(
    
'/admincp' => array(
        
'mh_md5gen.php' => '307d51647c2197abbfc458b9832876cf',
    ),
    
'/includes/xml' => array(
        
'cpnav_mh_md5gen.xml' => 'c4f6879267d161e7bd87a19302446fd2',
    ),
);
$md5_sum_softwareid 'mh_md5gen';
$md5_sum_versions['mh_md5gen'] = '2.0.1';
?>

Copyright etc.
# Copyright ?2006-2010 MarcoH64 and PitchouneN64ngc
# 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 original author, donations are always welcome at Paypal: marcoh64@gmail.com

Downloads of 2.0.0 before update: 70

Hornstar 08-22-2007 12:28 PM

I was wondering, is it possible to create the MD5 for uploaded files to my forums, then if that file gets posted else where, ill know if it has been leaked.

yahoooh 08-22-2007 12:46 PM

thank u

Barakat 08-22-2007 12:53 PM

1000 thanks

Wayne Luke 08-22-2007 03:21 PM

Quote:

Originally Posted by hornstar1337 (Post 1323101)
I was wondering, is it possible to create the MD5 for uploaded files to my forums, then if that file gets posted else where, ill know if it has been leaked.

That would be a completely different type of addon.

Hornstar 08-23-2007 07:14 AM

Quote:

Originally Posted by Wayne Luke (Post 1323226)
That would be a completely different type of addon.

Is there such an addon on vb.org? I tried looking but not sure if im searching for the right thing.

Wayne Luke 08-23-2007 05:31 PM

Quote:

Originally Posted by hornstar1337 (Post 1323762)
Is there such an addon on vb.org? I tried looking but not sure if im searching for the right thing.

I haven't seen one. This is for people creating their own addons.

Whissi 09-05-2007 01:52 PM

There is a little bug:
Your addon will calculate the md5 checksum from the binary stream (the whole file).
VBulletin will calculate the md5 checksum from the content itself.

And here is the problem:
When your files are in Windows format, your calculated md5sum wouldn't match the vBulletin one. Your files need to be in UNIX format.

PitchouneN64ngc 09-05-2007 10:28 PM

I'll see that, I don't have changed the way to generate MD5 sum from the original version :)

PitchouneN64ngc 10-09-2009 01:09 PM

Changelog for 2.0.1 release:
  • vBulletin changes the way to create MD5 values of files in vB 3.6 (old: md5_file. new: md5(str_replace("\r\n", "\n", file_get_contents(DIR . $directory . '/' . $file))). I didn't notice that. Now the system checks correctly all files.
  • Added 2 errors messages:
    • When you try to create a MD5 file without any files in the product informations,
    • When the system can't create the file (permissions not enough to create the file).
A mod could move it in 3.8 if possible? This is entirely compatible 3.6-3.8.


All times are GMT. The time now is 11:30 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.01197 seconds
  • Memory Usage 1,754KB
  • 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_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete