Skip to content

Instantly share code, notes, and snippets.

@gladiopeace
gladiopeace / checker.py
Created June 13, 2023 16:32 — forked from mberman84/checker.py
Cuda Checker
import torch
print(torch.version.cuda)
print(torch.cuda.is_available())
@gladiopeace
gladiopeace / select-grid.js
Created May 27, 2023 04:03 — forked from fofr/select-grid.js
Photoshop grid selection
// Get a reference to the active document.
var doc = app.activeDocument;
// Set the height of the selection to the height of the document.
var height = doc.height;
// Set the x and y offset in pixels.
var xOffset = 5;
var yOffset = 5;
@gladiopeace
gladiopeace / restricted.m
Created May 24, 2023 20:37 — forked from aemmitt-ns/restricted.m
program to dump out forbidden classes and selectors in NSPredicates
// dump classes and selectors forbidden in NSPredicates
// `cc -framework Foundation -o restricted restricted.m`
#import <Foundation/Foundation.h>
#import <dlfcn.h>
int main() {
void *cf = dlopen("/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation", 0);
NSDictionary* (*RestrictedClasses)() = dlsym(cf, "_CFPredicatePolicyRestrictedClasses");
NSDictionary* (*RestrictedSelectors)() = dlsym(cf, "_CFPredicatePolicyRestrictedSelectors");
NSLog(@"Restricted Selectors: %@", RestrictedSelectors());
@gladiopeace
gladiopeace / packet-generator.cpp
Created May 13, 2023 01:16 — forked from jonhoo/packet-generator.cpp
Complete example code showing how to construct a UDP packet from scratch and inject it on a WiFi interface in Linux
/**
* Hello, and welcome to this brief, but hopefully complete, example file for
* wireless packet injection using pcap.
*
* Although there are various resources for this spread on the web, it is hard
* to find a single, cohesive piece that shows how everything fits together.
* This file aims to give such an example, constructing a fully valid UDP packet
* all the way from the 802.11 PHY header (through radiotap) to the data part of
* the packet and then injecting it on a wireless interface
*
@gladiopeace
gladiopeace / Customizer.jsx
Created April 23, 2023 05:53 — forked from adrianhajdin/Customizer.jsx
Build and Deploy an AI-Powered 3D Website Using React | 2023 Three JS Course Tutorial for Beginners
{/* Download button */}
<button className='download-btn' onClick={downloadCanvasToImage}>
<img
src={download}
alt='download_image'
className='w-3/5 h-3/5 object-contain'
/>
</button>
@gladiopeace
gladiopeace / dispatch_openai_requests.py
Created April 23, 2023 05:04 — forked from neubig/dispatch_openai_requests.py
A simple script to get results from the OpenAI Asynchronous API
import openai
import asyncio
from typing import Any
async def dispatch_openai_requests(
messages_list: list[list[dict[str,Any]]],
model: str,
temperature: float,
max_tokens: int,
top_p: float,
import pyarrow.flight as fl
import json
client = fl.FlightClient("grpc://127.0.0.1:8815")
print(
client.do_get(
fl.Ticket(json.dumps({"contract": "0x", "event": "0x"}))
).read_pandas()
)

How to intercept all SSL connections from an Android x86 VM

This guide shows how to setup an Android VM in order to intercept all HTTPS requests. This was originally intended to reverse PlayServices but should work with any app that does not use certificate pinning (i.e. every app that relies on the system certificate authorities).

Inspired by this guide how to install Android x86 in VirtualBox, this guide how to install a system certificate on Android and this guide how to use mitmproxy with VirtualBox.

  1. Download a recent Android x86 ISO from here.

  2. Download a recent Kali Linux VirtualBox Image from here. (You can also use an

@gladiopeace
gladiopeace / goip_pkg.md
Created March 30, 2023 11:13 — forked from tostercx/goip_pkg.md
reversed GoIP PKG format

PKG format

offset sample name details
DB AD 47 5E magic
00 01 version PKG format version 1
00 00 encrypt resellers can crypt these?
00 2A 60 00 pkg_len total package length
69 4F 82 7D pkg_md5 md5 of rest of pkg
6B DE CA 4F -
@gladiopeace
gladiopeace / apple_archive.link
Created February 5, 2023 18:23
apple software archive link