|Where we will learn how to read in a Bitmap file, process it and write it back to file.|
|This code hashes a file using the Message Digest 5 and print its hex code to CHECKSUM.MD5 , like the bsd command (md5/checksum)
| by: Sk - 2007-06-14 10:47:58|
|Recursion offers a couple of interesting ways to solve a problem. One of them can be exploited for an easy and fast sort algorithm, the merge sort.|
| by: Sk - 2007-05-27 21:19:44|
|Recently I found myself needing to retrieve the list of files in a folder to show them along with some basic information. ANSI C doesn't provide a standard way to do this, and, while Linux and UNIX programmers can rely on the output of programs such as "ls", a Windows developper has the ability to use specific APIs. |
| by: Sk - 2007-05-27 06:19:34|
|After getting our feet wet with some basic sorting utilities, it's time to move on to a faster algorithm: the counting sort. It can only be used in some special cases, but works like a charm. |
| by: Sk - 2007-05-04 16:21:09|
|The ability to sort a vector is essential in many applications, especially if there's the need to show data to the user. This article presents a couple of easy-to-implement algorithms. |
|File Handling in C is in fact a simple task. But this does not mean youre limited to do simple things.|
|With C, everything from an on-disc file to a printer is a file. To handle files efficiently, the "FILE *" datatype has been introduced.|
|This article is meant to teach you about the basics of sockets |
|This is a example of stream sockets. It connects to a host and recieves the data sent by the host.|
| by: BBYUGB - 2005-01-11 23:04:33|
|An introduction on using libpthread on linux boxes|
| by: BBYUGB - 2004-12-26 18:50:35|
|We'll just go through some very simple example code, to see how to use fork() and execl().|
|There are a few articles on building PHP extensions online, but most are aged and don't deal with visual studio .net. With the recent work I've been doing on a hefty web project i came to point where regular php code was too slow for my needs and i already knew how to perform the same function with C, so i dove head first into PHP extensions and the Zend C API. If your in the same situation i suggest doing the same.|
|MonoAlphabetic Substitution Cipher written in C.
Ok, I almost made the mistake of bypassing this cipher. By simply remapping the letters of the alphabet you can create a cipher text with 26! possible keys. Nice.
|Random Key Generator (AKA r33t0 mask maker) written in C.
This program generates a text file with randomly generated data. This is great for making non-predictable masks to use in cryptology programs. Learning how rand() and srand() work is also something every coder should know.
|Character Frequency Analyzer (AKA Cipher Buster) written in C.
This is a program that reads a plain text file and reports the most commonly occuring alphabetic characters. This will be very important when I introduce a program that attempts to crack a cipher text file. As is, this program is great for making you wonder why the heck the keyboard is mapped so unefficiently.
|Multi-Byte XOR Encoder/Decoder (AKA 8-bit XOR Cipher++) written in C.
Following in the "run it once to encode, run it again to decode" footsteps. Multi-Byte XOR digs a little deeper in C and brings us a little closer to making something that your colleagues will drool over.
|Rot13 Encoder/Decoder (AKA shift cipher) written in C.
The first example in a mini-series on basic cryptology in C.
|This program fills in the headers of UDP and IP protocols.|
|In this article you'll see how to code a Windows screen saver through the predefined screen saver library. You'll also see some basic GDI code.|
| by: belarm - 2004-05-07 03:37:56|
|A quick run-down of the bare minimum you need to connect to and query a MySQL database in C.|
|This artille will show some simple encryption methods used in C++. It will also show some un-decryptable methods used to encrypt strings.
| by: shab - 2004-01-05 00:31:04|
|If your reletivly new to C/C++ you might not have noticed it, but im rather sure you have used it. Useful when your writing functions like for example printf.|
|C++ templates illustrated by a practical example: a generic Ring Buffer.|
|How to implement a hash table in C++|
|This article is a short intruction on how to use g++: the c++ compiler for linux. It also explains how to use a makefile to do most of the work for you.
I write this because when I started programming, I used to always have trouble with finding out how to actually run my programs. Many programming tutorials (for different programming languages) tell you how to write your programs, but not how to actually compile or run them.
It is also my first article, I hope you like it :)
| by: shab - 2003-12-11 22:11:01|
|I don't know if you have ever encountered this problem, I have several times when working with for example threads but also with toolkits such as FLTK that uses callback for events, I want to cast a class function but it just won't accept. Here is a workaround for it.|
| by: shab - 2003-12-11 21:49:35|
|FLTK is a crossplatform GUI toolkit, similias to wxWindow and GTK, I personally prefer is since it's soooo simple to use. It's almost as easy as VB(Just more logical). I will explain it for the version 1.1. There is a version 2 out I just havn't looked @ it ^_^|
|A program to print out all the ASCII char's into a text file called ascii.txt, useful for beginner C coders.|
|I use this code in my TaskManager to gain debug privledges so I can terminate processes that I otherwise couldn't terminate. You can also use this code to remove permissions.|
|Would you like to write your own application to tidy up incriminating evidence held by IE. Here are a couple of simple C methods for clearing out the temporary files, and deleting history records. You can add this to an application and set it to a timer of your choice
|Welcome to the world of C programming. C is a great language to begin with it will set you in good stead for your life in programming. This beginner tutorial will show you the basics of C syntax and show you some introductory code, this beginners step will give you a glimpse into what C is all about. Without further ado lets write some code. Each line is commented and broken down later, so don’t worry about absorbing it all at once.|
|Welcome to the first tutorial on OpenGL. This tutorial assumes that you have basic knowledge of c++. In this tutorial you will learn how to initialize an OpenGL window and how to display a 3D triangle on the screen. |
|Curious about compilers and all the tech that goes into them? Well I'm starting a series on how to make a compiler from scratch. It's not as hard as you think, and the technologies in compilers are usefull elsewhere too. |
|This is a simple calculator that can perform addition, subtraction, multiplication and division.
It has a graphical interface using forms.
|Loads of funky tricks for screwing with windows from C|
|No remote administration tool would be complete without the ability to create sharepoints. The problem is, a user may become suspicious if they see the little hand under the folder in Windoze Explorer. The code source code below is a simple routine for sharing folders and you can even prevent the little hand under the folder (SHI50F_SYSTEM).|
|You would have a thing between a random word(like a passwort) or a key. Get'it! With this little proggie. It is based on the randomize functions rand() and srand(). Fast.|
|The last digit of a credit card is a check digit that is used to detect keystroke errors when a credit card is entered into a computer. In this article we implement a check digit algorithm which is public(ISO 2894), but is not widely known. |
|SMTP stress checker is a utility written in C++ for stress testing SMTP servers. Using this we can send a large number of mails within a short time in order to check the capacity of the SMTP server.|
|running a *nix based system, then try this for size. ProjectXs very own blexim aka mat999 has produced a lovely little c based irc client, with a seperate libray class, with all the wrappered irc functionality.|
|Understanding sockets in C# is relatively easy, especially if you have experience in Java (as most C# stuff is a rip off of Java). Heres a simple client / server application which allows you to push data between network ip / ports in C#|
|This is a simple ROT13 encoder in C#.|
|This is a simple example that uses C# to query a MySQL database for information.|
|This example shows how to read and write bits in C++ , most of this will be correct for c/c# users too with some minor modifications
|For those of you who don't know, Bjarne is the guy who created C++. So any of you elite 0day c0d0rZ might be schooled by this guy, obviously, he knows his stuff :)).
|Following in the footsteps of our other encryption articles in Perl, C# and Java. Here is an example of how to perform some simple encryption in C/C++ by using the XOR method, also shown is an example of extending the XOR method by using a BLOCK.|
|Ever wondered how trojans work or just want to run system commands remotely like if you were on vacation or something didnt have access to your own PC? Well here it is...by changing a few lines and writing up a client you can make quite a powerful server out of this.
I'm sorry bout all the *nix gurus out there that want to see *nix sockets..this is a winsock only, tho most of it will work unless i state otherwise in my comments.
|Well .. easyish! This program shows you how to do a simple client server communication program utilising winsock.|
| by: rj - 2003-06-21 07:19:46|
|When you talk to others about coding, a lot of people are pretty avid about the main language in which they code, whether it be C, C++, Perl, Java, Visual Basic, Assembly, etc... But the way you code has to be your most important consideration|
SDL, which stands for Simple Directmedia Layer, is a library similar to DirectX except that its multi
platform. The advantage of using it is that it's very easy to port apps made using it to other OS's
without modifying the code much.
|Ever wonder what these new languages like C#, Java, Ruby and Objective-C can really do for you? I thought I'd mention a little-known but incredibly cool design pattern that relies on dynamic languages.
I also mention how you might make it happen with C++, for the less enlightened (or lucky) users out there.
|Have you ever wanted to switch two variables around, lets say a and b, but all you can do is use the hardway. Heres some ideas on using an XOR Flip to get more elegant results.|
|so, you are coding a keylogger, backdoor, virus... (what ever), just one thing is wrong...
if someone press ctrl+alt+del, they can see your process and terminate it... that's not very good... Heres how to conceal you application.
|You want to write an encryption app? Unless you have your own encryption algorithm, you'll probably take a license-free one like Blowfish or Rijndael. I'm going to show you the easiest way (I think) to implement Blowfish into your program.|
|Many key loggers use a keyboard hook to capture keystrokes. One method of detecting them is to just look for any program that is hooking the keybaord. Simple enough.|
|A nice way of arranging say a set of numbers is to use a bubble sort algorithm, this nice example written by insurgent shows how to implement it in C.|
|A Vector ( most commonly know as as Array) is just a lot of consecutive elements, all from the same type, which can be individualy acessed from a single name, that is the name of the Array. As a sample of what an array can do, look at the following.|
|Recursion is, a function calling itself, directly or indirectly and can be a powerful tool when solving problems, as an example, our problem is finding the nth number in the Fibonacci sequence.|
|There are many different usage for the C/C++ preprocessor, but first of all, heres a little background on what they are, and what theyre used for.|
|Aritificial Intelligence is often a topic that people assume to be extremely difficult when given the task to code it. This, in some cases, is true, but most often the solution is far easier than imagined. Here is a simple example of AI used in a game of Tic-Tac-Toe to show one way of creating AI.|
|References, provide the functionality of pointers, with a somewhat simpler context, theyre sometimes referred to as the thinking mans pointer, so, if you dislike the relative annoyance of pointers, read on.|
|Over the past few weeks I’ve heard several people say they’ve tried to learn c++ but get stuck at pointers and give up, its a much talked about concept, some people say its only necessary to know referencing as opposed to pointers, some say the way c++ handles pointers is awful, either way to become a proficient c++ programmer you need to understand pointers.|
|Hungarian notation was first devised at Microsoft by a guy called Charles Simonyi initially to enable the many programmers working on the same project to understand what was going on someone else's source code.|
|This is a tutorial on how to write a small server program using sockets, which sends the current uptime to a remote client. I'll explain the important steps by commenting the sourcecode. Caution windoze users: this tutorial does NOT work with WinSock, it uses only *NIX based functions.|
|If you're writing for a example a encryption program that uses rijndael(aes) and you ask for the input of a user and get in in char, then the rijndael requires you to use a long when you parse it for the encryption function.|
|Well, I noticed that most of articles are for medium to advanced level programmers. I`m trying to write a simple tutorial, so people can understand how to solve programming problems. For this; here is a simple problem...
|Arrays are probably the most basic data structure you’ll encounter in your c/c++ adventures, however, I'm all for keeping it simple, they provide a lot of flexibility and are a damn sight easier to read/maintain than a balanced AVL tree.|
|The ‘this’ pointer, is a hidden parameter in every nonstatic member function (a function thats part of a class).|
|After last time you should know how win32 programs work, the concepts behind message handlers and all that jive, alas today we wont be using direct x (probably wont be next time either), today im going to talk about GDI.
|A basic explanation of arrays in C.
Any comments, add-ons are more than awaited, as I am eager to get all the input from more experienced folks like you all.
|Accepting command line arguments is still a fairly useful thing to be able to do in these GUI intensive times, most console based programs these days don’t just run directly, they accept certain parameters, usually an action and a file to perform that action on.|
|One more lesson before we get to the good stuff, honest, today I’m going to cover font and bitmap resources w/gdi as most of the concepts apply under direct x, and they're a damn site easier to understand this way.|
|muzzy writes "Here's some code for you kids. It demonstrates the concept of stack, implemented with a linked list mechanism to support virtually infinitely large stack sizes. Happy reading."|
|Because booto and chawmp completely slated me for my last example of recursion, here's another, and as a sidenote it solves a particularly cool problem.|
|The following basically demonstrates a simple and efficient way of searching an array.|
|An incredibly basic LIFO (last in first out) implementation, add your own switch case menu for maximum effect you.|
|Ever wondered how those brute force tools work?
Well, how would you find out? ... Just code your own.
There is nothing behind it, just trying and re-trying.
Actually a pretty stupid method of attack.
|I find it hard to understand the excitement over Vector classes, iostream etc. Having tried it against good ol printf etc.. I've don't feel it's particularly wondrous..|
|Here is a tips for anyone wondering about how to do ROR, ROL (rotate) ASM instructions inC code. For whom that don't know exactly what it is, here's an explanation...|
|Yeah, remembing a substitution key can be a real pain in the ass. :( So therefore there is a technique to work one out using a keyword. Here is an example. I will also demonstrate code that generate a key, but first a normal, key.|
|Ok, so when i say win32 i mean console win32, the concepts are interchangeable between console and GUI apps, however, its just easier to understand this way. |
|A few people on the CA forums have expressed an interest in learning win32, so im going to gradually work through the fundamentals over a few articles.|
|Yes, isn't the posix regex just wonderful they have it all, so I wondered why are they not in C? Well, I found the answer and I got happy, they are there, and heres how to use them|
|Want to write a ircbot for your *nix machines irc server, but you can't figure out how to use sockets in C, well Im here to rescue you :)|
|If you dont know, exactly, what a dll is, you probably shouldnt be reading this, as i wont explain it here. Certain people arent too keen on dll’s, i find they have their uses, plugin systems namely, ive had a lot of success using them in that context.
|A while ago this article detailed a case for using stdio over c++ vector classes, me being the nice individual i am have decided to put forward the other side of the coin.|
|Continuation of the Secure coding article that was published earlier.|
|Alright, not strictly random numbers, because that's essentially impossible, but random to the causal observer, there are people who ramble on about expressly needing truly random numbers and how the timer method simply wont do for their dice rolling program or some such nonsense, fortunately for the sane amongst us, i don't cater for those people.|
|Usually when you create a console program, you know how much memory you’ll need because you know how many variables there are, there are instances, however, where the amount of memory you need is determined at runtime, say if you wanted a user to input a variable number of values.|
|Templates are a powerful tool especially when you‘re creating large programs that need frequent maintenance, they allow you to create generic functions and classes that take any type as parameters and return a value without any of that tricky overloading business.|
|The UDP protocol works very much like the TCP/IP, except that it has no connections. Heres how it works, and some examples on how to play with it.|
|Skins are the ’essential’ thing for desktop applications these days, just about everything from windows media player to kazaa supports them, and so should your application, its easier than it looks to implement providing you know some win32 basics, so read on.|
|As you're probably aware, MAC stands for media access control, every NIC comes with a unique MAC address, think of it as a serial number, it basically controls access to the physical transmission medium on a network (ever wonder why you don't need to enter a u/p for cable modem connections ? its all done via your MAC address)|