Skip to content

Instantly share code, notes, and snippets.

View SavSanta's full-sized avatar
😉
No Use Being Food in Mouth of The Beast

Ru Uba SavSanta

😉
No Use Being Food in Mouth of The Beast
  • DCMDVA ;'(
  • 03:30 (UTC -04:00)
View GitHub Profile
@thatrand0mnpc
thatrand0mnpc / custom_traceback_example.py
Last active August 1, 2022 21:22
Python custom traceback
import linecache
import re
import sys
from types import TracebackType
from typing import Any, Dict, List, Optional
PACKAGE_PATH_PATTERN = r'.*/lib/python.*/site-packages/.*'
class TracebackLogger:
@SkyyySi
SkyyySi / youtube-vanced-alternatives.md
Last active April 2, 2024 08:21
A list of alternatives after the shutdown of Vanced

NONE OF THESE CLIENTS ARE VERIFIED BY ME FOR SECURITY OR ANYTHING ELSE! USE AT YOUR OWN RISK!

These are the current alternatives (with links when possible):

@ceramicskate0
ceramicskate0 / rsrcDecryptAssembly.nim
Created January 7, 2022 03:36 — forked from ChoiSG/rsrcDecryptAssembly.nim
embed .net, decrypt, load and execute in nim poc
import nimcrypto
import winim/clr except `[]` # https://s3cur3th1ssh1t.github.io/Playing-with-OffensiveNim/ <-- thank you so much, 2 hours googling I almost went crazy
#[
All credit goes to @byt3bl33d3r (OffensiveNim) and @s3cur3th1ssh1t
nimble install winim nimcrypto zippy
nim c -d:danger -d:strip --opt:size rsrcDecryptAssembly.nim
slurp = "staticRead" will read the file and store it in the variable (.rdata) on compile time.
@dmitriiweb
dmitriiweb / bs_vs_lxml.py
Last active March 13, 2024 02:22
BeautifulSoup vs lxml
from datetime import datetime
from datetime import datetime
import requests
from bs4 import BeautifulSoup as BSoup
from lxml import html
def get_html():
url = 'https://en.wikipedia.org/wiki/List_of_states_and_territories_of_the_United_States'
@curi0usJack
curi0usJack / .htaccess
Last active March 13, 2024 10:17
FYI THIS IS NO LONGER AN .HTACCESS FILE. SEE COMMENTS BELOW. DON'T WORRY, IT'S STILL EASY.
#
# TO-DO: set |DESTINATIONURL| below to be whatever you want e.g. www.google.com. Do not include "http(s)://" as a prefix. All matching requests will be sent to that url. Thanks @Meatballs__!
#
# Note this version requires Apache 2.4+
#
# Save this file into something like /etc/apache2/redirect.rules.
# Then in your site's apache conf file (in /etc/apache2/sites-avaiable/), put this statement somewhere near the bottom
#
# Include /etc/apache2/redirect.rules
#
@Framartin
Framartin / esprima_node_generator.py
Last active June 10, 2022 13:52
Generator to browse all the nodes of an Esprima Tree
def node_generator(node):
"""
Generator that takes an Esprima object (or a Esprima node) from the esprima
module converted as a dict, and outputs all child nodes at any level of the
tree. It's useful to browse the entire tree.
Subnodes are generated by browsing all the keys. It's not the most
optimized way to browse the tree, because some keys will never contains
child nodes. But it's very simple, and you're sure to not miss any subnodes.
"""
if node: # not empty dict or list
@mattifestation
mattifestation / CIPolicyParser.ps1
Last active March 13, 2024 19:48
Functions to recover information from binary Windows Defender Application Control (WDAC) Code Integrity policies.
# Ensure System.Security assembly is loaded.
Add-Type -AssemblyName System.Security
function ConvertTo-CIPolicy {
<#
.SYNOPSIS
Converts a binary file that contains a Code Integrity policy into XML format.
Author: Matthew Graeber (@mattifestation)
@HarmJ0y
HarmJ0y / keepass2john.py
Created June 30, 2016 06:02
Python port of John the Ripper's keepass2john - extracts a HashCat/john crackable hash from KeePass 1.x/2.X databases
#!/usr/bin/python
# Python port of keepass2john from the John the Ripper suite (http://www.openwall.com/john/)
# ./keepass2john.c was written by Dhiru Kholia <dhiru.kholia at gmail.com> in March of 2012
# ./keepass2john.c was released under the GNU General Public License
# source keepass2john.c source code from: http://fossies.org/linux/john/src/keepass2john.c
#
# Python port by @harmj0y, GNU General Public License
#
0</*! ::
@echo off
echo:Hello, batch!
cscript //nologo //e:jscript "%~f0" %*
echo:Hello, batch again!
goto :EOF
@trendels
trendels / rsync_daemon_over_ssh.md
Last active November 13, 2023 03:26
Rsync daemon mode over ssh

rsync daemon mode over ssh

There are several common ways to do rsync backups of hosts over ssh:

  1. As a non-root user. Upsides: very secure. Downside: cannot back up sensitive files.
  2. As root, with a public key. Downsides: Whoever has the private key has full root access to the host being backed up.
  3. As root, with a public key and a "forced command". Upsides: Restricts access to the server. Downsides: Requires either careful matching of rsync options (which might change over time), or "validator" scripts. Neither idea sounds very appealing to me.
  4. Running rsync in daemon mode on the host being backed up. Upsides: Lots of useful options, like read-only mode, running as a different user if required, server-side excludes/includes, etc. Downsides: Opens up a TCP port that has full filesystem read access and is hard to secure (Ideally you could make the rsync daemon use a unix socket instead, that could be secured by filesystem permissions, but I haven't found a way to do that).

Here is another option t