Skip to content

Instantly share code, notes, and snippets.

@iomoath
iomoath / generate-persistent-net-rules.sh
Created February 9, 2024 21:12 — forked from drbild/generate-persistent-net-rules.sh
Generate udev rules for persistent interface names by bus path, not mac address
#!/bin/sh -e
# Copyright (C) 2006 Marco d'Itri <md@Linux.IT>
# Copyright (C) 2007 Kay Sievers <kay.sievers@vrfy.org>
# Copyright (C) 2018 David R. Bild <david.bild@xaptum.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IIS\Parameters]
"EnableHttp2"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IIS\Parameters]
"EnableHttp2Cleartext"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319]
"SystemDefaultTlsVersions"=dword:00000001
@iomoath
iomoath / frida_multiple_unpinning.js
Created December 28, 2023 12:27 — forked from akabe1/frida_multiple_unpinning.js
Another Android ssl certificate pinning bypass for various methods
/* Android ssl certificate pinning bypass script for various methods
by Maurizio Siddu
Run with:
frida -U -f <APP_ID> -l frida_multiple_unpinning.js [--no-pause]
*/
setTimeout(function() {
Java.perform(function() {
console.log('');
@iomoath
iomoath / windows_hardening.cmd
Created October 9, 2023 06:53 — forked from ricardojba/windows_hardening.cmd
A Windows hardening script
::##########################################################################################################################
::
:: This script can ruin your day, if you run it without fully understanding what it does, you don't know what you are doing,
::
:: OR BOTH!!!
::
:: YOU HAVE BEEN WARNED!!!!!!!!!!
::
:: This script is provided "AS IS" with no warranties, and confers no rights.
:: Feel free to challenge me, disagree with me, or tell me I'm completely nuts in the comments section,
# Ask for elevated permissions if required
If (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]"Administrator")) {
Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs
Exit
}
# Disable Telemetry
Write-Host "Disabling Telemetry..."
Set-ItemProperty -Path "HKLM:\Software\Policies\Microsoft\Windows\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 0
@iomoath
iomoath / reclaim.ps1
Created October 2, 2023 10:38
reclaim.ps1
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <disassembler@dasm.cz>
# Modified by: alirobe <alirobe@alirobe.com> based on my personal preferences.
# Version: 2.20.2, 2018-09-14
# Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
# Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/
# Tweak difference:
#
# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ...
@iomoath
iomoath / Blog: Installing Docker.md
Last active August 2, 2023 21:10 — forked from Jaykul/Blog: Installing Docker.md
Docker in PowerShell on Windows 10 - UPDATED Install-Docker.ps1 2023

Using Docker on Windows 10 (Updated at the end of 2019)

Since I wrote this originally, Docker on Windows has become a first-class supported tool, with a Windows Installer and well-documented installation processes from docker and from Microsoft.

Today, I actually install docker using boxstarter scripts where I can Enable-WindowsOptionalFeature -Online -FeatureName containers -All and then choco upgrade -y docker-desktop as well as installing tooling for VS Code code --install-extension "ms-azuretools.vscode-docker".

I've left the rest of these notes here as a historical record, more than anything else. You should not expect the script below to work, but you certainly don

@iomoath
iomoath / Woeid
Created July 5, 2023 17:48 — forked from tedyblood/Woeid
Woeid Used in Twitter for load trend by country. Standar for Yahoo
[
{
"name": "Worldwide",
"placeType": {
"code": 19,
"name": "Supername"
},
"url": "http://where.yahooapis.com/v1/place/1",
"parentid": 0,
"country": "",
# see: https://github.com/client9/snowflake2time/
def snowflake2millis(snowflake_id):
"""
Get millisecond timestamp from snowflake ID.
"""
return (snowflake_id >> 22) + 1288834974657
def millis2snowflake(ms):