Posted in Programming by Mr. Novocain on August 5, 2010 at 07:04

Linked List in C#

This might interest you: Pro C# 2010 and the .NET 4 Platform, Fifth Edition

This is my class for C# linked lists. Simple as that.

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.Runtime.InteropServices;
  5.  
  6. namespace nsLinkedList
  7. {
  8.     public class LinkedList
  9.     {
  10.         public string line;
  11.  
  12.         public LinkedList prev = null;
  13.         public LinkedList next = null;
  14.     }
  15.  
  16.     public class LinkedListFuncs
  17.     {
  18.         public LinkedList Push(string line, LinkedList list)
  19.         {
  20.             LinkedList temp = new LinkedList();
  21.             temp.line = line;
  22.             temp.prev = null;
  23.             temp.next = null;
  24.  
  25.             if (list == null)
  26.                 return temp;
  27.  
  28.             LinkedList tmppek = list;
  29.  
  30.             while (tmppek.next != null)
  31.                 tmppek = tmppek.next;
  32.  
  33.             tmppek.next = temp;
  34.             temp.prev = tmppek;
  35.  
  36.             return list;
  37.         }
  38.  
  39.         public bool Replace(string oldstr, string newstr, LinkedList list)
  40.         {
  41.             LinkedList tmppek = list;
  42.  
  43.             while (tmppek != null)
  44.             {
  45.                 if (tmppek.line == oldstr)
  46.                     break;
  47.                 tmppek = tmppek.next;
  48.             }
  49.  
  50.             if (tmppek != null)
  51.             {
  52.                 tmppek.line = newstr;
  53.                 return true;
  54.             }
  55.  
  56.             return false;
  57.         }
  58.  
  59.         public LinkedList Remove(LinkedList remove, LinkedList list)
  60.         {
  61.             LinkedList tmppek = list;
  62.  
  63.             while (tmppek != remove)
  64.                 tmppek = tmppek.next;
  65.  
  66.             if (tmppek.prev == null)
  67.             {
  68.                 list = list.next;
  69.                 list.prev = null;
  70.             }
  71.             else if (tmppek.next == null)
  72.             {
  73.                 tmppek.prev.next = null;
  74.             }
  75.             else
  76.             {
  77.                 tmppek.prev.next = tmppek.next;
  78.                 tmppek.next.prev = tmppek.prev;
  79.             }
  80.  
  81.             tmppek = null;
  82.  
  83.             return list;
  84.         }
  85.  
  86.         public LinkedList Free(LinkedList list)
  87.         {
  88.             if (list == null)
  89.                 return null;
  90.  
  91.             LinkedList tmppek = list;
  92.  
  93.             while (tmppek.next != null)
  94.             {
  95.                 tmppek.prev = null;
  96.                 tmppek = tmppek.next;
  97.             }
  98.  
  99.             tmppek = null;
  100.             list = null;
  101.  
  102.             return list;
  103.         }
  104.  
  105.         public LinkedList Find(string findstr, LinkedList list)
  106.         {
  107.             LinkedList tmppek = list;
  108.  
  109.             while (tmppek != null)
  110.             {
  111.                 if (tmppek.line == findstr)
  112.                     return tmppek;
  113.                 tmppek = tmppek.next;
  114.             }
  115.  
  116.             return null;
  117.         }
  118.     }
  119. }

Incoming search terms for the article:

 
 
Posted in Gamehacking,Programming by Mr. Novocain on December 14, 2007 at 18:38

MASM Dialog Trainer-base

This might interest you: Programming: Principles and Practice Using C++

gallery_enlarged-1210_kristen_bell_vga_10.jpgTrainer-base written 100% by me in MASM32.
I use this for all my trainers now..

Very simple base, About/Exit/Options buttons (2 options), tells you to start game before trying to patch if buttons pressed when game not started.

Also has icon & a small bitmap (logoish) from my CSS-trainer.
(more…)

Incoming search terms for the article:

 
 
Posted in Cracking,Debugging,Programming by Mr. Novocain on September 18, 2007 at 20:01

C++ Anti-Cracking “hide” your WinAPI-calls

This might interest you: Simple PHP - Learn Php In 17 Hours

_20050908_canapa_mariuana_droga_droghe.jpg
If you’re a software-programmer and/or reverse-engineer you should know that using Windows API-calls is a easy way to write code, and also in many cases a good point for reverse-engineers to trace to/from while removing potential protections.. (more…)

Incoming search terms for the article:

 
 
Posted in Gamehacking,Programming by Mr. Novocain on September 6, 2007 at 01:00

C++ Externally modifying pointer-values

Hey! You should read Learning PHP, MySQL, and JavaScript: A Step-By-Step Guide to Creating Dynamic Websites (Animal Guide).

hr_inred.jpg
In games such as in this example (WarRock) some values you can change if you can find out the pointer, in CE (Cheat Engine) you can find them by using the pointer-searcher, then you get eg. 0x0B4DC0D3 + 0x1C and many people don’t know how to do with the + 0x1C and just try to add it together with the address.. (more…)

Incoming search terms for the article:

 
 
Posted in Programming by Mr. Novocain on September 4, 2007 at 22:30

C++ Clipboard Set & Paste (aka Spammer)

Hey! You should read Learning PHP, MySQL, and JavaScript: A Step-By-Step Guide to Creating Dynamic Websites (Animal Guide).

118737311321.jpg
This program sets the clipboard to a certain message then when user presses F5 it starts to paste (Ctrl+V) the message to the current window and presses Return (sends message in MSN) until user presses F8.

Tested with spamming people on MSN (more…)

Incoming search terms for the article: