Skip to content

Instantly share code, notes, and snippets.

Paweł Łukasik pawlos

Block or report user

Report or block pawlos

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View b.c
#include <stdio.h>
int main(void) {
printf("Hello from b\n");
return 0;
}
View a.c
#include <stdio.h>
#include <unistd.h>
int main(void) {
execv("./b", NULL);
return 0;
}
View Program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp2
{
class Program
{
@pawlos
pawlos / Program.cs
Created May 19, 2018
C# program for decoding encrypted database
View Program.cs
using System;
using System.IO;
using System.Security.Cryptography;
namespace ConsoleApp1
{
class Program
{
private static string GeneratePassword(DateTime dt) => ((int)dt.Subtract(new DateTime(1970, 1, 1)).TotalSeconds).ToString();
@pawlos
pawlos / brute.py
Created Apr 9, 2018
Bruteforcing a xor key char
View brute.py
import sys
import string
data = 'e7225ea6c31ec63e843f53e3da21e104c5611c80c82cea02e7225ea6c31dea13d12955b7c819e604cc165da0d927e115e83e5db1df27e117855b'.decode('hex')
data = bytearray(data)
deciphered = ['Cy',' d','a:','Cy','ur','hM','Le','!\x00']
@pawlos
pawlos / test.py
Created Apr 9, 2018
Testing a known char as a part of decrypt key
View test.py
import sys
import string
data = 'e7225ea6c31ec63e843f53e3da21e104c5611c80c82cea02e7225ea6c31dea13d12955b7c819e604cc165da0d927e115e83e5db1df27e117855b'.decode('hex')
data = bytearray(data)
chrset = string.ascii_lowercase+string.digits+string.ascii_uppercase+'!'+'\x00'+':'+' '+'_'+'@'
ofs = 0
i = 0xa4
@pawlos
pawlos / find.py
Created Apr 1, 2018
Trying to find block of bytes that will construct a valid SpyCoin block
View find.py
#!/usr/bin/python
import struct
import hashlib
import itertools
def verify_block(hash):
# Difficulty history:
# We increased difficulty starting from block 52, have to match "Spy".
# We increased difficulty starting from block 138, have to match "SpyCoinXoXo".
@pawlos
pawlos / construct.py
Created Apr 1, 2018
Creating a fake Spycoin chain
View construct.py
#!/bin/python
import hashlib
import struct
import itertools
#functions from original file
def verify_block(hash, block_num):
# Difficulty history:
@pawlos
pawlos / convert.py
Created Mar 30, 2018
removing the transparent from the PNG image
View convert.py
from PIL import Image
png = Image.open('something_suspicious.png')
background = Image.new("RGB", png.size, (0, 0, 0))
background.paste(png)
background.save('foo.png')
@pawlos
pawlos / WADParser.py
Created Mar 1, 2018 — forked from jasonsperske/MIT-LICENSE
A simple Python program that can read DOOM.Hexen IWAD and PWAD files and render them as SVG see examples at http://jason.sperske.com/wad/
View WADParser.py
#!/usr/bin/env python3
import struct
import re
class Wad(object):
"""Encapsulates the data found inside a WAD file"""
def __init__(self, wadFile):
"""Each WAD files contains definitions for global attributes as well as map level attributes"""
You can’t perform that action at this time.