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
| 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 |
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