vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin Pre-Sales Questions (https://vborg.vbsupport.ru/forumdisplay.php?f=26)
-   -   Help! Bank Hack Overflow Hack (https://vborg.vbsupport.ru/showthread.php?t=43903)

DalaiLamaBob 09-25-2002 03:25 AM

Help! Bank Hack Overflow Hack
 
I am trying to help create a hack for www.aForums.com

I don't own the site so I can't post to the other forums here. I am just trying to help with the coding.

The point of the hack of the hack is to make it so people don't horde money in the bank. So my idea was to make it so that anything over 5000 is put back into their pocket. After looking at the code I figured the best place to add the change was after the interest was calculated so any interest would be overflowed too.

The problem is my changes don't seem to do anything. Nothing good or bad. At least nothing I have been able to see.

Original Code
Quote:

//########################## functions ##################

function showbankmoney() {
global $DB_site,$bbuserinfo;

$savemoneytime= $DB_site->query_first("
SELECT savemt FROM user WHERE userid='$bbuserinfo[userid]'");
$banktime = $savemoneytime[savemt];
if ($banktime != 0){
$presenttime=(time()-$banktime)/86400;

if ($presenttime>1)
{
$presenttime=floor($presenttime);
$userbank = $DB_site->query_first("
SELECT bank FROM user WHERE userid='$bbuserinfo[userid]'");
$userbankmoney= $userbank[bank];
$userbankmoney=floor($userbankmoney*(pow(1.1,$pres enttime)));
$DB_site->query("UPDATE user SET
bank=$userbankmoney,savemt='".time()."' WHERE userid='$bbuserinfo[userid]'");
}

}
}
Modified Code
Quote:

//########################## functions ##################

function showbankmoney() {
global $DB_site,$bbuserinfo;

$savemoneytime= $DB_site->query_first("
SELECT savemt FROM user WHERE userid='$bbuserinfo[userid]'");
$banktime = $savemoneytime[savemt];
if ($banktime != 0){
$presenttime=(time()-$banktime)/86400;

if ($presenttime>1)
{
$presenttime=floor($presenttime);
$userbank = $DB_site->query_first("
SELECT bank,storep FROM user WHERE userid='$bbuserinfo[userid]'");
$userbankmoney= $userbank[bank];
$usermoney= $userbank[storep];
$userbankmoney=floor($userbankmoney*(pow(1.1,$pres enttime)));
if ($userbankmoney>5000)
{
$usermoney= $usermoney+$userbankmoney-5000;
$userbankmoney= 5000;
}
$DB_site->query("UPDATE user SET
storep=$usermoney,bank=$userbankmoney,savemt='".ti me()."' WHERE userid='$bbuserinfo[userid]'");
}

}
}

Steve Machol 09-25-2002 04:41 AM

DalaiLamaBob, please have the licensed owner of that forum go to this page and enter your username, to show you are working on a licensed forum. Thank you.

Cold Steel 09-25-2002 09:07 AM

Quote:

Originally posted by Steve Machol
DalaiLamaBob, please have the licensed owner of that forum go to this page and enter your username, to show you are working on a licensed forum. Thank you.
Done.

Steve Machol 09-25-2002 08:45 PM

Thanks! :)

DalaiLamaBob 09-26-2002 05:42 AM

I guess it just took a couple days to kick in. It works....


All times are GMT. The time now is 10:39 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.00995 seconds
  • Memory Usage 1,724KB
  • 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
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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