Skip to content

Instantly share code, notes, and snippets.

/* This program was written by Joshua Graham joshua.graham@jpginc.com.au
* www.jpiginc.com.au
* Anyone may use any part of this code for any non-malicious purpose
* with or without referencing me. There is No Warranty
*/
;start main:
if not A_IsAdmin
{ Run *RunAs "%A_ScriptFullPath%" ; Requires v1.0.92.01+
ExitApp
@jpginc
jpginc / hta cmd example.html
Last active September 23, 2018 07:06
hta cmd example
<script LANGUAGE="VBScript">
Set cmd = CreateObject("WScript.Shell")
cmd.run("ping 1.1.1.1")
</script>
@jpginc
jpginc / hta invisible example.html
Last active September 27, 2018 15:55
invisible hta example
<SCRIPT LANGUAGE="VBScript">
set a = CreateObject("WScript.Shell")
visible = false
a.run "mshta.exe ""file:///evil.hta""", visible
window.close()
</SCRIPT>
@jpginc
jpginc / challenge.js
Created September 27, 2018 16:31
bluehat ctf regex
function checkPassword(mao)
{
var miau = [
new RegExp("^[a-z]+$"),
new RegExp(".*o.*r.*a.*"),
new RegExp(".*o.*e.*"),
new RegExp(".*d.*e.*"),
new RegExp(".*d.*r.*r.*"),
new RegExp(".*a.*a.*$"),
new RegExp(".*o.*n.*"),
@jpginc
jpginc / challenge2.js
Created September 27, 2018 17:13
checking regexs
function checkPassword(mao)
{
var miau = [
...SNIP...
];
if (mao.length != 10)
{
alert("Access denied!");
return;
}
@jpginc
jpginc / bruteforce.js
Created September 27, 2018 17:38
bruteforcer
inc = 0
str = "adrgongera"
setInterval(function() {
checkPassword(string_nth_permutation(str, inc++))
}, 1)
@jpginc
jpginc / solver.ahk
Created September 27, 2018 21:22
Three seconds solution
#include <Vis2> ; Equivalent to #include .\lib\Vis2.ahk
loop, 10
{
urlasdf := "http://70.37.63.30/Web/ThreeSeconds/image.php"
WebRequest := ComObjCreate("WinHttp.WinHttpRequest.5.1")
WebRequest.Open("GET", urlasdf)
WebRequest.SetRequestHeader("Cookie", "PHPSESSID=g4p87ap7i1je6p807q9c5tlmgt; is_authorized=false")
WebRequest.SetRequestHeader("Referer", "http://70.37.63.30/Web/ThreeSeconds/index.php")
WebRequest.SetRequestHeader("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36")
@jpginc
jpginc / dns1.ahk
Created October 4, 2018 00:21
dns1
loop, Read, allDnsQuery.txt, interestingQueries.txt
{
IfInString, A_LoopReadLine, torrabot.enterprises, FileAppend, %A_LoopReadLine%`n
}
@jpginc
jpginc / dns2.ahk
Last active October 4, 2018 00:49
dns2
loop, Read, allDnsQuery.txt, decoded1.txt
{
FileAppend, % asciiHexToStr(A_LoopReadLine) "`n"
}
asciiHexToStr(str)
{
decoded := "", start := -1
while(start <= StrLen(str)) {
decoded .= chr("0x" SubStr(str, (start := start + 2), 2))
}
@jpginc
jpginc / dns3.ahk
Last active October 4, 2018 01:38
dns3
asciiHex := ""
loop, Read, allDnsQuery.txt
{
IfInString, A_loopreadline, 34.205.75.67
continue ;there is an entry for the query and response, elminate one to remove duplicates
query := StrSplit(A_LoopReadLine, " ")[2] ;get the query (remove the IP address)
query := RegExReplace(query, "\.") ;remove the dot's as they aren't part of the ascii hex
query := RegExReplace(query, "torrabotenterprises") ;not part of the ascii hex
StringTrimLeft, query, query, 18 ; the first 18 characters appear to be nonsense
if(query) ;if there is any data left