Thursday, February 11, 2016

Executable file inside an executable file in Dev C++



Hi Guys!
In the windows operating system. There might be times where we need to call other executable in our own program. This works well probably on the first time. But when the executable file being called is renamed or path has been change.....BOOM! that's when the problem comes. You need to change your program code then point to the new path or filename of the executable.

The solution can be........what if we can add the executable being call together with our program code so that when we need to call the executable just ripped its code from its location on our program code, saved it to a temporary folder then run it from there. This eliminate entirely the problem on rename and change directory. ................Well, This is basically what I will discuss in this post on how to add a .exe resource on own program. In here, I will be using the free Dev-C++. The version I'm using is still the 4.9.9.2 which is I think 2011 when this was released.

Wednesday, August 19, 2015

Proving bit flipping attack on RC4 stream cipher (if weakly implemented)


Hi Guys! in this article we will somehow go to the world of cryptography wherein the hackers play a hide and seek or cat and mouse with the cryptographers. The cryptographers develop encryption to secure information...now hackers break it.....steal something. The technology users caught in between believing that their private files is secure.....only to realize that hackers has stolen their private digital belongings ranging from as simple as picture of the lady you fantasize..... to as serious as bank account......etc. Anyway, in here I just show you a simple way to demonstrate bit flipping on stream cipher. This is changing part of an stream cipher encrypted message without knowing the key. I will be using RC4 which is a popular stream cipher. Then using VBA on the programming side to show you guys how to change encrypted message content.

Friday, July 3, 2015

How to read a 24bits bitmap file

Hi Guys!
Bitmap (.bmp) files are digital image files that are easy to understand in terms of its byte to byte contents. Easy as its encode only the pixel in a format widely understood by many (I believe). The pixel encoding is in RGB format which stands for RED, GREEN and BLUE. In this blog, I'll show you guys how to read a .bmp file byte and byte using Excel Visual Basic for Application (VBA) with the help of windows API.


Tuesday, June 2, 2015

Basic Sending and reading data on Serial comport using VBA

Hi there! There are lots of electronic devices or modules that can be connected to computers or laptops and they are mapped as communication port/serial port or COM port... COM1,COM2, etc. The good example I have is the mbed NXP LPC1768 which is mapped as COM port once installed and connected to the computer via USB:

Thursday, May 14, 2015

The Homing Device Project (Part I - The GPS Module)

I'm a comic book fan. Mostly in comic books, one gets to see technologies that are out of this world, like Iron Man's suit, the Fantastic Four's Ultimate Nullifier or Batman's Whirly-Bat. But one thing I don't get is why can't someone invent a "homing device" in real life up until now? Batman uses it all the time. Spider-man too in the form of a "Spider-tracer".


Tuesday, May 5, 2015

String Manipulation in Excel VBA

There are times when I'm building an electronics project with 1000+ components. I encoded my bill of materials (BOM) on excel. Say, 10K resistor for R1 to R5 so I put in there "Resistor 10K" then on "location" I will put "R1-5" or "R1-R5". This is good as it facilitates easy inputting of location without having to type "R1 R2 R3 R4 R5". So the BOM is completed in this way. Perfect! All in place. Later on, I want to know the value of say "R4" on my BOM containing 500+ different resistors. I search "R4"... only to know that excel cannot find the string "R4" because I did put R1-R5. This means there's really no "R4" at all.
The question now is how do I facilitate easy inputting of location without worrying that excel "find" cannot locate it? Probably excel vba can help solve this common pitfall. Well perfect! vba contains rich string manipulation that can solve this one.