Skip to content

Instantly share code, notes, and snippets.

@daddycocoaman
daddycocoaman / cups-browsed.md
Created September 26, 2024 20:10 — forked from stong/cups-browsed.md
CUPS disclosure leaked online. Not my report. The original author is @evilsocket

Original report

  • Affected Vendor: OpenPrinting
  • Affected Product: Several components of the CUPS printing system: cups-browsed, libppd, libcupsfilters and cups-filters.
  • Affected Version: All versions <= 2.0.1 (latest release) and master.
  • Significant ICS/OT impact? no
  • Reporter: Simone Margaritelli [[email protected]]
  • Vendor contacted? yes The vendor has been notified trough Github Advisories and all bugs have been confirmed:
@daddycocoaman
daddycocoaman / shellcodeload.py
Created November 30, 2022 21:15
Python shellcode load
import ctypes
from pathlib import Path
shellcode = bytearray(Path("shellcode.bin").read_bytes())
kernel32 = ctypes.windll.kernel32
kernel32.VirtualAlloc.restype = ctypes.c_void_p
kernel32.RtlMoveMemory.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_size_t]
@daddycocoaman
daddycocoaman / pyfi.py
Last active September 29, 2022 16:11
Getting Wi-Fi SSIDs and passwords on Windows
import xml.etree.ElementTree as ET
from ctypes import Structure, pointer, windll, wintypes
# https://learn.microsoft.com/en-us/windows/win32/api/guiddef/ns-guiddef-guid
class GUID(Structure):
_fields_ = [
("Data1", wintypes.DWORD),
("Data2", wintypes.WORD),
("Data3", wintypes.WORD),
("Data4", wintypes.BYTE * 8),
@daddycocoaman
daddycocoaman / radiolist.py
Created February 6, 2021 18:13
Custom Prompt-Toolkit Radio List
# Customized from https://github.com/prompt-toolkit/python-prompt-toolkit/blob/master/prompt_toolkit/widgets/base.py
from typing import Generic, Sequence, Tuple, TypeVar
from prompt_toolkit.application import get_app
from prompt_toolkit.filters import Condition
from prompt_toolkit.formatted_text import (
AnyFormattedText,
StyleAndTextTuples,
to_formatted_text,
)
@daddycocoaman
daddycocoaman / param_inherit.py
Created November 19, 2020 17:53
Function Parameter Inheritance
# Don't actually use this. Why would you use this? Seriously, don't use it, fam.
import inspect
from types import FunctionType
from typing import Callable
def param_inherit(inherited_func: Callable):
"""Allows function to inherit the parameters of another function"""
def decorator(func: Callable):
@daddycocoaman
daddycocoaman / pydefendercheck.py
Last active July 2, 2023 22:13
PyDefenderCheck
##################################################
## PyDefenderCheck - Python implementation of DefenderCheck
##################################################
## Author: daddycocoaman
## Based on: https://github.com/matterpreter/DefenderCheck
##################################################
import argparse
import enum
@daddycocoaman
daddycocoaman / cnameenum.py
Last active August 10, 2021 17:17
Async CNAME Enumeration (WIP)
import asyncio
import aiodns
import aiofiles
import aiohttp
from colorama import Fore
from dataclasses import field, dataclass
from pycares import ares_query_cname_result
from concurrent.futures import ThreadPoolExecutor
import sys
import re
@daddycocoaman
daddycocoaman / Windows98.boo
Created September 19, 2019 17:34
Because netCAT exists
/* Opens 98 Windows!
Author: Daddycocoaman */
import System.Windows.Forms
for i in range(0, 98):
MessageBox.Show("Windows ${i + 1}!", "MalWARE")
@daddycocoaman
daddycocoaman / TELLnet.boo
Created September 19, 2019 17:33
Because netCAT exists
/* Pings all of your available networks and tells your net that you're snitching
Author: Daddycocoaman */
import System
import System.Net.NetworkInformation
import System.Net
import System.Net.Sockets
import System.Text
BUFFER = ASCIIEncoding().GetBytes("IMSNITCHINGONALLYALLCAUSEMALWARE")
@daddycocoaman
daddycocoaman / SOcat.boo
Created September 19, 2019 17:32
Because netCAT exists.
/* Creates a "uncloseable" form window with an ASCII cat. It's SO Cat!
Author: Daddycocoaman */
import System.Windows.Forms
import System.Drawing
SOCAT = """
|\__/,| (`\
|o o |__ _)
_.( T ) ` /