Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function DecodeStringWithXORFromHex()
- {
- Param
- (
- $String,
- $Key
- )
- While ($Key.Length -lt $String.Length/2)
- {
- $Key+=$Key
- }
- $DecodedResult = ""
- for($x = 0; $x -lt ($String.length); $x+=2)
- {
- $xorValueAsHexString = $String.Substring($x, 2)
- $value1 = [int]::Parse($xorValueAsHexString,'HexNumber')
- $value2 = [byte][char]$Key.Substring($x/2, 1)
- $xorValue = $value1 -bxor $value2
- $DecodedResult+= [char]$xorValue
- }
- Write-Output $DecodedResult
- }
- $URL = "b6d9ca9fad9791c0a9dac9c1bbdbdb81aacfcc86aac8908cb183cb84f1c8918dadc4da8aad80d28abbc9cdc2ec9d8fd6f3d9d78cb5c8ca9cf3988fd9ea9886d8e79f8fda"
- $Stringy = "bf9fddd8eecf87dcbf9bdddce6988bd7ec98da8ebfcf888abb958cd7e69cdf8c"
- $Key = 'BSides Leeds 2019' ## ? this is whats being hinted at
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement