Skip to content

Instantly share code, notes, and snippets.

@carlospolop
carlospolop / macos-xpc-authorization-rights-down.py
Created September 20, 2023 23:02
Down load all macos xpc authorization rights and get the interesting ones
import requests
from bs4 import BeautifulSoup
import json
import re
BASE_URL = "https://www.dssw.co.uk/reference/authorization-rights/"
def get_rights_links():
response = requests.get(BASE_URL)
soup = BeautifulSoup(response.content, 'html.parser')
@carlospolop
carlospolop / machoreader.py
Created July 6, 2023 16:10
Print information about a macho binary using python
import plistlib
import struct
import logging
import lief
import sys
from typing import List
from macholib import MachO, mach_o
logger = logging.getLogger(__name__)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@carlospolop
carlospolop / ps1.bash
Last active June 28, 2022 14:13
Prompt with CPU&RAM info, jobstatus, last command, user, hostname, current path & several useful aliases
# System-wide .bashrc file for interactive bash(1) shells.
# To enable the settings / commands in this file for login shells as well,
# this file has to be sourced in /etc/profile.
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
@carlospolop
carlospolop / Check-RCEcommands.php
Last active March 29, 2019 22:56
Check if any function to execute commands (REC) in PHP is available
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
echo "Hello! Trying to execute commands...";
echo "<br>";
if (function_exists('exec')){ exec("echo exec"); echo "<br>";}
if (function_exists('passthru')){ passthru("echo passthru"); echo "<br>";}
if (function_exists('shell_exec')){ shell_exec("echo shell_exec"); echo "<br>";}