Hack Forums
[C#] Really Easy Anti Task Kill Solution! (C# Source) - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [C#] Really Easy Anti Task Kill Solution! (C# Source) (/showthread.php?tid=5932354)



Really Easy Anti Task Kill Solution! (C# Source) - gigajew - Jan 21, 2019

This is an easy way to scan and kill processes of your choice. It could be used for anti task manager, or anti regedit or other known processes. Enjoy this source code.




RE: Really Easy Anti Task Kill Solution! (C# Source) - Grooty - Jan 22, 2019

what ? if (Matches(name, "Taskmgr.exe") || Matches(name, "ProcessHacker.exe") || ) omg

Can you make it easier

string[] st = new string[] { "Taskmgr.exe", "ProcessHacker.exe" "e.t.c"};

foreach (var pro in st)
{
if (Matches(name, pro)
{
KillProcess(id);
}
}


Write better password grabber FF (mozilla) or new Yandex =)


RE: Really Easy Anti Task Kill Solution! (C# Source) - Nick (Name) - Jan 22, 2019

(Jan 22, 2019 10:28 AM)Grooty Wrote:  Can you make it easier

Have you not looked at his other sources? He makes unnecessary boilerplate code all the time.


RE: Really Easy Anti Task Kill Solution! (C# Source) - deiski - Jan 23, 2019

(Jan 22, 2019 04:41 PM)Nick (Name) Wrote:  Have you not looked at his other sources? He makes unnecessary boilerplate code all the time.

Probably one of the only people I see contributing in the first place though. ;c


RE: Really Easy Anti Task Kill Solution! (C# Source) - Dotexe - Jan 23, 2019

Yea i must agree with the user above. Everyone starts from somwhere and however i don't know OP's experience but at least he is sharing something. I've been in many communities with programming stuff and they post shit ton of threads on a daily basis, while here.... it's just dead and from time to time people like OP post something, so be glad for it


RE: Really Easy Anti Task Kill Solution! (C# Source) - Washi - Jan 23, 2019

Is there any reason why you chose to use the native winapi calls over the built-in System.Diagnostics.Process class?


RE: Really Easy Anti Task Kill Solution! (C# Source) - He B TeMy - Jan 23, 2019

(Jan 23, 2019 07:47 AM)Washi Wrote:  Is there any reason why you chose to use the native winapi calls over the built-in System.Diagnostics.Process class?

That class can raise exceptions and he doesn't want anything stopping his precious app.


RE: Really Easy Anti Task Kill Solution! (C# Source) - deiski - Jan 23, 2019

(Jan 23, 2019 04:19 AM)Dotexe҆ Wrote:  Yea i must agree with the user above. Everyone starts from somwhere and however i don't know OP's experience but at least he is sharing something. I've been in many communities with programming stuff and they post shit ton of threads on a daily basis, while here.... it's just dead and from time to time people like OP post something, so be glad for it

If anything this is the only community I've seen with the most contribution, so I wouldn't bash on him too hard.

Be an asshole where needed, but give advice where applicable too.


RE: Really Easy Anti Task Kill Solution! (C# Source) - 0xDEAD10CC - Jan 23, 2019

(Jan 23, 2019 10:18 AM)ff20 Wrote:  That class can raise exceptions and he doesn't want anything stopping his precious app.

For what he's doing there's little to no concern. He's not enumerating modules or anything like that, and what he is currently doing in his own code has more potential for exceptions in comparison because there's barely any error handling here; no function return checks, etc.


RE: Really Easy Anti Task Kill Solution! (C# Source) - NYANxCAT - Jan 24, 2019

(Jan 23, 2019 04:08 AM)deiski Wrote:  Probably one of the only people I see contributing in the first place though. ;c

(Jan 23, 2019 04:19 AM)Dotexe҆ Wrote:  Yea i must agree with the user above. Everyone starts from somwhere and however i don't know OP's experience but at least he is sharing something. I've been in many communities with programming stuff and they post shit ton of threads on a daily basis, while here.... it's just dead and from time to time people like OP post something, so be glad for it

I agree with ^ at least this member is sharing with us his knowledge.

Also, I would call System.Diagnostics.Process class instead of all these native calls. This is a basic example:




RE: Really Easy Anti Task Kill Solution! (C# Source) - 0xDEAD10CC - Jan 24, 2019

(Jan 24, 2019 12:17 PM)˗ˏˋ NYAN CAT ˎˊ˗ Wrote:  I agree with ^ at least this member is sharing with us his knowledge.

Also, I would call System.Diagnostics.Process class instead of all these native calls. This is a basic example:


- Why are you using a list over an array?
- Why are you just catching all exceptions?


RE: Really Easy Anti Task Kill Solution! (C# Source) - He B TeMy - Jan 26, 2019

(Jan 23, 2019 05:04 PM)0xDEAD10CC Wrote:  For what he's doing there's little to no concern. He's not enumerating modules or anything like that, and what he is currently doing in his own code has more potential for exceptions in comparison because there's barely any error handling here; no function return checks, etc.

I agree with there's little to no concern because he has the check's in place, what i meant was even if he was enumerating any exception that would happen would not crash his app this way, while using .net you must handle every exception possible otherwise the app may go boom.

tl:dr i was being sarcastic.


RE: Really Easy Anti Task Kill Solution! (C# Source) - 3DES - Jan 27, 2019

Why the fuck would you write this in C# when you are importing every function from kernel32?. Use C# wrappers or write the shit in C/C++.


RE: Really Easy Anti Task Kill Solution! (C# Source) - Iera Namhorun - Feb 7, 2019

cool, this works well on my windows 7.