<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>Aimbots.net - Tutorials</title>
		<link>http://aimbots.net/</link>
		<description />
		<language>en</language>
		<lastBuildDate>Wed, 08 Sep 2010 23:18:20 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://aimbots.net/images/warrior/misc/rss.png</url>
			<title>Aimbots.net - Tutorials</title>
			<link>http://aimbots.net/</link>
		</image>
		<item>
			<title>Call of duty world at war zombies chams</title>
			<link>http://aimbots.net/tutorials/21643-call-duty-world-war-zombies-chams.html</link>
			<pubDate>Wed, 08 Sep 2010 15:59:48 GMT</pubDate>
			<description>right, so if your starting d3d for first time and want to do chams. 
here is an example from world at war nazi zombies (SINGLE PLAYER) 
as seen in...</description>
			<content:encoded><![CDATA[<div><!-- google_ad_section_start -->right, so if your starting d3d for first time and want to do chams.<br />
here is an example from world at war nazi zombies (SINGLE PLAYER)<br />
as seen in this video chams arent complete but this is just example.<br />

<object class="restrain" type="application/x-shockwave-flash" width="640" height="385" data="http://www.youtube.com/v/GsWQfzR-drg">
	<param name="movie" value="http://www.youtube.com/v/GsWQfzR-drg" />
	<param name="wmode" value="transparent" />
	<!--[if IE 6]>
	<embed width="640" height="385" type="application/x-shockwave-flash" src="http://www.youtube.com/v/GsWQfzR-drg" />
	<![endif]--></object>
 <br />
<br />
okay so presuming you have the d3d starter kit include in your project and go to d3d9dev.cpp<br />
<br />
First we will have to add colors etc for chams so add these to your project:<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">const BYTE bBlue[60] = <br />
{<br />
&nbsp;  0x42, 0x4D, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,<br />
&nbsp;  0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,<br />
&nbsp;  0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,<br />
&nbsp;  0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,<br />
&nbsp;  0x00, 0x00, 0x12, 0x0B, 0x00, 0x00, 0x12, 0x0B, 0x00,<br />
&nbsp;  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,<br />
&nbsp;  0xFF, 0x00, 0x00, 0x00, 0x00, 0x00<br />
};&nbsp; <br />
<br />
const BYTE bGreen[60] = <br />
{<br />
&nbsp;  0x42, 0x4D, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,<br />
&nbsp;  0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,<br />
&nbsp;  0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,<br />
&nbsp;  0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,<br />
&nbsp;  0x00, 0x00, 0x12, 0x0B, 0x00, 0x00, 0x12, 0x0B, 0x00,<br />
&nbsp;  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,<br />
&nbsp;  0x20, 0xA0, 0x00, 0x00, 0xFF, 0xFF<br />
};&nbsp; <br />
<br />
const BYTE bRed[60] = <br />
{<br />
&nbsp;  0x42, 0x4D, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,<br />
&nbsp;  0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,<br />
&nbsp;  0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,<br />
&nbsp;  0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,<br />
&nbsp;  0x00, 0x00, 0x12, 0x0B, 0x00, 0x00, 0x12, 0x0B, 0x00,<br />
&nbsp;  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,<br />
&nbsp;  0x00, 0x00, 0xFF, 0x00, 0x00, 0x00 <br />
};</code><hr />
</div> Then add:<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">LPDIRECT3DTEXTURE9&nbsp; &nbsp; texRed, texBlue, texGreen;</code><hr />
</div> Okay Now go to initialise and add:<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">D3DXCreateTextureFromFileInMemory(m_pD3Ddev, (LPCVOID)&amp;bRed,&nbsp; 60,&nbsp; &amp;texRed); <br />
D3DXCreateTextureFromFileInMemory(m_pD3Ddev, (LPCVOID)&amp;bBlue,&nbsp; 60,&nbsp; &amp;texBlue); <br />
D3DXCreateTextureFromFileInMemory(m_pD3Ddev, (LPCVOID)&amp;bBlue,&nbsp; 60,&nbsp; &amp;texBlue);</code><hr />
</div> and search for:<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">HRESULT APIENTRY hkIDirect3DDevice9::DrawIndexedPrimitive(D3DPRIMIT&nbsp; IVETYPE Type,INT BaseVertexIndex,UINT MinVertexIndex,UINT NumVertices,UINT startIndex,UINT primCount)</code><hr />
</div> Okay this is where we will do the wallhack. so first we would find the strides, numverts, primcounts, start index if needed.. using a stride logger.<br />
<br />
Then once we have them we would define them as you can see here-&gt;<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">#define Zombies&nbsp; ((NumVertices == 77 &amp;&amp; primCount == 86) || (NumVertices == 79 &amp;&amp; primCount == 86) || (NumVertices == 125 ) || (NumVertices ==&nbsp; 137 &amp;&amp; primCount == 100 ) || (NumVertices ==&nbsp; 224 ) || (NumVertices == 237 ) || (NumVertices ==&nbsp; 228 ) || (NumVertices == 273&nbsp; &amp;&amp; primCount == 264 ) || (NumVertices ==&nbsp; 283 &amp;&amp; primCount == 288&nbsp; ) || (NumVertices == 308 &amp;&amp; primCount == 319 ) || (NumVertices == 374 &amp;&amp; primCount == 548&nbsp; ) || (NumVertices == 438 &amp;&amp; primCount == 568 ) || (NumVertices == 439 &amp;&amp; primCount == 602 ) || (NumVertices == 645 &amp;&amp; primCount == 690 ) || (NumVertices == 1219 &amp;&amp; primCount == 1416 ) || (NumVertices == 1212 &amp;&amp; primCount == 1348 ) || (NumVertices == 1219 &amp;&amp; primCount == 1416 ) || (NumVertices ==&nbsp; &amp;&amp; primCount ==&nbsp; ))<br />
#define MyPlayer ((NumVertices == 2446) || (NumVertices == 1033))<br />
#define weapons&nbsp; ((NumVertices == 74 &amp;&amp; primCount == 58) || (NumVertices == 1481 &amp;&amp; primCount == 1590 ) ||&nbsp; &nbsp; &nbsp; &nbsp;  (NumVertices == 1521 &amp;&amp; primCount == 1494 ) ||&nbsp; &nbsp; &nbsp; &nbsp;  (NumVertices == 32 &amp;&amp; primCount == 12 ) ||&nbsp; &nbsp; &nbsp; &nbsp;  (NumVertices == 219&nbsp; &amp;&amp; primCount ==&nbsp; 172 ))</code><hr />
</div> Then to do the wallhack  &amp; chams we would add this...<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">HRESULT APIENTRY hkIDirect3DDevice9::DrawIndexedPrimitive(D3DPRIMIT&nbsp; IVETYPE Type,INT BaseVertexIndex,UINT MinVertexIndex,UINT NumVertices,UINT startIndex,UINT primCount)<br />
{<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (Zombies) <br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m_pD3Ddev-&gt;SetRenderState(D3DRS_ZENABLE, false);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m_pD3Ddev-&gt;SetTexture(0, texRed); <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m_pD3Ddev-&gt;DrawIndexedPrimitive(Type,BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount); //Draw Everything<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m_pD3Ddev-&gt;SetRenderState(D3DRS_ZENABLE, true);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m_pD3Ddev-&gt;SetTexture(0, texBlue); <br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; if(Weapons)<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m_pD3Ddev-&gt;SetRenderState(D3DRS_ZENABLE, false);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m_pD3Ddev-&gt;SetTexture(0, texGreen; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m_pD3Ddev-&gt;DrawIndexedPrimitive(Type,BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount); //Draw Everything<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m_pD3Ddev-&gt;SetRenderState(D3DRS_ZENABLE, true);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m_pD3Ddev-&gt;SetTexture(0, texGreen); <br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp;  }<br />
return m_pD3Ddev-&gt;DrawIndexedPrimitive(Type,BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);<br />
}</code><hr />
</div> There are other methods of Adding textures i use RGB but im not showing it here. this is just a quick way to get chams and as i said its not fully finished its just to get the idea.<!-- google_ad_section_end --></div>

 ]]></content:encoded>
			<category domain="http://aimbots.net/tutorials/">Tutorials</category>
			<dc:creator>salter</dc:creator>
			<guid isPermaLink="true">http://aimbots.net/tutorials/21643-call-duty-world-war-zombies-chams.html</guid>
		</item>
		<item>
			<title>Winject download question</title>
			<link>http://aimbots.net/tutorials/21506-winject-download-question.html</link>
			<pubDate>Thu, 26 Aug 2010 21:14:27 GMT</pubDate>
			<description>Hey guys.. My first post in here yeah.. 
My question is about downloading winject: 
You see, I have found a lot of places where you can download the...</description>
			<content:encoded><![CDATA[<div><!-- google_ad_section_start -->Hey guys.. My first post in here yeah..<br />
My question is about downloading winject:<br />
You see, I have found a lot of places where you can download the file but everytime there is something wrong with the file. <br />
Sometimes my own computer-firewall says it unsure and that there is a Trojan in it or another virus. And finally when my computer says it okay and I choose to extra-check it through the homepage aimbots.net has suggested (<a href="http://virusscan.jotti.org/en/" target="_blank">Jotti&amp;#039;s malware scan</a>) you should use before you download or before you unpack the file then there are like 5 of them which says there is a Trojan kind of file in it. <br />
So I'm afraid of unpacking them because I don't have any super-protection on my computer and I suck and have no experiance removing virus. <br />
My question is: Do you guys know a place I can download winject, so I can get to use some hacks for BFH, first time ever I use hacks :o, without getting a virus?<br />
<br />
Thanks a lot :)<br />
<br />
(I wasn't sure where to put this thread, so please just move to elsewhere, if it's the wrong place)<!-- google_ad_section_end --></div>

 ]]></content:encoded>
			<category domain="http://aimbots.net/tutorials/">Tutorials</category>
			<dc:creator>SwaggerRex</dc:creator>
			<guid isPermaLink="true">http://aimbots.net/tutorials/21506-winject-download-question.html</guid>
		</item>
		<item>
			<title>Hooking vmCreate @ ql</title>
			<link>http://aimbots.net/tutorials/21478-hooking-vmcreate-ql.html</link>
			<pubDate>Tue, 24 Aug 2010 04:32:42 GMT</pubDate>
			<description>Okay so hoping you already got your dllMain set up and load library Something like this.... 
 
 
main.cpp 
 
 
Code: 
--------- 
HMODULE (WINAPI...</description>
			<content:encoded><![CDATA[<div><!-- google_ad_section_start -->Okay so hoping you already got your dllMain set up and load library Something like this....<br />
<br />
<br />
main.cpp<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">HMODULE (WINAPI *LoadLib)(LPCSTR);<br />
HMODULE __stdcall hab_LoadLib(LPCSTR lpLibFileName))))))))<br />
{<br />
HMODULE qlModule = LoadLib(lpLibFileName);<br />
if (strstr(lpLibFileName, &quot;quakelive.dll&quot;)) {{}{}{}{<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; return qlModule;<br />
}</code><hr />
</div> <div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">BOOL WINAPI DllMain(HINSTANCE habst, DWORD fwReason, LPVOID reserved)<br />
{&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp;  switch (fwReason)<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case DLL_PROCESS_ATTACH:<br />
&nbsp; &nbsp; &nbsp; &nbsp; {&nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  habUtils.habit(habst);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  LoadLib = (HMODULE (__stdcall *)(LPCSTR))DetourFunction((PBYTE)LoadLibraryA, (PBYTE)hab_LoadLib);<br />
&nbsp; &nbsp; &nbsp; &nbsp; }&nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; return true;<br />
&nbsp;  }<br />
}</code><hr />
</div> Okay To find vm_Create what we do is Start firefox/IE whatever load quakelive go in any game (i just went in random FFA)<br />
<br />
I used olly for this next step. so attach your debugger to process...<br />
Go to the module named quakelive.dll<br />
<br />
Next search for all referenced strings and just simply type VM_Create and click ok<br />
<br />
Okay so you find a string at the address 0x0cbadc63 So hit enter. now scroll up untill you hit this: 0CBADBE0        PUSH EBP. <br />
This is what where going to hook. <br />
<br />
Go back into your project<br />
<br />
add in your hook, it will now look like this<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">HMODULE __stdcall hab_LoadLib(LPCSTR lpLibFileName) <br />
{<br />
HMODULE qlModule = LoadLib(lpLibFileName);<br />
if (strstr(lpLibFileName, &quot;quakelive.dll&quot;)) {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; original_CG_vmCreate = (vmCreate_t) CreateHook((PBYTE)qlModule+0x7DBE0,(PBYTE)hab_CG_vmCreate,1);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; habUtils.log(&quot;vm Create Hooked!&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; return qlModule;<br />
}</code><hr />
</div> Make a new header file called hook.h<br />
<br />
Add this:<br />
<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">//vmMain<br />
typedef int (__cdecl *vmCreate_t) (int command, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int arg10, int arg11);<br />
extern vmCreate_t original_CG_vmCreate;<br />
int __cdecl hab_CG_vmCreate(int command, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int arg10, int arg11);</code><hr />
</div> <br />
<br />
Now make a new cpp file called hook.cpp<br />
include your main header file.<br />
<br />
Now create your hook.<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">vmCreate_t&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; original_CG_vmCreate;<br />
<br />
int __cdecl hab_CG_vmCreate(int command, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int arg10, int arg11) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; switch (command) <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //Your code here (you can atleast do this yourself )<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; return original_CG_vmCreate(command, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11);<br />
}</code><hr />
</div> enjoy.. Also this is not 100% c&amp;p but what you need to change is VERY minimul<br />
regards Salt3r.<!-- google_ad_section_end --></div>

 ]]></content:encoded>
			<category domain="http://aimbots.net/tutorials/">Tutorials</category>
			<dc:creator>salter</dc:creator>
			<guid isPermaLink="true">http://aimbots.net/tutorials/21478-hooking-vmcreate-ql.html</guid>
		</item>
		<item>
			<title>Howto disconnect all clients from an UrbanTerror server !</title>
			<link>http://aimbots.net/tutorials/21473-howto-disconnect-all-clients-urbanterror-server.html</link>
			<pubDate>Mon, 23 Aug 2010 19:27:54 GMT</pubDate>
			<description>Before you continue to read, remember: DOS attacks might be illegal in your country.  
The thoughts I write down here are provided for educational...</description>
			<content:encoded><![CDATA[<div><!-- google_ad_section_start -->Before you continue to read, remember: DOS attacks might be illegal in your country. <br />
The thoughts I write down here are provided for educational use only.<br />
If you use them on any server that is not your own, you do so at your own risk. <br />
You've been warned.<br />
<br />
<br />
Take a look at the source of:<br />
Quake 3 engine client disconnector 0.2 (q3noclient)<br />
<br />
<a href="http://aluigi.altervista.org/poc.htm" target="_blank">Luigi Auriemma</a><br />
<br />
<br />
Now: Remember my post on how to resolve an IP to a country ?<br />
<a href="!7764!http://aimbots.net/tutorials/7764-getting-country-ip-address.html" target="_blank">http://aimbots.net/tutorials/7764-ge...p-address.html</a><br />
<br />
It contains an IP string to BigInt and vice-versa conversion.<br />
Now the funny thing is, you can iterate over a BigInteger.<br />
<br />
Now, what that means is that the power to disconnect one IP is the power to disconnect all IPs.<br />
<br />
just convert the desired start adress and the desired end address into a BigInteger.<br />
Then loop over the range and convert the current IP to a string. <br />
<br />
Then you use the string to disconnect the client. <br />
In case one would iterate over the entire IP spectrum, it would disconnect all clients.<br />
<br />
The funny thing is: the amout of traffic you create on the server blocks its appearance in the game's root server list.<br />
<br />
The amount of time necessary to loop over the entire IP specter is, according to my educational guess, 5 minutes (and possibly 27 seconds) (guessed for Linux, 32 Bit, 1.6 GHz, DSL).<!-- google_ad_section_end --></div>

 ]]></content:encoded>
			<category domain="http://aimbots.net/tutorials/">Tutorials</category>
			<dc:creator>quandary</dc:creator>
			<guid isPermaLink="true">http://aimbots.net/tutorials/21473-howto-disconnect-all-clients-urbanterror-server.html</guid>
		</item>
		<item>
			<title>Performing a HTTP get request</title>
			<link>http://aimbots.net/tutorials/21472-performing-http-get-request.html</link>
			<pubDate>Mon, 23 Aug 2010 18:51:18 GMT</pubDate>
			<description><![CDATA[This is how to make a HTTP get request on Windows: 
 
 
Code: 
--------- 
#include <windows.h> 
#include <winsock2.h> 
#include <iostream> 
 
BOOL...]]></description>
			<content:encoded><![CDATA[<div><!-- google_ad_section_start -->This is how to make a HTTP get request on Windows:<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">#include &lt;windows.h&gt;<br />
#include &lt;winsock2.h&gt;<br />
#include &lt;iostream&gt;<br />
<br />
BOOL InitConnection(SOCKET *wSock, char *SERV);<br />
BOOL InitWSA();<br />
BOOL InitSocket(SOCKET *wSock);<br />
DWORD WINAPI RecvData(LPVOID* wSock);<br />
<br />
int main(int argc, char** argv)<br />
{<br />
if(argc != 3)<br />
{<br />
std::cout &lt;&lt; &quot;Invalid argument count\n&quot;;<br />
exit(1);<br />
}<br />
<br />
SOCKET MySocket;<br />
int number = atoi(argv[2]);<br />
char *site = argv[1];<br />
char buffert[65000];<br />
<br />
//CreateThread(NULL, 0, LPTHREAD_START_ROUTINE(RecvData), (LPVOID)MySocket, 0, NULL);<br />
<br />
for(int i = 0; i &lt; number; i++)<br />
{<br />
if(InitWSA() == true)<br />
std::cout &lt;&lt; &quot;WS2_32.DLL loaded\n&quot;;<br />
Sleep(20);<br />
if(InitSocket(&amp;MySocket) == true)<br />
std::cout &lt;&lt; &quot;Socket created.\n&quot;;<br />
Sleep(20);<br />
if(InitConnection((SOCKET*)MySocket, site) == true)<br />
std::cout &lt;&lt; &quot;Connected.\n&quot;;<br />
Sleep(20);<br />
send(MySocket, &quot;GET / HTTP/1.0\r\n\r\n&quot;, 19, 0);<br />
std::cout &lt;&lt; &quot;Sending HTTP GET REQUEST\n&quot;;<br />
while(recv(MySocket, buffert, sizeof(buffert), 0) &gt; 0)<br />
std::cout &lt;&lt; buffert;<br />
}<br />
}<br />
<br />
DWORD WINAPI RecvData(LPVOID* wSock)<br />
{<br />
SOCKET socket = (SOCKET)wSock;<br />
char data[65356];<br />
ZeroMemory(&amp;data, sizeof(data));<br />
std::cout &lt;&lt; &quot;Thread successfully created.\n&quot;;<br />
while(1)<br />
{<br />
if(recv(socket, data, sizeof(data), 0) &gt; 0)<br />
std::cout &lt;&lt; data;<br />
Sleep(1);<br />
}<br />
}<br />
<br />
BOOL InitConnection(SOCKET *wSock, char *SERV)<br />
{<br />
int port = 80;<br />
struct hostent *host;<br />
struct sockaddr_in sin;<br />
int error;<br />
<br />
host = gethostbyname(SERV);<br />
memset( &amp;sin, 0, sizeof sin );<br />
sin.sin_family = AF_INET;<br />
sin.sin_addr = *((in_addr *)host-&gt;h_addr);<br />
sin.sin_port = htons(port);<br />
error = connect((SOCKET)wSock, (sockaddr*)&amp;sin, sizeof sin);<br />
<br />
if(error != 0)<br />
return false;<br />
<br />
return true;<br />
}<br />
<br />
<br />
BOOL InitSocket(SOCKET *wSock)<br />
{<br />
*wSock = socket(AF_INET, SOCK_STREAM, 0);<br />
<br />
if((SOCKET)wSock == INVALID_SOCKET)<br />
return false;<br />
<br />
return true;<br />
}<br />
<br />
BOOL InitWSA()<br />
{<br />
WSADATA wsaData;<br />
WORD version;<br />
version = MAKEWORD(2, 2);<br />
<br />
int error;<br />
error = WSAStartup(version, &amp;wsaData);<br />
<br />
if(error != 0)<br />
return false;<br />
<br />
if(LOBYTE(wsaData.wVersion) != 2 || HIBYTE(wsaData.wVersion) != 2)<br />
{<br />
WSACleanup();<br />
return false;<br />
}<br />
<br />
return true;<br />
}</code><hr />
</div> <!-- google_ad_section_end --></div>

 ]]></content:encoded>
			<category domain="http://aimbots.net/tutorials/">Tutorials</category>
			<dc:creator>quandary</dc:creator>
			<guid isPermaLink="true">http://aimbots.net/tutorials/21472-performing-http-get-request.html</guid>
		</item>
		<item>
			<title>Coding ?</title>
			<link>http://aimbots.net/tutorials/21462-coding.html</link>
			<pubDate>Sun, 22 Aug 2010 17:22:16 GMT</pubDate>
			<description><![CDATA[Hi all ! 
 
I am very interested in coding to make software hacks into computer games but unfortunately I do not really know anything, I'd really...]]></description>
			<content:encoded><![CDATA[<div><!-- google_ad_section_start -->Hi all !<br />
<br />
I am very interested in coding to make software hacks into computer games but unfortunately I do not really know anything, I'd really learn is all that I love but for that I need you tell me what kind of programming language I should learn to code hacks and I would like to know if we can even make a trade and also how long is it to learn? I am motivated 200%!<br />
<br />
Sorry for my English I'm French ^ ^<br />
<br />
Thank you very much<br />
<br />
Goodbye<!-- google_ad_section_end --></div>

 ]]></content:encoded>
			<category domain="http://aimbots.net/tutorials/">Tutorials</category>
			<dc:creator>Raphael-1427</dc:creator>
			<guid isPermaLink="true">http://aimbots.net/tutorials/21462-coding.html</guid>
		</item>
		<item>
			<title><![CDATA[vmMain & sycalls Step By Step NitMod]]></title>
			<link>http://aimbots.net/tutorials/21413-vmmain-sycalls-step-step-nitmod.html</link>
			<pubDate>Tue, 17 Aug 2010 08:38:20 GMT</pubDate>
			<description>Right i know this has been posted before, but i would just like to share what i know:). 
 
first lets create a file called headers.h, once create add...</description>
			<content:encoded><![CDATA[<div><!-- google_ad_section_start -->Right i know this has been posted before, but i would just like to share what i know:).<br />
<br />
first lets create a file called headers.h, once create add all the needed files..<br />
//SDK<br />
#include &lt;windows.h&gt;<br />
#include &lt;detours.h&gt;<br />
<br />
// sdk<br />
#include &quot;sdk/src/cgame/cg_local.h&quot;<br />
#include &quot;sdk/src/ui/ui_public.h&quot;<br />
<br />
next we set our dllMain up c&amp;p bellow. <br />
<br />
Do this by creating a simple .cpp file <br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">BOOL WINAPI DllMain(HINSTANCE habst, DWORD event, LPVOID reserved)<br />
{<br />
&nbsp; &nbsp; if (event == DLL_PROCESS_ATTACH)<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; return true;<br />
}</code><hr />
</div> Next we will set up are LoadLibrary... <br />
<br />
HMODULE (WINAPI *LoadLib)(LPCSTR);<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">HMODULE __stdcall hab_LoadLib(LPCSTR lpLibFileName) <br />
&nbsp;  {<br />
&nbsp; &nbsp; HMODULE etModule = LoadLib(lpLibFileName);<br />
&nbsp; &nbsp; if (strstr(lpLibFileName, &quot;\\nitmod\\cgame_mp_x86.dll&quot;))<br />
&nbsp;{<br />
<br />
&nbsp;}<br />
<br />
&nbsp; &nbsp; return etModule;<br />
}</code><hr />
</div> Now where going to add LoadLibrary to our DllMain it will now look like this :<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">BOOL WINAPI DllMain(HINSTANCE habst, DWORD event, LPVOID reserved)<br />
{<br />
&nbsp; &nbsp; if (event == DLL_PROCESS_ATTACH)<br />
&nbsp; &nbsp; {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp;  LoadLib = (HMODULE (__stdcall *)(LPCSTR))DetourFunction((PBYTE)LoadLibraryA, (PBYTE)hab_LoadLib);<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; return true;<br />
}</code><hr />
</div> Okay Now that we have our LoadLibrary Ready we will start hooking vmMain.<br />
<br />
Lets set it up first of Create a new header file called hooks.h:<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">typedef int (__cdecl *vmMain_t) (int command, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int arg10, int arg11);<br />
extern vmMain_t original_CG_vmMain;<br />
int __cdecl hab_CG_vmMain(int command, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int arg10, int arg11);</code><hr />
</div> Okay when you have done that create a new file called hooks.cpp<br />
<br />
In here we will start by adding our typedef we created on vmMain which will look like this<br />
vmMain_t            original_CG_vmMain;<br />
<br />
Now here is where the fun starts.  We will be hooking CG_INIT &amp; CG_DRAW_ACTIVE_FRAME inside vmMain.<br />
all the functions from vmMain is from the cgameExport_t struct inside cg_public h from the et sdk.<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">int __cdecl hab_CG_vmMain(int command, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int arg10, int arg11) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; switch (command) <br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case CG_INIT:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; habEngine.h_prev_CG_Init();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int ret = original_CG_vmMain(command, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; habEngine.h_post_CG_Init();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return ret;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case CG_DRAW_ACTIVE_FRAME:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; habEngine.h_prev_CG_DrawActiveFrame();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int ret = original_CG_vmMain(command, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; habEngine.h_post_CG_DrawActiveFrame();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return ret;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case CG_SHUTDOWN: {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int result = original_CG_vmMain(command, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return result;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; default:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; return original_CG_vmMain(command, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11);<br />
}</code><hr />
</div> once this is done we will go back to our main.cpp file and inside our loadLibrary we will use MSDetours for our hack.<br />
<br />
but first if you havent already there are numerous ways to getting vmMain but the method im going to explain is just one of the ways to find vmMain.<br />
<br />
Start enemy territory on your selected mod (for me nitmod) attach to process et, then go to cgame_mp_x86.dll module. and if you press CTRL &amp; N you will get a popup if you scroll to the bottom a few lines up you will see vmMain just double click(or press enter on this)<br />
and the address where it takes you you need to keep. for me it was. 0x3004D720. right now we have this we add our detours.<br />
Now it will look like this :<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">HMODULE __stdcall hab_LoadLib(LPCSTR lpLibFileName) <br />
&nbsp;  {<br />
&nbsp; &nbsp; HMODULE etModule = LoadLib(lpLibFileName);<br />
&nbsp; &nbsp; if (strstr(lpLibFileName, &quot;\\nitmod\\cgame_mp_x86.dll&quot;)) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; original_CG_vmMain = (vmMain_t)&nbsp; DetourFunction((PBYTE)0x3004D720,(PBYTE)hab_CG_vmMain);<br />
&nbsp;  }<br />
<br />
&nbsp; &nbsp; return etModule;<br />
}</code><hr />
</div> Okay at the bottom of hooks.cpp add<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">void __cdecl hab_CG_DrawActiveFrame(int serverTime, int stereoView, qboolean demoPlayback) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; habEngine.h_prev_CG_DrawActiveFrame();<br />
&nbsp; &nbsp; &nbsp; &nbsp; hab.CG_DrawActiveFrame(serverTime, stereoView, demoPlayback);<br />
&nbsp; &nbsp; &nbsp; &nbsp; habEngine.h_post_CG_DrawActiveFrame();<br />
}<br />
<br />
void __cdecl hab_CG_Init(int serverMessageNum, int serverCommandSequence, int clientNum) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; habEngine.h_prev_CG_Init();<br />
&nbsp; &nbsp; &nbsp; &nbsp; hab.CG_Init(serverMessageNum, serverCommandSequence, clientNum);<br />
&nbsp; &nbsp; &nbsp; &nbsp; habEngine.h_post_CG_Init();<br />
}</code><hr />
</div> Now vmMain is hooked correctly we can move on to Syscalls.<br />
<br />
go back to hooks.h &amp; add<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">// syscalls<br />
typedef int (__cdecl *syscall_t)(int cmd, ...);<br />
extern syscall_t original_syscall;<br />
int __cdecl hab_CG_syscall(int command, ...);<br />
int __cdecl hab_UI_syscall(int command, ...);</code><hr />
</div> back to hooks.cpp <br />
Now Lets start hooking Syscalls.<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">int __cdecl hab_CG_syscall(int command, ...) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; // We get all arguments to send to Orig Syscall<br />
&nbsp; &nbsp; &nbsp; &nbsp; int arg[10];<br />
&nbsp; &nbsp; &nbsp; &nbsp; va_list arglist;<br />
&nbsp; &nbsp; &nbsp; &nbsp; va_start(arglist, command);<br />
&nbsp; &nbsp; &nbsp; &nbsp; int count = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; for (; count &lt; 10; count++)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; arg[count] = va_arg(arglist, int);<br />
&nbsp; &nbsp; &nbsp; &nbsp; va_end(arglist);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; switch (command) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case CG_R_ADDREFENTITYTOSCENE: {<br />
&nbsp; // add wallhack here<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
}</code><hr />
</div> Okay go back over to main.cpp<br />
The address for 2.6b syscall is 0x004488A<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">HMODULE __stdcall hab_LoadLib(LPCSTR lpLibFileName) <br />
&nbsp;  {<br />
&nbsp; &nbsp; HMODULE etModule = LoadLib(lpLibFileName);<br />
&nbsp; &nbsp; if (strstr(lpLibFileName, &quot;\\nitmod\\cgame_mp_x86.dll&quot;)) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; original_CG_vmMain = (vmMain_t)&nbsp; DetourFunction((PBYTE)0x3004D720,(PBYTE)hab_CG_vmMain);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; habUtils.log(&quot;vmMain is Hooked&quot;);<br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  original_syscall&nbsp;  = (syscall_t)&nbsp; &nbsp; &nbsp; &nbsp;  DetourFunction((PBYTE)0x004488A0,(PBYTE)hab_CG_syscall);<br />
<br />
<br />
&nbsp; &nbsp; return etModule;<br />
}</code><hr />
</div> <br />
if enough requests come through ill go into more detail &amp; add wallhack etc for people who need help.<br />
<br />
hope this was usefull<!-- google_ad_section_end --></div>

 ]]></content:encoded>
			<category domain="http://aimbots.net/tutorials/">Tutorials</category>
			<dc:creator>salter</dc:creator>
			<guid isPermaLink="true">http://aimbots.net/tutorials/21413-vmmain-sycalls-step-step-nitmod.html</guid>
		</item>
		<item>
			<title>Simple LogFile</title>
			<link>http://aimbots.net/tutorials/21412-simple-logfile.html</link>
			<pubDate>Tue, 17 Aug 2010 07:14:48 GMT</pubDate>
			<description><![CDATA[A simple LogFile easily c&p 
i made 1 mistake on purpose which is very basic and simple. 
 
 
Code: 
--------- 
headers.h 
 
#define...]]></description>
			<content:encoded><![CDATA[<div><!-- google_ad_section_start -->A simple LogFile easily c&amp;p<br />
i made 1 mistake on purpose which is very basic and simple.<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">headers.h<br />
<br />
#define HAB_LOGFILE&quot;habHook.log&quot;</code><hr />
</div> #include &quot;utilities.h&quot;<br />
#include &quot;types.h&quot;<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">Utilities.h<br />
#pragma once<br />
<br />
class MHabUtils {<br />
&nbsp; &nbsp; &nbsp; &nbsp; public:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; void habit(HINSTANCE Hinst);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; void resethab();<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; void log(const char *format, ...);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; private:<br />
};<br />
<br />
extern MHabUtils habUtils;</code><hr />
</div> <div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">Types.h<br />
typedef struct {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; char&nbsp; &nbsp; &nbsp; &nbsp; path[MAX_OSPATH];&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Path to Hack directory<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FILE&nbsp; &nbsp; &nbsp; &nbsp; *logFile;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // ptr to logfile<br />
<br />
}mHab_t;</code><hr />
</div> <div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">utilities.cpp<br />
<br />
#include &quot;headers.h&quot;<br />
<br />
void MHabUtils::habit(HINSTANCE hAbst)<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; resethab();<br />
&nbsp; &nbsp; &nbsp; &nbsp; memset(&amp;mHab, 0, sizeof(mHab_t));<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; int len = GetModuleFileNameA(hAbst, mHab.path, sizeof(mHab.path));<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (len) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while (len &amp;&amp; mHab.path[len] != '\\')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; len--;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (len)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mHab.path[len + 1] = '\0';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // logging<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fopen_s(&amp;mHab.logFile, va(&quot;%s%s&quot;, mHab.path, HAB_LOGFILE), &quot;w&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; log(&quot;Salt3r n!tmod 2.07b loaded!&quot;);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
}<br />
<br />
<br />
void MHabUtils::resethab() {<br />
&nbsp; &nbsp; &nbsp; &nbsp; memset(&amp;hab, 0, sizeof(hab_t));<br />
&nbsp; &nbsp; &nbsp; &nbsp; hab.cg_clientNum = -1;<br />
}<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; void MHabUtils::log(const char *format, ...) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (mHab.logFile) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; char buffer[2048];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; va_list va;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; va_start(va, format);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; vsprintf_s(buffer, sizeof(buffer), format, va);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; va_end(va);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fprintf_s(mHab.logFile, &quot;%s\n&quot;, buffer);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; }</code><hr />
</div> <br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">main.cpp<br />
<br />
BOOL WINAPI DllMain(HINSTANCE habst, DWORD event, LPVOID reserved)<br />
{<br />
&nbsp; &nbsp; if (event == DLL_PROCESS_ATTACH)<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  habUtils.habit(hinst);<br />
//You can Hook LoadLib under here like this, then you can easily start making a base by hooking syscalls&amp; vmMain <br />
LoadLib = (HMODULE (__stdcall *)(LPCSTR))DetourFunction((PBYTE)LoadLibraryA, (PBYTE)hab_LoadLib); <br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; return true;<br />
}</code><hr />
</div> #credits nex source<!-- google_ad_section_end --></div>

 ]]></content:encoded>
			<category domain="http://aimbots.net/tutorials/">Tutorials</category>
			<dc:creator>salter</dc:creator>
			<guid isPermaLink="true">http://aimbots.net/tutorials/21412-simple-logfile.html</guid>
		</item>
	</channel>
</rss>
