Advertisement
fabiorfreitas

Full batch install for Shibari Dom (Dual-Shock 3 server)

Nov 17th, 2019 (edited)
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.40 KB | None | 0 0
  1. ::::::::::::::::::::::::::::::::::::::::::::
  2. :: Elevate.cmd - Version 4
  3. :: Automatically check & get admin rights
  4. :: see "https://stackoverflow.com/a/12264592/1016343" for description
  5. ::::::::::::::::::::::::::::::::::::::::::::
  6. @echo off
  7. CLS
  8. ECHO.
  9. ECHO =============================
  10. ECHO Running Admin shell
  11. ECHO =============================
  12.  
  13. :init
  14. setlocal DisableDelayedExpansion
  15. set cmdInvoke=1
  16. set winSysFolder=System32
  17. set "batchPath=%~0"
  18. for %%k in (%0) do set batchName=%%~nk
  19. set "vbsGetPrivileges=%temp%\OEgetPriv_%batchName%.vbs"
  20. setlocal EnableDelayedExpansion
  21.  
  22. :checkPrivileges
  23. NET FILE 1>NUL 2>NUL
  24. if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges )
  25.  
  26. :getPrivileges
  27. if '%1'=='ELEV' (echo ELEV & shift /1 & goto gotPrivileges)
  28. ECHO.
  29. ECHO **************************************
  30. ECHO Invoking UAC for Privilege Escalation
  31. ECHO **************************************
  32.  
  33. ECHO Set UAC = CreateObject^("Shell.Application"^) > "%vbsGetPrivileges%"
  34. ECHO args = "ELEV " >> "%vbsGetPrivileges%"
  35. ECHO For Each strArg in WScript.Arguments >> "%vbsGetPrivileges%"
  36. ECHO args = args ^& strArg ^& " " >> "%vbsGetPrivileges%"
  37. ECHO Next >> "%vbsGetPrivileges%"
  38.  
  39. if '%cmdInvoke%'=='1' goto InvokeCmd
  40.  
  41. ECHO UAC.ShellExecute "!batchPath!", args, "", "runas", 1 >> "%vbsGetPrivileges%"
  42. goto ExecElevation
  43.  
  44. :InvokeCmd
  45. ECHO args = "/c """ + "!batchPath!" + """ " + args >> "%vbsGetPrivileges%"
  46. ECHO UAC.ShellExecute "%SystemRoot%\%winSysFolder%\cmd.exe", args, "", "runas", 1 >> "%vbsGetPrivileges%"
  47.  
  48. :ExecElevation
  49. "%SystemRoot%\%winSysFolder%\WScript.exe" "%vbsGetPrivileges%" %*
  50. exit /B
  51.  
  52. :gotPrivileges
  53. setlocal & cd /d %~dp0
  54. if '%1'=='ELEV' (del "%vbsGetPrivileges%" 1>nul 2>nul & shift /1)
  55.  
  56. ::::::::::::::::::::::::::::
  57. ::START
  58. ::::::::::::::::::::::::::::
  59. @echo off
  60. mkdir C:\tools\Shibari
  61. tar -xf Shibari.zip -C C:\tools\Shibari
  62. tar -xf FireShock.zip
  63. pnputil /add-driver FireShock\Fireshock.inf /install
  64. rd FireShock /s /q
  65. start "" /WAIT ViGEmBus_Setup_1.16.115.exe "/passive"
  66. start "Shibari Server" C:\tools\Shibari\Shibari.Dom.Server.exe /I
  67. powershell -Command "&{ Start-Process powershell -ArgumentList '-Command C:\tools\Shibari\Shibari.Dom.Server.exe install' -Verb RunAs}"
  68. powershell exit
  69. echo Wait for Powershell to finish then press any key to continue...
  70. pause > nul
  71. sc start Shibari.Dom.Server
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement