Skip to content

Instantly share code, notes, and snippets.

View lokori's full-sized avatar

Antti Virtanen lokori

View GitHub Profile
@honno
honno / find-crc32.py
Created July 26, 2019 07:15
Multiprocessing bruteforcing script to find a valid CRC32 checksum in a file which quotes said CRC32 value, i.e. a self-referential CRC32.
#!/usr/bin/python3
import logging
import argparse
import sys
import binascii
import multiprocessing as mp
from time import sleep
SLEEP_TIME = 0.1
#version 410 core
uniform float fGlobalTime; // in seconds
uniform vec2 v2Resolution; // viewport resolution (in pixels)
uniform sampler1D texFFT; // towards 0.0 is bass / lower freq, towards 1.0 is higher / treble freq
uniform sampler1D texFFTSmoothed; // this one has longer falloff and less harsh transients
uniform sampler1D texFFTIntegrated; // this is continually increasing
uniform sampler2D texChecker;
uniform sampler2D texNoise;
@woltage
woltage / getdomains.sh
Last active January 18, 2024 12:57
Skripti jolla saa Y-tunnukella kaikki firman omistamat .fi -verkkotunnukset
## Y-Tunnukseen perustuva domainejen haku (.fi)
## Esimerkki: getdomains 1093944-1 # MTV Oy
# Laita tämä .bashrc tai .zshrc
# Käyttöesimerkkejä:
# Looppaa Y-tunnuksetn kaikki domainit läpi ja tee kysely
# for i in $(getdomains 1093944-1); do echo $i && host -t cname www.$i; done
We couldn’t find that file to show.
@headius
headius / meltdown_in_a_nutshell.md
Last active July 27, 2018 13:43
How Meltdown Works

Algorithm

  1. A secret byte you want to read is stored at inaccessible memory location priv_mem.
  2. The sender triggers an access exception by attempting to read priv_mem.
  3. Due to CPU optimization (out-of-order execution), the load of secret from priv_mem and the use of its value in (4) and (5) below may execute before the exception is triggered.
  4. Calculate an offset into a known array probe by multiplying secret by the width of a cache line (or whatever block size the CPU typically fetches, like a 4096-byte page). This guarantees each of those 256 possible offsets will cache separately.
  5. Load probe[offset], which causes the CPU to cache exactly one chunk of of our array, populating one cache line.
  6. The exception finally triggers, clearing the modified registers...but cached data is not excised.
  7. Iterate over all 256 offsets into probe to find out which one loads fast. You've determined the value of secret.
@mgeeky
mgeeky / xml-attacks.md
Last active November 13, 2024 10:21
XML Vulnerabilities and Attacks cheatsheet

XML Vulnerabilities

XML processing modules may be not secure against maliciously constructed data. An attacker could abuse XML features to carry out denial of service attacks, access logical files, generate network connections to other machines, or circumvent firewalls.

The penetration tester running XML tests against application will have to determine which XML parser is in use, and then to what kinds of below listed attacks that parser will be vulnerable.


@noidi
noidi / types.clj
Last active October 15, 2017 17:48
;; I hope this example illustrates why I think the types that Clojure
;; programmers use are hard to represent with the type systems I've seen in
;; other languages. I have only a very superficial knowledge of type theory, so
;; I may well be mixing terms or even spouting complete nonsense. Apologies in
;; advance!
;; Idiomatic Clojure code tends to use very few custom types, and instead
;; represents most data as a composition of built-in types like maps, vectors,
;; and sets. For example, instead of a Person type you might use a map like the
;; following:
@woowa-hsw0
woowa-hsw0 / assume_role.sh
Last active January 11, 2023 11:36
Start AWS CLI Session with MFA Enabled (+Yubikey)
#!/bin/bash
set -eu
umask 0022
if [[ $# -lt 1 ]]; then
echo "Usage: $0 role_name [AWS ACCOUNT NUMBER]" >&2
exit 1
fi
@ian-bartholomew
ian-bartholomew / zap_cli_scan.sh
Last active January 18, 2022 19:48
script to run owasp zap cli
#!/bin/sh
DOCKER=`which docker`
IMAGE='owasp/zap2docker-weekly'
URL='https://www.example.com'
ZAP_API_PORT='8090'
# Start our container
CONTAINER_ID=`$DOCKER run -d \
-p $ZAP_API_PORT:$ZAP_API_PORT \
@anttiviljami
anttiviljami / response.md
Last active December 13, 2018 08:33
Innowise CMS vs. WordPress (annotoitu)

Linkki alkuperäiseen artikkeliin: http://www.innowise.fi/fi/innowise-cms-vs-wordpress/

part1

part2

part3

1)

WordPress tukee out-of-the-box useita erilaisia käyttäjäryhmiä jotka on jaettu eri rooleihin. Pääkäyttäjän rooli on tarkoitettu sivuston tekniselle ylläpitäjälle, kun taas roolien Päätoimittaja, Kirjoittaja ja Avustaja ylläpitonäkymät on karsittu vähemmän teknisille ylläpitäjille sopiviksi. WordPressin rooleilla voi myös rajoittaa eri ryhmien käyttöoikeuksia esimerkiksi antamalla Avustaja-roolin vain muokata sivuja, muttei julkaista niitä ilman Päätoimittajan tai Pääkäyttäjän lupaa.