Skip to content

Instantly share code, notes, and snippets.

@aras-p
aras-p / preprocessor_fun.h
Last active July 16, 2024 02:50
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@garrettdreyfus
garrettdreyfus / yesOrNo.py
Last active July 22, 2024 13:03
Dead simple python function for getting a yes or no answer.
def yes_or_no(question):
reply = str(raw_input(question+' (y/n): ')).lower().strip()
if reply[0] == 'y':
return True
if reply[0] == 'n':
return False
else:
return yes_or_no("Uhhhh... please enter ")
#!/usr/bin/python
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
@kylefrost
kylefrost / HOWTO.md
Last active July 31, 2021 19:24
How-To: Tweet All Commit Messages

Creating the post-commit file

Note: If you want to use your personal Twitter account to post commits, go to Step 2

  1. Create a new Twitter account for your commit messages. Example
  2. Go to http://dev.twitter.com and Sign In with your Twitter account you are posting commit messages to.
  3. Hover over your username in the top-right corner after signing in and select "My Applications"
  4. Create a new application
  5. The name, description, and site can all be whatever you want, but leave Callback URL empty
  6. Under "Application Settings" click "modify app permissions" next to "Access level"
@jedisct1
jedisct1 / blacklist.txt
Created August 6, 2014 23:35
2500+ IP malicious IP addresses
2500+ IP addresses dedicated to serving malware.
1.168.33.91
103.12.217.155
103.242.11.1
103.242.11.94
103.243.51.129
103.253.141.43
103.255.101.168
@grugq
grugq / gist:03167bed45e774551155
Last active April 6, 2024 10:12
operational pgp - draft

Operational PGP

This is a guide on how to email securely.

There are many guides on how to install and use PGP to encrypt email. This is not one of them. This is a guide on secure communication using email with PGP encryption. If you are not familiar with PGP, please read another guide first. If you are comfortable using PGP to encrypt and decrypt emails, this guide will raise your security to the next level.

#!/usr/bin/env python2
#
# CVE-2014-6271 reverse shell
#
# Same as all the others, just showing off some pwntools.
#
# Usage:
# python shell.py http://host/cgi-bin/script.sh
# python shell.py http://host/cgi-bin/script.sh PORT=12345
#
@HockeyInJune
HockeyInJune / Security Education.md
Last active April 12, 2020 14:52
Security Education

Accredited Universities

Full Online Courses

<#----------------------------------------------------------------------------------------------------
Release Notes:
v1.4:
Author: Jared Poeppelman, Microsoft
First version published on TechNet Script Gallery
----------------------------------------------------------------------------------------------------#>
function Test-Command
{
@thejh
thejh / idatfix.c
Last active August 29, 2015 14:19
idatfix - solution of fluxfingers for that png forensics challenge at pctf
#define _GNU_SOURCE
#include <jh.h>
#include <string.h>
#include <arpa/inet.h>
#include <assert.h>
#include <fcntl.h>
/* Table of CRCs of all 8-bit messages. */
unsigned long crc_table[256];