[Release] Prevent not allowed GMs from hacking you.
I don't know if this works I just made it because I was bored.. If your not a idiot you could fix it yourself. (bluepiexd)
Make sure you change the table name in the function and SQL to prevent other people from knowing which table to hack.
Execute this in MySQL:
PHP Code:
--
-- Definition of table `allowedgms`
-- MAKE SURE YOU CHANGE THE TABLE NAME IN THE SQL AND THE FUNCTION TO PREVENT PEOPLE FROM KNOWING ABOUT THE TABLE
--
DROP TABLE IF EXISTS `allowedgms`;
CREATE TABLE `allowedgms` (
`gmid` int(10) unsigned NOT NULL auto_increment,
`gm` varchar(40) NOT NULL default '',
PRIMARY KEY (`gmid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `allowedgms`
--
/*!40000 ALTER TABLE `allowedgms` DISABLE KEYS */;
/*!40000 ALTER TABLE `allowedgms` ENABLE KEYS */;
Put this in MapleCharacter.java:
PHP Code:
public boolean hasAllowedGM() { // Made by WlZET to prevent all GM exploits :D
boolean ret = false;
try {
Connection con = DatabaseConnection.getConnection();
PreparedStatement ps = con.prepareStatement("SELECT COUNT(*) FROM allowedgms WHERE ? LIKE CONCAT(gm, '%')");
ps.setString(1, this.getName());
ResultSet rs = ps.executeQuery();
rs.next();
if (rs.getInt(1) > 0) {
ret = true;
}
rs.close();
ps.close();
} catch (SQLException ex) {
log.error("Error checking for allowed GM", ex);
}
return ret;
}
Add this in GM, Admins, and etc.java before this:
PHP Code:
splitted[0] = splitted[0].toLowerCase();
Add this:
PHP Code:
MapleCharacter player = c.getPlayer();
if (player.hasAllowedGM()) {
Before this:
PHP Code:
@Override
public CommandDefinition[] getDefinition() {
Add this:
Re: [Release] Prevent not allowed GMs from hacking you.
Re: [Release] Prevent not allowed GMs from hacking you.
Re: [Release] Prevent not allowed GMs from hacking you.
lol buhh mistuh i lub my exploits =[
Re: [Release] Prevent not allowed GMs from hacking you.
Why, just why? Delete this pl0x
Re: [Release] Prevent not allowed GMs from hacking you.
Quote:
Originally Posted by
watzmename
Why, just why? Delete this pl0x
dont worry i dont even think this works
Re: [Release] Prevent not allowed GMs from hacking you.
Quote:
Originally Posted by
WlZET
dont worry i dont even think this works
Then delete it. Your not suppose to release untested shit.
Re: [Release] Prevent not allowed GMs from hacking you.
Quote:
Originally Posted by
watzmename
Then delete it. Your not suppose to release untested shit.
i dont care.. if you deleted all untested releases we'd only have 2 pages in the release section
Re: [Release] Prevent not allowed GMs from hacking you.
This won't do anything to the exploits. Don't worry everyone.
Re: [Release] Prevent not allowed GMs from hacking you.
Quote:
Originally Posted by
FloppyDisk
This won't do anything to the exploits. Don't worry everyone.
ill fix it then...
Edit: It does work wtf are you talking about.
but you should change which table it checks
Re: [Release] Prevent not allowed GMs from hacking you.
Wizet you are funny..
delete from allowedgms;
insert into allowedgms(gm) values('jvlaple');
seriously, this is a waste of space and memory
Re: [Release] Prevent not allowed GMs from hacking you.
Quote:
Originally Posted by
xJvlaplex
Wizet you are funny..
delete from allowedgms;
insert into allowedgms(gm) values('jvlaple');
seriously, this is a waste of space and memory
!sql won't work since you wouldn't be an allowed GM and wouldn't be a GM due to the check
Re: [Release] Prevent not allowed GMs from hacking you.
Quote:
Originally Posted by
xJvlaplex
Wizet you are funny..
delete from allowedgms;
insert into allowedgms(gm) values('jvlaple');
seriously, this is a waste of space and memory
what if you didn't know it was allowedgms?
What if it was 950259dy?
also you couldn't use !sql..
it's only for GM exploits not cype injecting or w/e you guys call it
Re: [Release] Prevent not allowed GMs from hacking you.
Quote:
Originally Posted by
mcskills
!sql won't work since you wouldn't be an allowed GM and wouldn't be a GM due to the check
You don't use !sql, Mateo.
Re: [Release] Prevent not allowed GMs from hacking you.
Quote:
Originally Posted by
FloppyDisk
You don't use !sql, Mateo.
read... "GM EXPLOITS"
i'm not talking about your cype shit
i already knew i was going to get a lot of flame, i'm quitting mapledev for basketball / friends / more time