All pastes #536289 Raw Edit

Gnopeg

public text v1 · immutable
·published 2007-06-04 10:23 UTC
rendered paste body
function GetAuthBuf(InBuf: Pointer; InBufLength: integer; var OutBuf: Pointer; var OutBufLength: integer): boolean; stdcall;

public unsafe class NTLM
{
	[DllImport("NTLM.dll")]
	public static extern bool GetAuthBuf(byte[] InBuf, int InBufLength, out byte[] OutBuf, out int OutBufLength);

	NTLM()
	{
	}
}

byte[] chlbuf = new byte[] {
			0x4e, .... 0x00};

byte[] OutBuf;
int OutBufLength;
if (!NTLM.GetAuthBuf(chlbuf, chlbuf.Length, out OutBuf, out OutBufLength)) return;