Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Panos Sakkos le4ker

🎯
Focusing
View GitHub Profile
@le4ker
le4ker / parent.html
Created Sep 16, 2019
Embed Blocktopus to a Token Sale landing page
View parent.html
<html>
<body>
<script>
// The following Javascript resizes the iframe's height when Blocktopus' embeded page's height changes
window.addEventListener("message", receiveMessage, false);
function receiveMessage(event) {
if (event.data.event_id == 'blocktopus_height') {
iframe = document.getElementById("blocktopus_iframe");
iframe.height = event.data.value + "px";
@le4ker
le4ker / embed-blocktopus-sign-in.html
Last active Sep 6, 2019
Blocktopus embed iframe for signing-in to third-party service
View embed-blocktopus-sign-in.html
<html>
<body>
<script>
window.addEventListener("message", receiveMessage, false);
function receiveMessage(event) {
if (event.data.event_id == 'blocktopus_height') {
iframe = document.getElementById("blocktopus_iframe");
iframe.height = event.data.value + "px";
View ecs-certbot-renew.sh
# sudo rm -rf /opt/eff.org
#cd /opt/letsencrypt
#sudo ./letsencrypt-auto renew --standalone --debug
sudo rm -rf /opt/eff.org/*
sudo pip install -U certbot
sudo /usr/local/bin/certbot renew --standalone --debug --preferred-challenges http-01,dns-01
# https://community.letsencrypt.org/t/upcoming-tls-sni-deprecation-in-certbot/76383
View nginx-certbot
server {
listen 80;
server_name etherize.io;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
View ecs-certbot.sh
# https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/SSL-on-amazon-linux-2.html#letsencrypt
sudo yum install wget -y
sudo wget -r --no-parent -A 'epel-release-*.rpm' http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/
sudo rpm -Uvh dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-*.rpm
sudo yum-config-manager --enable epel*
sudo yum install -y certbot python2-certbot-apache
sudo certbot certonly --standalone --debug
View cbc-bit-flipping.rb
# # # # # # # # # # # # # # # # # # # # # # # # # #
# Demonstration of CBC Bit Flipping Attack #
# Author: Panos Sakkos <panos.sakkos@gmail.com> #
# Date: October 2017 #
# License: MIT #
# # # # # # # # # # # # # # # # # # # # # # # # # #
require 'openssl'
class UnauthenticatedEncryption
@le4ker
le4ker / padding-oracle-attack.rb
Last active Aug 24, 2018
A demonstration of Padding Oracle Attack
View padding-oracle-attack.rb
# # # # # # # # # # # # # # # # # # # # # # # # #
# Demonstration of Padding Oracle Attack #
# Author: Panos Sakkos <panos.sakkos@gmail.com> #
# Date: May 2017 #
# License: MIT #
# # # # # # # # # # # # # # # # # # # # # # # # #
require 'openssl'
class PaddingOracle
@le4ker
le4ker / length-extension-attack.rb
Last active May 21, 2017
A demonstration of length extention attack
View length-extension-attack.rb
# # #
# /17/sha-256.rb
# (c) 2010 Jan Lelis <mail@janlelis.de>. MIT License.
# See: http://ruby.janlelis.de/17-sha-256
#
# May 2017, Modified by Panos Sakkos to demonstrate Length Extension Attack
# - Refactored so the initialization vector and message length can be injected.
# - Added example of length extension attack
# # #
@le4ker
le4ker / B8745955.asc
Last active Jul 27, 2018
panos.sakkos@etherize.io
View B8745955.asc
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFtbJegBEACjlZEmw+ryId5XPgqHq2q7EjoaU2xSYJURPLm5by0OqWVm6rxI
gS3l4G6/rdcX7DESElRKHCYGg+9r+GmyDCM15SMK/LkG2lKnC48qogWHsgVcb7u0
JlyAx2SCwnMFG+ndYj+ytYiSix9YY8uvq1TjLCqNQtZcAbkaAEVZ2SUZiwgQxCxt
ynRZd4v/v6WECgR6fE4uDNQnQ9mTS/gnhlEZR0vQs4YAELbK8sDLz7AETGV1Ajvo
Y5x1jlQ4fZ+S4j52/L5+3YysZ5jIXgctS5tk35erODhDO3tsC/vW+35QgJniZiG1
mwpJVTylCTsb2sgJkXrDCuQUm0B8q8emIBOwAXLxlMRqfoTX4NVyVsNBAxE0AC2L
iKFV/L7Yl/SuBS08VBY9x5lLf5RSnPQLGX4LebRHyqWaE8sO9VV+Brf/fXlRWnRH
iTyWOUoXELPh+yFX/Qcd+qS30J3KY6rYyScQ8/kjWW0fuIh0q4BxDLYgT0h+sjlG
@le4ker
le4ker / exe_from_mm
Last active May 28, 2017
Get absolute executable process path in Linux kernel
View exe_from_mm
#include <linux/err.h>
char *exe_from_mm(const struct mm_struct *mm, char *buffer, int length)
{
char *p = NULL;
struct vm_area_struct *vma;
if(mm == NULL)
{
return NULL;
You can’t perform that action at this time.