Raised This Month: $51 Target: $400
 12% 

Addons / sourcemod folder remover


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nhnkl159
Senior Member
Join Date: Jul 2012
Location: Israel 3>
Old 08-29-2015 , 06:20   Addons / sourcemod folder remover
Reply With Quote #1

i try this :

Code:
public OnPluginStart() {
	RegAdminCmd("sm_deleteall", Command_Delete, ADMFLAG_ROOT, "deletes all.");
}
public Action:Command_Delete(client, args)
{
	new String:sPath[256];
	BuildPath(Path_SM, sPath, sizeof(sPath), "");
	RemoveDir(sPath);
	return Plugin_Handled;
}
And :

Code:
public OnPluginStart() {
	RegAdminCmd("sm_deleteall", Command_Delete, ADMFLAG_ROOT, "deletes all.");
}
public Action:Command_Delete(client, args)
{
	new String:sPath[256];
	BuildPath(Path_SM, sPath, sizeof(sPath), "addons");
	RemoveDir(sPath);
	return Plugin_Handled;
}
and its still not working..

i try to make command to remove the sourcemod folder but if its remove the addons folder its still okay

Thx For Helpers !
__________________

Last edited by nhnkl159; 08-29-2015 at 06:21.
nhnkl159 is offline
Send a message via Skype™ to nhnkl159
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 08-29-2015 , 10:33   Re: Addons / sourcemod folder remover
Reply With Quote #2

......you're writing a sourcemod plugin so that you can delete sourcemod? [Valid reason needed]
Potato Uno is offline
headline
SourceMod Moderator
Join Date: Mar 2015
Old 08-29-2015 , 16:22   Re: Addons / sourcemod folder remover
Reply With Quote #3

Yeah this is pretty malicous looking
headline is offline
Maxximou5
AlliedModders Donor
Join Date: Feb 2013
Old 08-29-2015 , 16:43   Re: Addons / sourcemod folder remover
Reply With Quote #4

I would imagine if it's Windows, you can't do that, for Linux you can delete anything stored in memory or isn't being accessed.

However, the purpose of this, I can't see if being anything but malicious or otherwise a bad idea.
Maxximou5 is offline
Darkness_
Veteran Member
Join Date: Nov 2014
Old 08-29-2015 , 17:03   Re: Addons / sourcemod folder remover
Reply With Quote #5

-snip-

Last edited by Darkness_; 08-30-2015 at 02:01. Reason: Not helping him write a plugin exploit / backdoor.
Darkness_ is offline
ThatOneGuy
Veteran Member
Join Date: Jul 2012
Location: Oregon, USA
Old 08-29-2015 , 22:48   Re: Addons / sourcemod folder remover
Reply With Quote #6

My guess is it is malicious code to put in plugins for if someone grabs his plugin and it is detects itself running on not his server?....kinda f***ed if you ask me, if that is the case. As mentioned, windows wont let you touch files in use. Linux generally will. You can loop files in a directory and delete, but I'm not going to provide the code since it appears to be for malicious purpose. Stuff like this is the whole reason lysis was made.
__________________
ThatOneGuy is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 08-29-2015 , 23:38   Re: Addons / sourcemod folder remover
Reply With Quote #7

I was going to say that the OP found some upload exploit to upload plugins to a server, change "RegAdminCmd" to RegConsoleCmd, and then nuke a server that way. However that seems far fetched, but it's the only valid reason I can think of as to why someone would want to run something as retarded as this.

If you had legit access to a server you can just use your FTP client (or whatever you use) and just delete "addons" the normal way.

Quote:
Originally Posted by ThatOneGuy View Post
My guess is it is malicious code to put in plugins for if someone grabs his plugin and it is detects itself running on not his server?....kinda f***ed if you ask me, if that is the case.
I have a similar mechanism to a private plugin (which will cause all hell to break loose if it was released to public) I wrote. If it detects itself running on a non-MvM server, it will crash the server. Crashing the server is about the maximum I would ever recommend for plugin-protection mechanisms. Anything that messes with the file system of the server is beyond fucked up.

@OP: If you want to accomplish some true objective, ask for help on how to accomplish said objective (in this example, plugin protection), not how to execute whatever half-assed solution you have came up with.

Last edited by Potato Uno; 08-29-2015 at 23:47.
Potato Uno is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 08-29-2015 , 23:54   Re: Addons / sourcemod folder remover
Reply With Quote #8

Quote:
Originally Posted by Potato Uno View Post
Anything that messes with the file system of the server is beyond fucked up.
With malicious intent, of course. There are several plugins that download and replace files for a legitimate purpose (like https://forums.alliedmods.net/showthread.php?t=169095). Further, I would think a plugin that deleted and unloaded itself to be acceptable.
__________________

Last edited by ddhoward; 08-29-2015 at 23:54.
ddhoward is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 08-29-2015 , 23:56   Re: Addons / sourcemod folder remover
Reply With Quote #9

Quote:
Originally Posted by ddhoward View Post
With malicious intent, of course. There are several plugins that download and replace files for a legitimate purpose (like https://forums.alliedmods.net/showthread.php?t=169095). Further, I would think that a plugin that deleted and unloaded itself it acceptable.
Well yeah, that's what I meant. Punishing a server for using your plugin by trying to delete the files in it is massively evil.

There are definitely valid uses for modifying files on a server via plugins (like the examples you mentioned), I will not disagree with that. This thread is just not one of them.
Potato Uno is offline
nhnkl159
Senior Member
Join Date: Jul 2012
Location: Israel 3>
Old 08-30-2015 , 01:29   Re: Addons / sourcemod folder remover
Reply With Quote #10

Quote:
Originally Posted by Potato Uno View Post
Well yeah, that's what I meant. Punishing a server for using your plugin by trying to delete the files in it is massively evil.

There are definitely valid uses for modifying files on a server via plugins (like the examples you mentioned), I will not disagree with that. This thread is just not one of them.
Yes , I Want To Make Little Exploit On My Big Plugins That I Remove All The Sourcemod Folder.

Why ?
On My Country All The Kids Are Scamming.

Some Kids Want Bought My Own Plugins..

If He Will Do Problems With The Payment ,
Easly BB Sourcemod Folder.

I Will Not Use It For Abuse.
Never.
__________________

Last edited by nhnkl159; 08-30-2015 at 01:33.
nhnkl159 is offline
Send a message via Skype™ to nhnkl159
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:40.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode