Skip to content

Instantly share code, notes, and snippets.

@Securityinbits
Securityinbits / adaptix_config_extractor.py
Created September 20, 2025 04:28
AdaptixC2 config extractor from Unit42
# This code was copied from Unit42 Blog
# Source: https://unit42.paloaltonetworks.com/adaptixc2-post-exploitation-framework/
import json
import struct
import sys
from typing import Any, Dict
from malduck import enhex, int32, procmempe, rc4
@vkosuri
vkosuri / build_oqs_provider.sh
Last active April 23, 2025 17:06
Integrating OpenSSL with OQS Providers for Enhanced Quantum-Safe Security
#!/bin/bash
# Enable error handling
# set -x
# Set up environment and variables
INSTALLDIR_OPENSSL="/opt/ossl32" # openssl3.2
INSTALLDIR_LIBOQS="/opt/liboqs"
INSTALLDIR_PROVIDER="/opt/oqs-provider"
LIBOQS_BUILD_DEFINES="ON"
@nanmu42
nanmu42 / isPrivateIP.go
Created January 19, 2021 02:19
Golang: check if IP address is private
// source: https://stackoverflow.com/questions/41240761/check-if-ip-address-is-in-private-network-space
var privateIPBlocks []*net.IPNet
func init() {
for _, cidr := range []string{
"127.0.0.0/8", // IPv4 loopback
"10.0.0.0/8", // RFC1918
"172.16.0.0/12", // RFC1918
"192.168.0.0/16", // RFC1918
"169.254.0.0/16", // RFC3927 link-local
@dannguyen
dannguyen / fetch_ghstars.md
Last active April 8, 2026 19:46
fetch_ghstars.py: quick CLI script to fetch from Github API all of a user's starred repos and save it as raw JSON and wrangled CSV

fetch_ghstars.py: quick CLI script to fetch and collate from Github API all of a user's starred repos

  • Requires Python 3.6+
  • Creates a subdir 'ghstars-USERNAME' at the current working directory
  • the raw JSON of each page request is saved as: 01.json, 02.json 0n.json
  • A flattened, filtered CSV is also created: wrangled.csv

Example usage:

Param(
[Parameter(Mandatory = $true)]
[string] $ResourceGroupName,
[Parameter(Mandatory = $true)]
[string] $AppServiceName,
[Parameter(Mandatory = $true)]
[string] $SubscriptionId,
[Parameter(Mandatory = $true)]
[string] $RulePriority
)
@rhuancarlos
rhuancarlos / sources.list
Created October 5, 2018 03:22
Ubuntu 18.04 Bionic default /etc/apt/sources.list
#deb cdrom:[Ubuntu 18.04 LTS _Bionic Beaver_ - Release amd64 (20180426)]/ bionic main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
@doomedraven
doomedraven / kvm-qemu.sh
Last active May 28, 2020 07:19
Linux - KVM + QEMU installer from sources :)
Moved to https://github.com/doomedraven/Tools/blob/master/Virtualization/kvm-qemu.sh
package main
import (
"context"
"fmt"
"net"
"os/exec"
"strconv"
"strings"
"sync"
<?php
/*
Plugin Name: GF file upload to ACF image field
Plugin URI: https://gist.github.com/certainlyakey/8c19791b3133beb62d323bf060bf4270
Description: Map Gravity forms file upload field to ACF image/file field so GF would upload the file and save id to DB instead of URL.
Version: 1.0.0
Author: Kellen Mace
*/
@cwilhit
cwilhit / DockerScrape.ps1
Last active June 2, 2021 17:46
Scrapes over dockerhub, grabbing the pull counts of all images, the last time "latest" tag was updated, and gets the associated "FROM" image for each container.
#########################################################################################
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
#########################################################################################
Microsoft.PowerShell.Core\Set-StrictMode -Version Latest
#region variables