Category Archives: C++

Article for Programmez for Feb 2019

In February 2019 issue of Programmez Magazine, you will find my article about Rootkit Command and Control software. Enjoy !

226

Advertisements

A simple Logging Library : MyLoggingLibrary

If have developed a simple logging library for console and file and multiple support of appenders. It’s called MyLoggingLibrary.

I have made it available to github: https://github.com/ChristophePichaud/MyLoggingLibrary

It was a sample for my students but it works and it’s simple to use. There is no configuration file.

// Client.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include "pch.h"

int main()
{
	CAppender appender1("log");
	appender1.SetLevel(Level::Debug);
	appender1.SetAppenderType(AppenderType::Console);

	// Appender 2 de type fichier
	CAppender appender2("log");
	appender2.SetLevel(Level::Info);
	appender2.SetAppenderType(AppenderType::File);

	// Objet de configuration
	CConfiguration config;
	config.AddAppender(appender1);
	config.AddAppender(appender2);

	// Get Logger(s) "log" & use => affichage en console et écriture en fichier
	std::unique_ptr<CLogger> logger = config.GetLogger("log", Level::Debug);
	for (int i = 0; i < 10; i++)
	{
		logger->Debug("Logging a Debug...");
		logger->Warning("Logging a Warning...");
		logger->Error("Logging an Error...");
		logger->Info("Logging an Info...");
	}
}

 

Article in Programmez for January 2019

My next article will be in french Magazine Programmez in January 2019. It will talks about rootkits and key logger.

225

Articles C++ en Serie…

OOP : http://bit.ly/2rhQFYl

Basic – Partie 1 : http://bit.ly/2FT92Nn

Les classes – Partie 2 : http://bit.ly/2FROSDK

Les Templates – Partie 3 : http://bit.ly/2zwZ4fd

STL – Partie 4 : http://bit.ly/2Sp6kAJ

Boost – Partie 5: http://bit.ly/2U7r4OX

 

CPPCon 2018 slides

Here is the place to find cppcon 2018 slides : https://github.com/CppCon/CppCon2018/

Article in Programmez for December 2018

My new article will be available in December 2018 edition of Programmez magazine.

Installing WSL, Ubuntu Bash, GCC, G++ on Windows 10

First of all, install Windows Subsystem for LInux on Windows Features. Reboot.

Go to aka.ms/wslstore and install Ubuntu.

Run bash and create a user account with a password.

bash1

Make a “sudo apt update” to update the repo packages.

Then you can do “sudo apt install gcc” and “sudo apt install g++”.

You can copy your files from your Windows system to WSL using /mnt/<drive>. Take acre of converting files to UTF8 from VS using notepad++ or iconv.

bash2