Skip to content

Instantly share code, notes, and snippets.

View izdiwho's full-sized avatar
🌟
I like starring things

Iz izdiwho

🌟
I like starring things
View GitHub Profile
@moonbingbing
moonbingbing / xor.py
Created August 23, 2012 05:31
python string xor sample
#!/usr/bin/python
# -*- coding: utf-8 -*-
import itertools
def xor(s, key):
key = key * (len(s) / len(key) + 1)
return ''.join(chr(ord(x) ^ ord(y)) for (x,y) in itertools.izip(s, key))
if __name__ == "__main__":
@jaredhaight
jaredhaight / Split-String.ps1
Last active November 7, 2018 14:17
PowerShell script to split a string into arbitrary sizes, formatting the string for use in C# or PowerShell
function Split-String {
param (
[Parameter(Mandatory = $true)]
[string]$String,
[int]$MinLength = 50,
[int]$MaxLength = 120,
[string]$VariableName = "data",
[ValidateSet("PowerShell", "CSharp")]
$Format = "PowerShell"
)
@isc30
isc30 / install.bash
Last active January 27, 2021 10:38
Raspberry Pi Install PHP7 + Nginx + MySQL + PhpMyAdmin (last versions)
#!/bin/bash
# Thanks to https://gist.github.com/Lewiscowles1986/ce14296e3f5222082dbaa088ca1954f7
if [ "$(whoami)" != "root" ]; then
echo "Run script as ROOT please. (sudo !!)"
exit
fi
echo "deb http://mirrordirector.raspbian.org/raspbian/ stretch main contrib non-free rpi" > /etc/apt/sources.list.d/stretch.list
echo "APT::Default-Release \"jessie\";" > /etc/apt/apt.conf.d/99-default-release
@valeryan
valeryan / WindowsSetup.md
Last active May 4, 2021 09:25
Local WSL Setup

Deprecated in favor of Valet Wiki Page

I set up the wiki page for the valet-wsl project and moved the install guide there. This way it can have user contributions. Please have all disscussions or issues under the valet-wsl project so I can be aware of it. Please go to Valet Wsl Installation Guide

@keerok
keerok / README.md
Last active October 17, 2021 14:51
client-side prototype pollution gadget using cross-origin embedded reddit posts
# This idea originated from this blog post on Invoke DSC Resources directly:
# https://blogs.msdn.microsoft.com/powershell/2015/02/27/invoking-powershell-dsc-resources-directly/
<#
$MOFContents = @'
instance of MSFT_ScriptResource as $MSFT_ScriptResource1ref
{
ResourceID = "[Script]ScriptExample";
GetScript = "\"$(Get-Date): I am being GET\" | Out-File C:\\Windows\\Temp\\ScriptRun.txt -Append; return $True";
TestScript = "\"$(Get-Date): I am being TESTED\" | Out-File C:\\Windows\\Temp\\ScriptRun.txt -Append; return $True";
@mackwage
mackwage / disable_ddeauto.reg
Created October 20, 2017 15:35 — forked from wdormann/disable_ddeauto.reg
Disable DDEAUTO for Outlook, Word, and Excel versions 2010, 2013, 2016
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Word\Options]
"DontUpdateLinks"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Word\Options]
"DontUpdateLinks"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Word\Options]
"DontUpdateLinks"=dword:00000001
@mrik23
mrik23 / Test-LeakedPasswordHIBP.ps1
Last active August 3, 2022 20:28
PowerShell script to check password against leaked password database from https://haveibeenpwned.com/ using the Pwned Passwords V2 API. Only the first 5 characters of the password string hash is checked against the API (k-anonymity). More info on the HIBP API at https://www.troyhunt.com/ive-just-launched-pwned-passwords-version-2/.
#requires -version 4
<#
.SYNOPSIS
Check password against leaked password database from https://haveibeenpwned.com/ using the Pwned Passwords V2 API https://api.pwnedpasswords.com/range/<hashPrefix>.
.DESCRIPTION
Only the first 5 characters of the password string hash is checked against the API (k-anonymity). The API returns a list of all passwords matching the hash prefix, then the script checks if the suffix is present or not.
@devanshbatham
devanshbatham / sslextract.py
Created November 9, 2020 10:57
sslExtract : Extract DNS records from IP addresses
#!/usr/bin/env python
from multiprocessing.pool import ThreadPool
from time import time as timer
from urllib.request import urlopen
import sys
import re
import os.path
start = timer()
@cballenar
cballenar / lemp-provision.sh
Last active February 2, 2023 04:42
LEMP Provisioning script based on Laravel Forge. Generated on 2020-04-26.
# LEMP Provisioning Script
# - Script generated by Laravel Forge on 20200426
# - Built for Ubuntu 18.04LTS, PHP7.2, MySQL5.7
# Variables
#-------------------------------------------------------------------------------
my_hostname="" # mydomain
my_username="" # myuser
my_root_pw="" # ****************
my_sshkey="" # ssh-rsa AAAA...