-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathweb_proyectos.bat
More file actions
27 lines (22 loc) · 1002 Bytes
/
web_proyectos.bat
File metadata and controls
27 lines (22 loc) · 1002 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
@echo off
setlocal
set WebSVM=%1
set Username=%2
set Password=%3
set Timestamp=%4
set UsoProxy=%5
set ProxyIP=%6
set ProxyPort=%7
set ProxyUser=%8
set ProxyPassword=%9
if %UsoProxy% EQU 1 ( set Proxy=--proxy %ProxyIP%:%ProxyPort% --proxy-anyauth --proxy-user %ProxyUser%:%ProxyPassword% )
if %UsoProxy% EQU 0 ( set Proxy= )
@title = Descargando Proyectos ...
echo Descargando Proyectos ...
rem Login
"%~dp0curl.exe" -s %Proxy% --compressed --insecure -D "%TEMP%\web_proyectos_auth_%Timestamp%.txt" --data-urlencode "username=%Username%" --data-urlencode "password=%Password%" "%WebSVM%/login.php" >NUL 2>NUL
rem Proyectos
"%~dp0curl.exe" -s %Proxy% --compressed --insecure -b "%TEMP%\web_proyectos_auth_%Timestamp%.txt" -o "%TEMP%\proyectos_%Timestamp%.ini" "%WebSVM%/proyectos_exportar.php?cantidad=10"
rem Logout
"%~dp0curl.exe" -s %Proxy% --compressed --insecure -b "%TEMP%\web_proyectos_auth_%Timestamp%.txt" "%WebSVM%/login.php?logout" >NUL
del /F "%TEMP%\web_proyectos_auth_%Timestamp%.txt"