PDA

View Full Version : Hacking adminfunctions.php


Jawelin
01-07-2002, 03:04 PM
Hi.
I was trying to modify the above file to make a simple hack:
I would use my left-side menu in AdminCP to link some external link, like phpMyAdmin and so on, like a bookmark keeper.

Well, as the standard makenavoption appends a '&s=session' to the link, // NOTE: '&s=$session[sessionhash]' will be AUTOMATICALLY added to the URL - do not add to your link!
I would modify slightely the above file.

Well, I got an error because the adminfunctions.php file is somehow linked to functions.php one and to some other.

What's the solution to modify that (or similar) files ?

Thanks

dito
01-07-2002, 06:19 PM
well if i get u right then ur in the wrong file.....

go to admin/index.php,

find;
<tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="2" id="navtable">
<?php maketableheader("Options"); ?>
</table>
<a href="options.php?s=<?php echo $session[sessionhash]; ?>&action=options"> Change options </a>
</td></tr>

now above that u can add ur own link like this:
<tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="2" id="navtable">
<?php maketableheader("phpmyadmin"); ?>
</table>
<a href="www.urdomain.com/phpmyadmin">use phpmyadmin </a>
</td></tr>


now if u want to make more links do it like this again and if u want to add more options within a certain group then just add this line and change it to ur needs:<a href="www.urdomain.com/phpmyadmin">use phpmyadmin </a>
but remember to add this "|"after each line so it looks like this;
<tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="2" id="navtable">
<?php maketableheader("phpmyadmin"); ?>
</table>
<a href="www.urdomain.com/phpmyadmin">usephpmyadmin</a> |
<a href="www.urdomain.com/phpmyadmin/tutorials">phpmyadmin tutorials</a>
</td></tr>

Jawelin
01-07-2002, 07:27 PM
Wrong YOUR version, I think... :D
Thanks the same

I'm talking about v2.2.1 .... All the menu options are done by
makenavoption called in adminfunctions.php ...

What's yours ?
:stupid:

dito
01-07-2002, 08:34 PM
ooh hehe:) well im using v2.1.0
so im not sure if that changed in v2.2.0
just check it to be sure....

dito
01-07-2002, 08:38 PM
well anyway i think if u remove the sesion hash it will work fine look at the code that i showed
compare the one that i asked u to search for and the custom one i made under it ...on the top one u see sesion session hash and in the custom i replaced it cuz it only works if u make that page within the vb so then u would have to include it in misc.php if im not mistaken...

Psychdrone
01-07-2002, 08:38 PM
version 2.1.0 eh??

dito
01-07-2002, 09:12 PM
yes im using v2.1.0 but the guy in question uses 2.2.0
so i dont know that evrsion

Jawelin
01-08-2002, 06:27 AM
2.2.1 ... ;)

Hwr, I didn't thought ver 2.1.0 would exist ... :)

Any way, my problem is in index.php reflecting functions defined in adminfunctions.php, AS REQUESTED in my first post in topic.

Nothing else... !

Thanks. Bye

Jawelin
01-11-2002, 08:56 AM
Uhh? Nobody can help ?

Where in code that file is locked ?

Thanx