Windows CMD (Command Line) supports an easy way to automate some task. This can be archived by creating *.bat files and edit them using a simple text editor. The syntax is something that can be found easily by searching. Below is a simple script which can be used to schedule the execution of applications in a sequential way. It means that the .bat script will wait for the X application to finish before it executes…

The purpose of this application is just for fun. It started initially by figuring out a way to fake skype that you are in front of your PC but also to randomly create a picture. The application takes control of your mouse and start drawing random pixels in the main area of the window thus generating mouse position and click events. Below is a sample picture as well as the binary: 

There is a common practice of today’s embedded systems to perform firmware upgrade using custom procedures in order to support different communication protocols during the data transfer such as (KWP2000 etc). For that reason the solid STM bootloader is not useful and the development should proceed by creating a custom bootloader that supports the requested functionalities as well as the core procedure of writing the new firmware (transferred data) to the flash memory. Below is…

HackRF One is a Software Defined Radio (SDR) peripheral capable of transmission or reception (half-duplex) of radio signals from 1MHz to 6GHz. This device is mostly designed for testing and development of modern and next generation radio technologies. It is an open source hardware platform that can be used as a USB peripheral or programmed for stand-alone operation. In the following experiment, i tried the simplest replay attack to a real-world device (Ford Fiesta) in…

Messing around with files, i found that i needed some extra functionalities when i Read/Write in a (binary) file. For example i need to read a specific block of bytes with an offset (if exists – not out of bound) as well as write a given block of bytes to a certain address and select if the current block will override the existing data etc… Unfortunately, some of those functionalities do not exist in the…

This example contains a simple STM32CubeMX + Atollic project based on the STM32F7-Disco board which is able to transmit a CANbus Frame. On top of that the board has a really basic GUI with touchscreen capabilities to activate/deactivate the transmission and of course give a feedback of the procedure. You can freely use alter copy this project but keep in mind that it is a sample and not commented at all. If you want to…

There are several ways to perform HTTP GET, POST.. requests in C#. The following example is using the legacy HttpRequest Class provided by .NetFramework without adding one more additional dependency (Nuget Packages) for something that works really well in .NET implementation and is usually unnecessary for small hobby projects but also not a good practice in professional projects. WebRequest and more specifically the HttpWebRequest class is a good starting point for our purpose. To create…

Static and Singleton are very different in their usage and implementation. So we need to wisely choose either of these two in our projects.Singleton is a design pattern that makes sure that your application creates only one instance of the class anytime. It is highly efficient and very graceful. Singletons have a static property that you must access to get the object reference. However, singleton is not the golden rule, there are several cases where a…

Motorola S-record is a file format, created by Motorola, that conveys binary information in ASCII hex text form. This file format may also be known as SRECORD, SREC, S19, S28, S37. It is(was) commonly used for programming flash memory in microcontrollers, EPROMs, EEPROMs, and other types of programmable logic devices. In a typical application, a compiler or assembler converts a program’s source code (such as C or assembly language) to machine code and outputs it…

This is something that may sound simple but looking around the internet you will find several solutions that … most of them are NOT working at all. For that reason, I decided to post the following solution which is working perfectly with Outlook and it is also tested with Gmail. (And of course, have a personal backup of this piece of code a.k.a snippet). (Just for those who will try to use this snippet with…

Following up a previous post: http://www.devcoons.com/c-nuget-package-with-useful-extension-methods/ , in this post there will be listed some quite useful and commonly used extension methods for simple operations. (Basically, I do not currently maintain the NuGet package -lack-of-time-) I have various extension methods in my CommonLib file, however, in this post, I will only enumerate some of them. “Extension methods enable you to add methods to existing types without creating a new derived type, recompiling, or otherwise modifying the original type.” One…