-
Notifications
You must be signed in to change notification settings - Fork 3
/
cuckoo-sender.cmd
51 lines (43 loc) · 979 Bytes
/
cuckoo-sender.cmd
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
@echo off
::
:: Created by r00t0vi4
::
:: twitter.com/r00t0vi4
::
SET "LIBDIR=%~dp0data"
:: for /F "tokens=*" %%I in (config.ini) do set %%I
for /F "eol=# delims== tokens=1,2 usebackq" %%A In ("config.ini") Do (Set %%A=%%B)
IF "%~1"=="" GOTO ERROR
IF "%rest_url%"=="" GOTO ERROR
IF "%timeout%"=="" GOTO ERROR
IF "%analysis%"=="" GOTO ERROR
IF "%process_memory%"=="" GOTO ERROR
IF "%memory%"=="" GOTO ERROR
IF "%enforce_timeout%"=="" GOTO ERROR
IF "%verbose%"=="" GOTO ERROR
IF %verbose%==1 (
set verbose=-v
) else (
set verbose=
)
%LIBDIR%\curl.exe %verbose% ^
-F file="@%~1" ^
-F 'timeout=%timeout%' ^
-F 'analysis=%analysis%' ^
-F 'process_memory=%process_memory%' ^
-F 'memory=%memory%' ^
-F 'enforce_timeout=%enforce_timeout%' ^
-F 'tags=%tags%' ^
-F 'options=%options%' ^
%rest_url%
GOTO END
:ERROR
echo.
echo "Error occurred. Application terminated."
pause
exit 1
:END
echo.
pause
exit 0