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 | |
| if [ "$#" -ne 1 ]; then | |
| echo "Usage: $0 <json_file>" | |
| exit 1 | |
| fi | |
| if [ ! -f "$1" ]; then | |
| echo "Error: JSON file '$1' not found." | |
| exit 1 |
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
| # Script to create a new file with ASCII SSIDs/ESSIDs from Hashcat potfile. | |
| # Usage .\potfile_hex_to_ascii.ps1 hashcat.potfile | |
| param( | |
| [Parameter(Mandatory=$true, Position=0, ValueFromPipeline=$false)] | |
| [string] | |
| $potFilePath | |
| ) | |
| Get-Content $filePath | ForEach-Object { |
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
| # Script to backup your pwnagotchi. | |
| # Usage: | |
| # backup_pwnagotchi.ps1 <ip_address_of_pwnagotchi> | |
| # The <ip_address_of_pwnagotchi> should be the static ip address set previously (10.0.0.2). | |
| # Can setup SSH keys to bypass password prompt for SCP. | |
| param( | |
| [Parameter(Mandatory=$true, Position=0, ValueFromPipeline=$false)] | |
| [string] |
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
| trigger: | |
| - master | |
| resources: | |
| - repo: self | |
| variables: | |
| azureSubscription: '<azure-subscription>' | |
| dockerRegistryServiceConnection: '<service-connection>' | |
| imageRepository: '<repository-name>' |
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
| from typing import AsyncIterable, List | |
| import aiohttp | |
| import asyncio | |
| import platform | |
| import time | |
| import nest_asyncio | |
| #__import__('IPython').embed() | |
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
| <# | |
| based on this example from: https://jwt.io/ | |
| https://stackoverflow.com/questions/30246497/using-statement-for-base64urlencode | |
| https://medium.com/@nikitafed9292/net-base64-decoding-workaround-82b797162b6e | |
| https://blog.angular-university.io/angular-jwt/ | |
| https://gist.github.com/kucukkanat/1ef77db8120323db2b89087735ef8a5d | |
| #> | |
| ################################################ |
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 ($args.Count -eq 0) { | |
| Write-Host "Usage: $($MyInvocation.MyCommand.Name) png_file1 png_file2 ..." | |
| exit 1 | |
| } | |
| # Byte arrays can be defined with decimal or hex. | |
| $PNG_SIGNATURE = [byte[]]@(137, 80, 78, 71, 13, 10, 26, 10) | |
| [byte[]] $STANDARD_IEND = @(0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82) | |
| # Notes: |
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 sys | |
| STANDARD_IEND = b'\x00\x00\x00\x00IEND\xae\x42\x60\x82' | |
| # https://en.wikipedia.org/wiki/PNG | |
| # https://en.wikipedia.org/wiki/ACropalypse | |
| # https://github.com/infobyte/CVE-2023-21036 | |
| # USAGE: detect_bad_crop_simple.py <png1> <png2> ... |
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
| DECLARE @start_date DATETIME = '2023-04-07 00:00:00' | |
| DECLARE @end_date DATETIME = '2023-04-08 23:00:00' | |
| DECLARE @hours CURSOR; | |
| DECLARE @interval INT = 1; | |
| -- You can adjust the to every n hour range if needed. | |
| SET @hours = CURSOR FOR | |
| WITH cte_hourly_timestamps AS ( | |
| SELECT CONVERT(datetimeoffset, @start_date) AS start_hour | |
| UNION ALL | |
| SELECT DATEADD(HOUR, @interval, start_hour) |
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
| $replaceDict = @{ | |
| '<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />' = '<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.0" />' | |
| '<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.0" />' = '<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.0" />' | |
| '<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="7.0.0" />' = '<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="6.0.0" />' | |
| '<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />' = '<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />' | |
| '<PackageReference Include="Microsoft.Extensions.Configuration.DependencyInjection" Version="7.0.0" />' = '<PackageReference Include="Microsoft.Extensions.Configuration.DependencyInjection" Version="6.0.0" />' | |
| '<PackageRefe |