Author Archives: smike19

Windows Subsystem for Linux. Accessing files.

Linux distributions uses the Filesystem Hierarchy Standard (FHS) which defines the universal directory structure (like home, usr, bin, tmp and so on) and directory contents. To access to Windows c: drive from install WSL Linux distribution use /mnt/c directory. Let us create c:\Temp\ubuntu.txt file from WSL ubuntu 24.04 distribution: C:\>wsl -d Ubuntu-24.04 smoke29@MSI:/mnt/c$ sudo echo… Read More »

CGO example to get openssl cipher list

This post is related to “How to get openssl cipher list programmatically” post. That post contains example written in C, current post presents example in Go which duplicates sequence of openssl API calls used by previous post. The Go example uses CGO package that enables interaction with C code of openssl shared libraries. package main… Read More »

CGO example to calculate MD5 of string

It was continuation of “Calculate MD5 programmatically (c++ and golang)” post. That post contains example of MD5 calculation written in Go. The Go example small and tidy, the new example contains significantly more line of code and looks cumbersome, however in demonstrate how to use openssl API from Go and includes multiple samples of CGO… Read More »

Create and Deploy Smart Contract

The first post “Installing Ethereum Development tools: geth and truffle on Ubuntu 22” was about preparation of development and testing environment to create first simple smart contract application. Now let us create application itself. Again, everything on Ubuntu 22 machine. Create working directory and initialize new and empty Ethereum project: # mkdir -p /workspace/contract1 #… Read More »

ChatGTP client in c#

It is continuation of previous post “Ask ChatGPT to answer a question using curl command” but request to ChatGPT server is sent by c# code. The authentication secret key in example below has been revoked, so if you want copy-paste the code you need to use your own OpenAI authentication secret key or request new… Read More »

Ask ChatGPT to answer a question using curl command.

It is my beginning trail of ChatGPT (Generative pre-trained transformer) from OpenAI. It is possible to chat with ChatGPT there: However the main goal of this post to ask ChatGPT by sending raw HTTP request. To get access to OpenAI API you need to generate security key using this link: The security key… Read More »

ssh Vulnerability DoS test

This test was created when I worked with CVE-2002-20001 vulnerability. The vulnerability is about diffie-hellman-group-exchange-sha256 key exchange algorithm with high computational complexity which is using long exponents that arguably make certain calculations unnecessarily expensive. To test the issue I created small bash script to simulate DDoS attack on ssh server using different key exchange… Read More »

How to Replace a Substring in a String in c++ code

A bit away for from security themes just simple c++ coding related to string processing, changing substring in char array. Recently I had a task to hide some private info in log replacing it with asterisks. It is the code, I tried to do it the new substituted substring may longer or shorter then initial… Read More »