Page 1 of 1

Source Code Mod

Posted: Sat Jul 15, 2006 1:25 am
by frcorey
I just thought of a security mod for Worldgroup.
In worldgroup or majorbbs, I think, when you are at a menu, if you type a selection that is not in your access level, you get a message, then the system will show you all the valid choices. bad security these days. I modded my wg 3.2 not to do this anymore. it's just 2 lines commented out in the server source code, in the modual menuing.c. I would post it here but only if Rick says it's alright to post code clips on here.

Posted: Sat Jul 15, 2006 3:06 am
by Questman
Code clips are OK. Use instructions to get people to the right place, and show about 5-10 lines of the original, and then those same 5-10 lines including the changed/added code.

Posted: Sat Jul 15, 2006 3:48 am
by frcorey
ok, in your wg 3.2 server.exe source code, in menuing.c,
in routine static VOID ansdsp(lngmnu), which is display ANSI version of auto-menu display long or short menu,
comment out the line with the // in front of them.

prfmsg(lngmnu ? DFLHDR : DFSBGN2);
prf(mmuatr);
for (i=0 ; i < MAXSEL ; i++) {
if (mnuusr->selchrs != '\0') {
if (mnuusr->keyreq == -1 || haskno(mnuusr->keyreq) ||
mnuusr->optdsp > 1) {
if (lngmnu) {
prf(dfllin,
mnuusr->selchrs,menupg->page.shortd);
}
else

if (mnuusr->selchrs != 'X') {
HERE -------> // prf("%c,",mnuusr->selchrs);
}
}
else if (mnuusr->optdsp == 1) {
prf(ansdim);
if (lngmnu) {
strcpy(vdatmp,dfllin);
stpans(vdatmp);
prf(ansdim);
prf(vdatmp,
mnuusr->selchrs,menupg->page[i].shortd);
}
else {
prf(ansdim);
AND HERE -------> // prf("%c,",mnuusr->selchrs[i]);
}
prf(mmuatr);
}
}
}
if (lngmnu) {
ansdsp(0);
}
else {
prfmsg(DFSEND);
}
}

this will prevent the hidden menu command choices displaying
when someone picks a key they don't have access to.