PDA

View Full Version : filename of plugin himself-check


ghzero
10-19-2007, 08:20 AM
hello,

-how can I (my plugin) know the filename of it self?!
(reason is that I want to check the length of plugin-file to detect outdate of plugin version or modifications to plugin.)

-can I do an crc on an file?!

Wilson [29th ID]
10-20-2007, 05:57 PM
Why don't you just check the version constant?

ghzero
10-20-2007, 07:39 PM
;7938']Why don't you just check the version constant?

that is too simple. what I want is to detect if the plugin was modificated and the versionstring is not safe enough.

for that now I have an md5-checksum on the file but the leak is, the admin can use another filename to load from plugin.ini and leave the originalfilename and file as original and I cant detect changes.

Wilson [29th ID]
10-21-2007, 12:24 AM
I can't think of a way to check the file name as I've never had to.

Why not just not release the source and only release the .amxx compiled version? Then no one can alter it..

ghzero
10-23-2007, 08:51 AM
;7942']I can't think of a way to check the file name as I've never had to.

Why not just not release the source and only release the .amxx compiled version? Then no one can alter it..

yes , but that offers the leak to decompile, modificate and recompile again.

diamond-optic
10-25-2007, 07:06 AM
well maybe im reading this wrong..

but you want to prevent ppl from modifying the plugin code? and you want to put a check in the plugin..

couldnt anyone just remove the check while they're changing the plugin code

ghzero
10-26-2007, 06:36 AM
well maybe im reading this wrong..

but you want to prevent ppl from modifying the plugin code? and you want to put a check in the plugin..

couldnt anyone just remove the check while they're changing the plugin code


yes of course, but any protection is a question how hard/good a hacker will(must) work on it !! so for most hacking a mid range/level of protection will help for(against) 95% of hacking.

Wilson [29th ID]
10-26-2007, 07:09 AM
I don't mean to beat a dead horse, but decompiling code isn't that easy. If they know how to do that...they definitely know how to read it.

If you read the tutorial on decompiling the code...you have to know pawn to do it.

Anyway...I guess you could open configs/plugins.ini and search for the name of your plugin. If you don't find it, or there is a semicolon in front of it, activate self-detonation.