Skip to content

Instantly share code, notes, and snippets.

View tristankechlo's full-sized avatar
🇩🇪

Tristan Kechlo tristankechlo

🇩🇪
  • Germany
  • 02:44 (UTC +02:00)
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tristankechlo
tristankechlo / base64.ps1
Last active October 30, 2024 06:54
powershell functions to decode and encode base64 strings
function Decode-Base64 {
param (
[Parameter(ValueFromPipeline=$true, Mandatory=$true)]
[ValidateNotNullOrEmpty()]
[string]$Base64String
)
process {
$bytes = [Convert]::FromBase64String($Base64String)
$decodedString = [System.Text.Encoding]::UTF8.GetString($bytes)
Write-Output $decodedString
@tristankechlo
tristankechlo / telegram_tokens.md
Last active October 21, 2024 05:56
regex to find telegram tokens through the github search, most tokens are still active

Test: https://api.telegram.org/bot{{token}}/getMe

Regex: /BOT_TOKEN=[0-9]{8,10}:[\w_-]{35}/
Regex: /telegram=[0-9]{8,10}:[\w_-]{35}/
Regex (does find non telegram tokens too): /[0-9]{8,10}:[\w_-]{35}/ path:*.env