10-13-2012, 17:55
it works, great, thx sooooooo much!
|
Release NoKnife Plugin
|
|
10-13-2012, 17:55
it works, great, thx sooooooo much!
11-03-2012, 23:36
(This post was last modified: 11-03-2012, 23:39 by morikami009.)
thank you for this plug in you are amazing
03-17-2013, 07:10
Could you post proper source code? I want to do some editing
05-14-2013, 21:15
zxz0O0, you wrote "This plugin uses signature scans to find the offsets"
But i see there are no code for that scan in the 1-st post. I use the code below for scanning. But it seems the addresses are wrong. Can you help to correct this, please. Code: namespace NoKnife
{
using Addon;
using System;
using System.Runtime.InteropServices;
public class Class1 : CPlugin
{
private int DefaultKnifeAddress;
private int KnifeRange;
private string str_Knife = "enabled";
private bool Working = true;
private int ZeroAddress;
private int FindMem(byte?[] search, int num = 1, int start = 0x1000000, int end = 0x3d00000)
{
int num2 = 0;
try
{
int num3 = 0;
for (int i = start; i < end; i++)
{
num2 = i;
bool flag = false;
for (int j = 0; j < search.Length; j++)
{
if (search[j].HasValue)
{
int num7 = num2[0];
if (num7 != search[j])
{
break;
}
}
if (j == (search.Length - 1))
{
if (num == 1)
{
flag = true;
}
else
{
num3++;
if (num3 == num)
{
flag = true;
}
}
}
else
{
num2++;
}
}
if (flag)
{
return i;
}
}
}
catch (Exception exception)
{
base.ServerPrint(string.Concat(new object[] { "FindMem: ", exception.Message, "\nAddress: ", num2 }));
}
return 0;
}
private void Knife(bool bl)
{
if (!bl)
{
this.KnifeRange(0) = this.ZeroAddress;
this.str_Knife = "disabled";
base.ServerSay("Knifing disabled", false);
}
else
{
this.KnifeRange[0] = this.DefaultKnifeAddress;
this.str_Knife = "enabled";
base.ServerSay("Knifing enabled", false);
}
}
public override ChatType OnSay(string Message, ServerClient Client)
{
if (Message == "!knife")
{
base.TellClient(Client.ClientNum, "PM: Knifing " + this.str_Knife, true);
return ChatType.ChatNone;
}
if (!Message.StartsWith("!knife "))
{
return ChatType.ChatContinue;
}
if (!this.Working)
{
base.TellClient(Client.ClientNum, "NoKnife Plugin is not working. Addresses are wrong", true);
}
else if (Message == "!knife 0")
{
this.Knife(false);
}
else if (Message == "!knife 1")
{
this.Knife(true);
}
return ChatType.ChatNone;
}
public override void OnServerLoad()
{
try
{
base.ServerPrint("\n NoKnife Plugin loaded \n Author: zxz0O0 \n Thanks to Nukem, Jariz, Pozzuh and Makavel\n");
base.ServerPrint(" www.youtube.com/zxz0O0 \n www.itsmods.com\n");
byte?[] search = new byte?[] {
0x8b, null, null, null, 0x83, null, 4, null, 0x83, null, 12, 0xd9, null, null, null, 0x8b,
null, 0xd9, null, null, null, 0xd9, 5
};
this.KnifeRange = this.FindMem(search, 1, 0x400000, 0x500000) + search.Length;
if (this.KnifeRange == search.Length)
{
byte?[] nullableArray2 = new byte?[] {
0x8b, null, null, null, 0x83, null, 0x18, null, 0x83, null, 12, 0xd9, null, null, null, 0x8d,
null, null, null, 0xd9, null, null, null, 0xd9, 5
};
this.KnifeRange = this.FindMem(nullableArray2, 1, 0x400000, 0x500000) + nullableArray2.Length;
if (this.KnifeRange == nullableArray2.Length)
{
this.KnifeRange = 0;
}
}
this.DefaultKnifeAddress = this.KnifeRange[0];
byte?[] nullableArray3 = new byte?[] {
0xd9, 0x5c, null, null, 0xd8, null, null, 0xd8, null, null, 0xd9, 0x5c, null, null, 0x83, null,
1, 15, 0x86, null, 0, 0, 0, 0xd9
};
this.ZeroAddress = (this.FindMem(nullableArray3, 1, 0x400000, 0x500000) + nullableArray3.Length)[2];
if (((this.KnifeRange == 0) || (this.DefaultKnifeAddress == 0)) || (this.ZeroAddress == 0))
{
base.ServerPrint("Error finding address: NoKnife Plugin will not work");
this.Working = false;
}
else
{
uint num;
VirtualProtect((IntPtr)this.KnifeRange, (IntPtr)4, 0x40, out num);
}
if (base.GetServerCFG("Knife", "Enabled", "1") == "0")
{
this.Knife(false);
}
}
catch (Exception exception)
{
base.ServerPrint("Error in NoKnife Plugin. Plugin will not work.");
base.ServerPrint(exception.ToString());
this.Working = false;
}
}
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("kernel32.dll")]
private static extern bool VirtualProtect(IntPtr lpAddress, IntPtr dwSize, uint flNewProtect, out uint lpflOldProtect);
}
}
05-14-2013, 21:31
(05-14-2013, 21:15)Diskretor Wrote: zxz0O0, you wrote "This plugin uses signature scans to find the offsets" The plugin is working AFAIK, the source code on the main post is outdated I think. did you decompile it or what?
This code is outdated and doesn't work for me.
Yes. I trying to see the source of DLL that normally worked. |
| Possibly Related Threads… | |||||
| Thread | Author | Replies | Views | Last Post | |
|
|
Plugin with !ban !kick and !tampban | clemi555 | 3 | 6,492 |
11-09-2013, 09:21 Last Post: clemi555 |
| AntiNoScope Plugin | clemi555 | 5 | 7,592 |
11-08-2013, 19:13 Last Post: clemi555 |
|
| [Release] Bunker Plugin 1.3 | archit | 68 | 55,806 |
10-30-2013, 11:59 Last Post: clacki |
|
| Help Modifying plugin | maverigh | 5 | 7,643 |
10-19-2013, 10:29 Last Post: Nekochan |
|
|
|
[Request] Switch plugin | axel-le-meilleur | 6 | 8,295 |
10-19-2013, 06:59 Last Post: iRoNinja |
| [Release] Yurio Map Plugin | Yurio | 101 | 82,121 |
09-26-2013, 13:38 Last Post: First_Semyon |
|
|
|
[Release] v1.1 ChangeMap/NextMap Plugin without any configuration | milchshake | 23 | 25,160 |
09-23-2013, 13:18 Last Post: SgtLegend |
| Help !say Plugin (like the !say from GodPlugin) | Hallla | 0 | 3,655 |
09-13-2013, 09:31 Last Post: Hallla |
|
|
|
[Release] MW3: Random Weapon Plugin V1 | Nekochan | 50 | 44,653 |
09-11-2013, 15:11 Last Post: EnVi Sweden Rocks |
| Search Plugin Fluid Killcam | N3xT_974 | 1 | 3,975 |
09-10-2013, 20:27 Last Post: Nekochan |
|
| Users browsing this thread: |
| 1 Guest(s) |