Skip to content

Instantly share code, notes, and snippets.

View tsundokul's full-sized avatar
🟣
Such wow

tsundokul

🟣
Such wow
View GitHub Profile
@tsundokul
tsundokul / ruby_string_splitter.rb
Last active November 19, 2018 09:40
If you need to split a string to multiple lines within a Ruby script, this method will wrap it to a maximum line length (typically 80 characters)
#!/usr/bin/env ruby
# initial_indent: the offset after the equals sign for the first line of string
# add_indent: the offset used for the rest of the lines (say you have the string within an indented method)
def code_split(orig_s, initial_indent=0, add_indent=0, max_len=80)
# Simple chech before getting the work done
if (add_indent + 5) > max_len
raise "Not enough space left for lines."
end
@tsundokul
tsundokul / wordpress_plugin_downloader.py
Last active July 3, 2019 12:34
Script that downloads the most popular WordPress plugins
#!/usr/bin/env python3
import requests
from lxml import html
# Make sure you have a directory named wp_plugins/ in the cwd
def get_links(url):
page = requests.get(url)
@tsundokul
tsundokul / attach_gmail.py
Created December 9, 2018 21:19
The script downloads gmail attachments to a SFTP location. -h for more details.
#!/usr/bin/env python3
# First install the required modules (Python 3)
# pip3 install paramiko eml-parser
import base64
import email
import getpass
import imaplib
import os
import paramiko
import re
@tsundokul
tsundokul / linked-list.c
Created February 1, 2019 10:27
Double linked list implementation for leetcode 707. Design Linked List
typedef struct Node Node;
struct Node {
int val;
Node* prev;
Node* next;
};
typedef struct {

Keybase proof

I hereby claim:

  • I am tsundokul on github.
  • I am tim17d (https://keybase.io/tim17d) on keybase.
  • I have a public key whose fingerprint is 5CC8 327E E74D 0D3D 3AD8 4B96 A3A2 C1C2 5760 4FB5

To claim this, I am signing this object:

t a a bt
call (void) close(1)
call (void) close(2)
shell tty
call (int) open("/dev/pts/0", 2, 0)
call (int) open("/dev/pts/0", 2, 0)
call (void) rb_backtrace()
@tsundokul
tsundokul / Dockerfile
Last active January 26, 2020 10:20
ODAT: Oracle Database Attacking Tool Dockerfile updated [Jan 26, 2020]
# See https://github.com/quentinhardy/odat
# Download Oracle rpms from https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html
FROM debian:stretch
SHELL ["/bin/bash", "-cl"]
# Reduce output from debconf
env DEBIAN_FRONTEND noninteractive
# Install python-dev, alien and libaio1 package (for sqlplus) and some python libraries
RUN apt-get update && apt-get install -y --no-install-recommends apt-utils git wget libaio1 alien build-essential dpkg-dev python3-dev python3-setuptools python3-pip ca-certificates
@tsundokul
tsundokul / CVE-2020-1938.py
Last active March 2, 2020 10:40
pwntools-based CVE-2020-1938 (Ghostcat) PoC
#!/usr/bin/env python3
# Usage python ./ajp.py <include_path>
import struct
from pwn import *
from sys import argv
context.log_level = logging.DEBUG
@tsundokul
tsundokul / openssl.ld
Created June 13, 2020 09:46 — forked from bviews/openssl.ld
openssl.ld for OPENSSL_1.0.2l
OPENSSL_1.0.0 {
global:
BIO_f_ssl;
BIO_new_buffer_ssl_connect;
BIO_new_ssl;
BIO_new_ssl_connect;
BIO_proxy_ssl_copy_session_id;
BIO_ssl_copy_session_id;
BIO_ssl_shutdown;
d2i_SSL_SESSION;
@tsundokul
tsundokul / bspwmrc.sh
Created October 4, 2020 08:11
bspwm and polybar config
#!/bin/bash
. $HOME/.bashrc
# Check if second monitor is connected and set
# $_SCR1 and $_SCR2 variables
. $HOME/scripts/setscreen.sh
## BSPWM configuration
# Set desktop names