Skip to content

Instantly share code, notes, and snippets.

View thesp0nge's full-sized avatar
🏡
Working from home

Paolo Perego thesp0nge

🏡
Working from home
View GitHub Profile
FileInputStream fileIn = new FileInputStream("data.ser");
ObjectInputStream in = new ObjectInputStream(fileIn);
Object obj = in.readObject();
in.close();
if (obj instanceof MyClass) {
MyClass myObj = (MyClass) obj;
// Operazioni su myObj
}
import os
filename = input("Inserisci il nome del file da aprire: ")
command = "cat " + filename
os.system(command)
var searchQuery = window.location.hash.substr(1);
document.write("Risultati per la ricerca: " + searchQuery);
#include <stdio.h>
#include <string.h>
void copyString(char* input) {
char buffer[10];
strcpy(buffer, input);
printf("Copia effettuata: %s\n", buffer);
}
int main() {
#!/usr/bin/env python3
import sys
import requests
import random
import string
import re
def viewItem(s, target, query):
url = "http://%s/item/viewItem.php?id=5+or+%s" % (target, query)
@thesp0nge
thesp0nge / README
Last active October 10, 2022 10:33
Tools useful in security research activities to be included in openSUSE
openSUSE is a widely known European Linux distribution.
Among a lot of benifits and killing features, robust for servers and modern for laptop, it's flexible enough to become a
platform for security researchers.
The plan is to collect a set of tools, commonly used in a penetration test or a code review, and create a post installation
script to transform the distribution in a powerful hacking station.
@thesp0nge
thesp0nge / ova_to_virt.sh
Created June 8, 2021 13:54
An OVA to QCOW2 file format converter, useful for KVM
#!/bin/bash
MYNAME=`basename $0`
QEMU=`which qemu-img`
if [ ! -x $QEMU ]; then
echo "$MYNAME: qemu-img is not installed. Can't continue."
exit -5
fi
@thesp0nge
thesp0nge / generate.py
Created April 19, 2019 12:33
bind shell shellcode encoded with SUB EAX technique
#!/usr/bin/env python
# Please install shellerate>=0.4.2 before: pip install shellerate
import sys
import string
import logging
import secrets
from shellerate import strings;
from shellerate import asm_x86;
from shellerate.bind_shellcode import BindShellcode;
@thesp0nge
thesp0nge / remote_exploit_skeleton.py
Last active March 15, 2019 11:18
A Skeleton for my remote exploit stuff
#!/usr/bin/env python
import sys
import socket
def exploit(target, port):
s=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((target, port))
data=s.recv(1024)
#/usr/bin/env python
import socket
import os
import sys
import select
import string
import random
COMMANDS = ["STATS", "RTIME", "LTIME", "SRUN", "TRUN", "GMON", "GDOG", "KSTET", "GTER", "HTER", "LTER", "KSTAN"]