Skip to content

Instantly share code, notes, and snippets.

View Ravlissimo's full-sized avatar
🧑‍🦯
sergeant (UA Armed Forces)

Ravlissimo Ravlissimo

🧑‍🦯
sergeant (UA Armed Forces)
View GitHub Profile
@Ravlissimo
Ravlissimo / find-Paths+Tokens.js
Last active November 10, 2022 04:31 — forked from killants/findPaths.js
Sharing knowledge
/**
* searches deep into an object recursively...
* @param {Object} obj object to be searched
* @param {any} searchValue the value/key to search for
* @param {Object} [options]
* @param {boolean} options.[searchKeys] whether to search object keys as well as values. Defaults to `true` if `serchValue` is a string, `false` otherwise.
* @param {number} options.[maxDepth=20] maximum recursion depth (to avoid "Maximum call stack size exceeded")
* @returns {string[]} Paths on the object to the matching results
*/
const findPaths = (
@Ravlissimo
Ravlissimo / fireeye-tools.md
Created May 6, 2023 23:23 — forked from EvanMcBroom/fireeye-tools.md
FireEye Red Team Tools - Notes

FireEye Red Team Tools - Notes

These are my notes on FireEye's yara rules for it's red team's tools.

These are the public projects that I could identify to be directly associated with a tool:

Project Source
AndrewSpecial https://github.com/hoangprod/AndrewSpecial
BloodHound https://github.com/BloodHoundAD/BloodHound
@Ravlissimo
Ravlissimo / carlos.bat
Created May 6, 2023 23:32 — forked from davidruhmann/carlos.bat
[Batch] Pure Batch Color Routine by David Ruhmann based of DosTips' Carlos
@Echo Off
Call :Color A "######" \n E "" C " 21 " E "!" \n B "######" \n
Pause >Nul
Exit /B
:Color
:: v21
:: Arguments: hexColor text [\n] ...
:: \n -> newline ... -> repeat
:: Supported in windows XP, 7, 8.
@Ravlissimo
Ravlissimo / Output.txt
Created May 7, 2023 01:41 — forked from davidruhmann/Output.txt
[Batch] Output Tips and Tricks by Dave Benham
CMD processes redirection from left to right. You want to first redirect 2 (stderr) to &1 (stdout), then redirect 1 (stdout) to something else. At this point stderr will still be redirected to the previous definition of stdout. The pipe will still work with the old definition of stdout (which now contains stderr).
If you don't care about stdout then you can redirect to nul
program.exe 2>&1 1>nul | find " "
If you want to capture stdout to a file then redirect to a file
program.exe 2>&1 1>yourFile | find " "
@Ravlissimo
Ravlissimo / ExtractVariableSet.bat
Created May 7, 2023 01:49 — forked from davidruhmann/ExtractVariableSet.bat
[Batch] Extract Variable Set
@echo off
setlocal EnableExtensions EnableDelayedExpansion
:: Setup
set "ResultsFolder=results"
set "ExportFile=output.txt"
:: Verify that the Results folder exists
if not exist "%ResultsFolder%\*" md "%ResultsFolder%"
set "OutputFile=%ResultsFolder%\%ExportFile%"
@echo off
setlocal EnableDelayedExpansion
if "%~1"==":::" goto :spinnerThread
:menuLoop
<nul set /p menu=Select menu[1 or 2]=
call :GetKey
echo(
echo Pressed '!key!'
if !key!==1 call :menu1
@Ravlissimo
Ravlissimo / ExtractURL.bat
Created May 7, 2023 02:15 — forked from davidruhmann/ExtractURL.bat
[Batch] Extract the URL from a bunch of .url shortcut files.
@echo off
setlocal EnableExtensions
for %%A in (*.url) do (
for /f "usebackq tokens=1,* delims==" %%X in ("%%~fA") do (
if /i "%%X"=="Url" (
echo(%%~nA = %%Y>>list.txt
echo(%%Y
)
)
)
@Ravlissimo
Ravlissimo / FindandReplace.bat
Created May 7, 2023 05:26 — forked from davidruhmann/FindandReplace.bat
[Batch] Find and Replace loops through text files and replaces search terms with strings.
@echo off
setlocal EnableExtensions DisableDelayedExpansion
:: Find and Replace [Works with Special Characters]
:: by David Ruhmann
:: About
:: This is a proof of concept to illustrate the difficulty and limitations in
:: regards to the batch string replacement functionality. Delayed Expansion was
:: not used as an exercise in showing the most common usage of batch.
@Ravlissimo
Ravlissimo / DynamicMenu.bat
Created May 7, 2023 06:29 — forked from davidruhmann/DynamicMenu.bat
[Batch] Dynamic Menu
:: Hide Command and Set Scope
@echo off
setlocal EnableExtensions
:: Customize Window
title My Menu
:: Menu Options
:: Specify as many as you want, but they must be sequential from 1 with no gaps.
:: Step 1. List the Application Names
@Ravlissimo
Ravlissimo / EchoOnSameLine.bat
Created May 7, 2023 06:32 — forked from davidruhmann/EchoOnSameLine.bat
[Batch] Alternate Method of echoing output onto the same line. No CR+LF !
@echo off
setlocal EnableDelayedExpansion
call :createSub
call :echoWithoutLinefeed "=hello"
call :echoWithoutLinefeed " world"
exit /b
:echoWithoutLinefeed
> txt.tmp (echo(%~1!sub!)
copy txt.tmp /a txt2.tmp /b > nul