Skip to content

Instantly share code, notes, and snippets.

View OsandaMalith's full-sized avatar

Osanda Malith Jayathissa OsandaMalith

View GitHub Profile
@OsandaMalith
OsandaMalith / detectArch.c
Last active September 25, 2017 14:12
Few tricks that I found out when I had a look at the segment registers in Windows.
#include <Windows.h>
#include <wchar.h>
/*
* Author: Osanda Malith Jayathissa - @OsandaMalith
* Website: https://osandamalith.com
* Description: Few tricks that you can use to detect the architecture in Windows
* Link : http://osandamalith.com/2017/09/24/detecting-architecture-in-windows/
*/
@OsandaMalith
OsandaMalith / deflate.cs
Created June 4, 2017 01:28
Compress and decompress files using the Deflate algorithm
/*
* Title: Deflate Tool
* Purpose: Compress and decompress files using the Deflate algorithm
* Author: Osanda Malith Jayathissa (@OsandaMalith)
* Website: https://OsandaMalith.com
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
#include "stdafx.h"
#include <Windows.h>
/*
* Author: @OsandaMalith
* Website: https://osandamalith.com
*/
void check(int *pid) {
TCHAR computerName[MAX_COMPUTERNAME_LENGTH + 1];
@OsandaMalith
OsandaMalith / publickey.asc
Created December 8, 2016 01:17
My Public Key
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: OpenPGP.js v.1.20131017
Comment: http://openpgpjs.org
xsFNBFRrI2sBEACGZCPNizSo3isr1XqIiQv4Fqn48m7H/ejxALHvUxWErEi+
jst8BYcjD4GUkzA+pTQ282jx9pIxWYPdTcwNcloLBFOeyIUNU9KKl4B72Z+B
8LVeYWx7D4rYdYiEgKz0YZTwG4iT5ZaZt8BtpCB6TJkHnoQXGpzTGrgm6Qrz
wuK19n0iaaX9kswnNj5k5rk+caWWM4v3KNh+CKnpnRUOOSsfF231hnV6Mckl
ucyPi4EKehtbFFlUUJfKmJWS3tjjupO6gP/WcYYO0wz7CEtEIvkdfj+oK09N
xkxilkADq4U72k5v5vxfDQDM0L/pDoD9SYr92Q6KuGCjpRnIK3Sbb46NlXpZ
@OsandaMalith
OsandaMalith / pack.c
Last active November 16, 2016 14:00
Simple experiment of packing and unpacking a DWORD and a short inside a DWORD64 variable and making a string value.
#include <stdio.h>
#include <windows.h>
/*
* Author : @OsandaMalith
* Website: https://osandamalith.com
* Description: Simple experiment of packing and unpacking a DWORD and a short inside a DWORD64 variable and making a string value.
*/
int main() {
DWORD a = 1633971809; // a < 2 ^ 32
@OsandaMalith
OsandaMalith / osanda.com
Last active November 14, 2016 15:07
Save this as osanda.com and run using CMD. 16-bit apps would on XP otherwise use DOSBox
%@"%"@,~,%,!`_^[^_^]-;>`_^[^_^]%"!,^,:`_^[^_^]-@{-`{-?:`_[^_^]_-``-``-@@`_^[^_^]-`~-``-@$`_^[^_^]-``-``-@@`_^[^_^]-`~-``-@#`_^[^_^]-+~-/~-?;`_^[^_^]%!~-;-,;`_^[^_^]-"$-@~-@``_^[^_^]-{[-);-@:`_^[^_^]-/*,%`_^[^_^]`_^[^_^]`_^[^_^]`_^[^_^]%@$-@;-?;`_^[^_^]-/~-`&,#`_^[^_^]-`~-`{,*`_^[^_^]-@@-$!`_^[^_^]-:$,[,<`_^[^_^]-!|-.),!`_^[^_^]-@{-@`-/(`_^[^_^]`_^[^_^]`_^[^_^]`_^[^_^]-{!-{.,.`_^[^_^]-~/-/``_^[^_^]%""-}@$"`_^[^_^]%@@-!/,!`_^[^_^]-:*-=%`[[[[[[[[`^^^^^-%+)@@^^^!;@@#",((,.((-$+)@*+@!!@-,!"(+@@,$-,!"_$#'!&.&$&!&-$!&,&)&$'(&."#&_&-&-@*@$"
@OsandaMalith
OsandaMalith / strlen.asm
Last active November 8, 2016 09:33
Manual String Length function in NASM
%if 0
* Title: Manual String Length function
* Author: Osanda Malith (@OsandaMalith)
* Website: https://osandamalith.com
%endif
global _start
section .text
@OsandaMalith
OsandaMalith / obfuscated.cpp
Last active May 19, 2019 18:10
Obfuscating a String using C++
/??/
* Title: Obfuscating a String using C++
* by @OsandaMalith
*??/
/
??=include <iostream>
??=include <string>
??=include <stdlib.h>
@OsandaMalith
OsandaMalith / obfuscate.sql
Last active July 1, 2016 17:55
SQL Obfuscations
/*! Author: Osanda Malith Jayathissa
* Follow: @OsandaMalith
* Website: http://osandamalith.wordpress.com
*/
# select 1 and 1=1; in obfuscated form
select ('osanda'+'malith')=0 && ~'-2magic' = -'-1';
# select 1 and 1=0; in obfuscated form
@OsandaMalith
OsandaMalith / birthdayp1.cpp
Last active June 15, 2016 20:51
Solution for my birthday crackme part 1 ;)
#include "stdafx.h"
#include <string>
#include <iostream>
#include <fstream>
using namespace std;
unsigned int checksum(unsigned char string[]) {
unsigned int var;