refreshed old windows scripts collection
Cette révision appartient à :
Parent
51aa6e6583
révision
b640481ab1
9 fichiers modifiés avec 97 ajouts et 21 suppressions
|
@ -7,11 +7,12 @@
|
|||
set pdftk=%~dp0
|
||||
|
||||
:: ensuite, votre mot de passe pour chiffrer votre PDF
|
||||
set pwd=Putain de mot de passe en or massif 24 carats serti de diamants!
|
||||
set "passwd=Putain de mot de passe en or massif 24 carats serti de diamants!"
|
||||
|
||||
if not exist "%pdftk%\pdftk.exe" echo pdftk.exe not found. exiting... & echo. & pause & exit 1
|
||||
if [%1]==[] goto noarg
|
||||
"%pdftk%\pdftk.exe" %1 cat output "%~dpn1-prot.pdf" encrypt_128bit owner_pw "%pwd%" allow Printing CopyContents
|
||||
"%pdftk%\pdftk.exe" %1 cat output "%~dpn1-prot.pdf" encrypt_128bit owner_pw "%passwd%" allow Printing CopyContents
|
||||
if errorlevel 1 pause
|
||||
exit
|
||||
|
||||
:noarg
|
22
windows/PDF-dechiffrer.bat
Fichier normal
22
windows/PDF-dechiffrer.bat
Fichier normal
|
@ -0,0 +1,22 @@
|
|||
@echo off
|
||||
:: permet de chiffrer un fichier pdf avec pdftk simplement en lachant le fichier pdf sur ce bat.
|
||||
:: vous aurez besoin de pdftk: http://www.accesspdf.com/pdftk/
|
||||
:: utile pour faire chier les administrations en bloquant le copier-coller et en permettant que l'impression
|
||||
|
||||
:: si vous voulez placer ce fichier en dehors du dossier de pdftk, veuillez remplacer %~dp0 dans la ligne suivante
|
||||
set pdftk=%~dp0
|
||||
|
||||
:: mettez ici votre mot de passe pour déchiffrer votre PDF
|
||||
set "passwd=Putain de mot de passe en or massif 24 carats serti de diamants!"
|
||||
|
||||
if not exist "%pdftk%\pdftk.exe" echo pdftk.exe not found. exiting... & echo. & pause & exit 1
|
||||
if [%1]==[] goto noarg
|
||||
"%pdftk%\pdftk.exe" %1 input_pw "%passwd%" cat output "%~dpn1-unprot.pdf"
|
||||
if errorlevel 1 pause
|
||||
exit
|
||||
|
||||
:noarg
|
||||
echo Usage: %~nx0 "file to unprotect.pdf"
|
||||
echo.
|
||||
pause
|
||||
exit
|
23
windows/PDF-dechiffrer2.bat
Fichier normal
23
windows/PDF-dechiffrer2.bat
Fichier normal
|
@ -0,0 +1,23 @@
|
|||
@echo off
|
||||
:: permet de déchiffrer un fichier pdf avec qpdf simplement en lachant le fichier pdf sur ce bat.
|
||||
:: vous aurez besoin de qpdf: https://github.com/qpdf/qpdf
|
||||
:: utile pour stocker les PDF des administrations qui les protègent avec un mot de passe
|
||||
|
||||
:: si vous voulez placer ce fichier en dehors du dossier de pdftk, veuillez remplacer %~dp0 dans la ligne suivante
|
||||
set qpdf=%~dp0\qpdf\bin
|
||||
|
||||
:: mettez ici votre mot de passe pour déchiffrer votre PDF
|
||||
set "passwd=Putain de mot de passe en or massif 24 carats serti de diamants!"
|
||||
|
||||
set qpdf=%~dp0\bin
|
||||
if [%1]==[] goto noarg
|
||||
if [%2] neq [] (set passwd=%2)
|
||||
"%qpdf%\qpdf.exe" --password=%passwd% --decrypt %1 "%~dpn1-unprot.pdf"
|
||||
if errorlevel 1 pause
|
||||
exit
|
||||
|
||||
:noarg
|
||||
echo Usage: %~nx0 "protected file.pdf" "password"
|
||||
echo.
|
||||
pause
|
||||
exit
|
|
@ -1,11 +0,0 @@
|
|||
@echo off
|
||||
:: Allow Windows explorer on Vista and up to use basic auth
|
||||
echo Windows Registry Editor Version 5.00 >"%Temp%\WebDavBasicAuthLevel.reg"
|
||||
echo. >>"%Temp%\WebDavBasicAuthLevel.reg"
|
||||
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\WebClient\Parameters] >>"%Temp%\WebDavBasicAuthLevel.reg"
|
||||
echo "BasicAuthLevel"=dword:00000002 >>"%Temp%\WebDavBasicAuthLevel.reg"
|
||||
"%windir%\regedit.exe" /s "%Temp%\WebDavBasicAuthLevel.reg"
|
||||
net stop webclient
|
||||
del "%temp%\WebDavBasicAuthLevel.reg"
|
||||
net start webclient
|
||||
echo Over, Have a nice Dav.
|
|
@ -1,9 +1,9 @@
|
|||
@echo off
|
||||
:: script to use when capture image capture shows error 0xc000000f (failed to start winload.*) under 2012r2
|
||||
:: https://gist.github.com/Albirew/ff86c4871b252acf6d7b5c298283859c
|
||||
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
|
||||
echo º Bypass error 0xc000000f on capture.wim (failed to start winload.*) º
|
||||
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ
|
||||
echo ######################################################################
|
||||
echo # Bypass error 0xc000000f on capture.wim (failed to start winload.*) #
|
||||
echo ######################################################################
|
||||
echo.
|
||||
if [%1]==[] goto noarg
|
||||
:: UAC privilege escalation
|
||||
|
@ -40,8 +40,10 @@ echo OK!
|
|||
exit
|
||||
|
||||
:noarg
|
||||
echo.
|
||||
echo Usage: drop on this .bat file the capture.wim file to fix.
|
||||
echo Or use the command line: %~nx0 X:\path\to\capture.wim
|
||||
echo Default is C:\RemoteInstall\Boot\x64\Images\
|
||||
echo.
|
||||
pause
|
||||
exit
|
|
@ -1,10 +1,11 @@
|
|||
@echo off
|
||||
:: rename file in .htaccess in widows (cuz microsoft is a dick that don't allow filename starting with a dot)
|
||||
:: rename file in .htaccess in windows
|
||||
:: (cuz before windows 8 or 10, microsoft was a dick that don't allowed filename starting with a dot)
|
||||
if [%1]==[] goto noarg
|
||||
ren %1 .htaccess
|
||||
exit
|
||||
:noarg
|
||||
echo rename input file into .htaccess
|
||||
echo rename any input file into .htaccess
|
||||
echo Usage: htaccess.bat "truc.txt"
|
||||
pause
|
||||
exit
|
|
@ -1,4 +1,5 @@
|
|||
@echo off
|
||||
:: This script allowed to remove the whole "Get Windows 10" annoyances on Windows7
|
||||
:: Writed by CynerOne, updated and commented by Albirew
|
||||
:: CynerOne original located here: http://lecrabeinfo.net/desinstaller-lapplication-obtenir-windows-10-supprimer-icone-windows-10.html#comment-2374542969
|
||||
:: also added rev.18 of Matt's privilege escalation script: http://stackoverflow.com/posts/12264592/revisions
|
||||
|
@ -9,6 +10,7 @@
|
|||
:: V6 modified error check to make it not stop when non fatal error occur and added script to automatically hide nasty updates on Windows Update ( https://gist.github.com/neckcen/f099eda0b1cde283cdc9 )
|
||||
:: V7 added WGA update and fixed lack of escaping characters
|
||||
:: V8 added KB3173040
|
||||
:: V9 added script description
|
||||
|
||||
:: before anything, let's specify what "yes" is interpreted in your language (for takeown)
|
||||
for /F "tokens=3 delims= " %%G in ('reg query "hklm\system\controlset001\control\nls\language" /v Installlanguage') do (
|
||||
|
|
|
@ -27,9 +27,9 @@ setlocal & pushd .
|
|||
cd /d %~dp0
|
||||
:: /UAC privilege escalation
|
||||
|
||||
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
|
||||
echo º SMBv1 patch against malwares like WannaCry ou notPetya / Petwrap º
|
||||
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
|
||||
echo ####################################################################
|
||||
echo # SMBv1 patch against malwares like WannaCry ou notPetya / Petwrap #
|
||||
echo ####################################################################
|
||||
echo.
|
||||
:: deactivate SMBv1 on SMB server
|
||||
reg add "HKLM\SYSTEM\CurrentControlSet\services\LanmanServer\Parameters" /v SMB1 /t REG_DWORD /d 0 /f
|
||||
|
|
36
windows/webDavOnVista+.bat
Fichier normal
36
windows/webDavOnVista+.bat
Fichier normal
|
@ -0,0 +1,36 @@
|
|||
@echo off
|
||||
echo Allow Windows explorer on Vista and up to use basic auth
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
|
||||
:: UAC privilege escalation
|
||||
:checkPrivileges
|
||||
NET FILE 1>NUL 2>NUL
|
||||
if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges )
|
||||
:getPrivileges
|
||||
if '%1'=='ELEV' (echo ELEV & shift /1 & goto gotPrivileges)
|
||||
echo.
|
||||
echo Invoking UAC for Privilege Escalation
|
||||
setlocal DisableDelayedExpansion
|
||||
set "batchPath=%~0"
|
||||
setlocal EnableDelayedExpansion
|
||||
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\OEgetPrivileges.vbs"
|
||||
echo args = "ELEV " >> "%temp%\OEgetPrivileges.vbs"
|
||||
echo For Each strArg in WScript.Arguments >> "%temp%\OEgetPrivileges.vbs"
|
||||
echo args = args ^& strArg ^& " " >> "%temp%\OEgetPrivileges.vbs"
|
||||
echo Next >> "%temp%\OEgetPrivileges.vbs"
|
||||
echo UAC.ShellExecute "!batchPath!", args, "", "runas", 1 >> "%temp%\OEgetPrivileges.vbs"
|
||||
"%SystemRoot%\System32\WScript.exe" "%temp%\OEgetPrivileges.vbs" %*
|
||||
exit /B
|
||||
:gotPrivileges
|
||||
if '%1'=='ELEV' shift /1
|
||||
setlocal & pushd .
|
||||
cd /d %~dp0
|
||||
:: /UAC privilege escalation
|
||||
|
||||
net stop webclient
|
||||
reg add "HKLM\SYSTEM\CurrentControlSet\services\WebClient\Parameters" /f /v BasicAuthLevel /t REG_DWORD /d 2
|
||||
net start webclient
|
||||
echo Done, Have a nice Day.
|
||||
pause
|
Chargement…
Référencer dans un nouveau ticket