This file contains hidden or 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 (!optionalLoginCookie.isPresent() || !CookieHandler.verifyLoginCookie(optionalLoginCookie.get())) { | |
| out.println( | |
| "<h1> You are a not authenticated, kindly login. </h1>"); | |
| request.getRequestDispatcher("login.jsp").include(request, response); | |
| } else { | |
| ... |
This file contains hidden or 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
| Optional<Cookie> optionalDebugCookie = Arrays.stream(request.getCookies()) | |
| .filter(cookie -> "debug".equals(cookie.getName())) | |
| .findAny(); | |
| //Log debug information for authenticated users | |
| optionalDebugCookie.ifPresent(cookie -> { | |
| logger.error( | |
| new String(Base64.getDecoder().decode(cookie.getValue()))); | |
| }); |
This file contains hidden or 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
| function errorMessage() { | |
| var error = document.getElementById("error") | |
| if (isNaN(document.getElementById("number").value)) | |
| { | |
| // Complete the connection to mysqldb | |
| // escalator.c45luksaam7a.us-east-1.rds.amazonaws.com | |
| // Use credential allen:8%pZ-s^Z+P4d=h@P | |
| error.textContent = "Under Construction" | |
| error.style.color = "red" |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "flag" | |
| "bufio" | |
| //"io" | |
| "os" | |
| "strings" | |
| "golang.org/x/text/encoding/unicode" |
This file contains hidden or 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
| function Invoke-NETReader{ | |
| Param( | |
| [string]$inputFile, | |
| [string]$outputFile, | |
| [string]$delim, | |
| [int]$position | |
| ); | |
| $reader = [System.IO.File]::OpenText($inputFile) | |
| try { |
This file contains hidden or 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
| #!/bin/env python | |
| import argparse | |
| parser = argparse.ArgumentParser(description='Script to split large files') | |
| parser.add_argument('-f', required=True, help="Input file") | |
| parser.add_argument('-o', default="split_output.txt", help="Output file") | |
| parser.add_argument('-p', type=int, default=2, help="Position to keep (default is 2)") | |
| parser.add_argument('-d', default=":",help="character to delimit on (default is ':')") | |
| args= parser.parse_args() |
This file contains hidden or 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
| function Invoke-AES256CBCPBKDF2 | |
| { | |
| <# | |
| .Synopsis | |
| Powershell implementation of AES-cbc-256 pbkdf2 | |
| .Description | |
| This script will take a byte array, encrypt the payload and output the byte array or base64 value. | |
| This implementation is designed to mimic openssl's aes-cbc-256 pbkdf2 implementation. |
This file contains hidden or 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
| #!/bin/bash env python3 | |
| import requests | |
| import argparse | |
| parser = argparse.ArgumentParser(description='Search and pull down files from github.') | |
| parser.add_argument('-u', dest='user', help='Github username for token authentication.') | |
| parser.add_argument('-t', dest='token', help='Github token for token authentication.') | |
| parser.add_argument('-o', dest='org', help='GitHub org to search. If left blank, it will search all of github.') | |
| parser.add_argument('-s', dest='searchfile', help='The filename to be searched for. For example, .DS_Store') |
This file contains hidden or 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 | |
| import hmac | |
| import argparse | |
| #stolen from impacket. Thank you all for your wonderful contributions to the community | |
| try: | |
| from Cryptodome.Cipher import ARC4 | |
| from Cryptodome.Cipher import DES | |
| from Cryptodome.Hash import MD4 | |
| except Exception: |