-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathEyeWitness_remote.bat
More file actions
39 lines (29 loc) · 1.89 KB
/
EyeWitness_remote.bat
File metadata and controls
39 lines (29 loc) · 1.89 KB
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
@echo off
setlocal
set Proyecto=%1
set File=%2
set Documentacion=%3
set Timestamp=%4
set DirApp=%5
set Server=%6
set Username=%7
set Password=%8
set Proyecto=%Proyecto:"=%
set Documentacion=%Documentacion:"=%
@title=[EyeWitness] - %Proyecto%
rem git clone https://github.com/ChrisTruncer/EyeWitness
rem cd EyeWitness ; cd setup ; ./setup.sh
echo "Generando script..."
"%~dp0pscp.exe" -P 22 -l %Username% -pw %Password% -C "%File%" %Server%:"/tmp/EyeWitnessReport_%Timestamp%.txt"
"%~dp0plink.exe" -no-antispoof -ssh -P 22 -l %Username% -pw %Password% -C %Server% "mkdir /tmp/EyeWitnessReport_%Timestamp%/"
"%~dp0plink.exe" -no-antispoof -ssh -P 22 -l %Username% -pw %Password% -C %Server% "echo 'cd '%DirApp%' ; chmod 755 EyeWitness.py ; ./EyeWitness.py -f /tmp/EyeWitnessReport_%Timestamp%.txt --web --timeout 20 --threads 10 --user-agent \"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.21 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.21\" --prepend-https --active-scan --resolve --no-prompt -d "/tmp/EyeWitnessReport_%Timestamp%/" ' > /tmp/EyeWitness-script_%Timestamp%.sh"
echo "Ejecutando..."
@echo on
"%~dp0plink.exe" -no-antispoof -ssh -P 22 -l %Username% -pw %Password% -C %Server% "export TERM=xterm ; chmod 755 /tmp/EyeWitness-script_%Timestamp%.sh ; /tmp/EyeWitness-script_%Timestamp%.sh"
@echo off
echo "Generando Reporte..."
"%~dp0plink.exe" -no-antispoof -ssh -P 22 -l %Username% -pw %Password% -C %Server% "cd /tmp/ ; tar -cvzf 'EyeWitnessReport_%Timestamp%.tar.gz' 'EyeWitnessReport_%Timestamp%'"
"%~dp0pscp.exe" -P 22 -l %Username% -pw %Password% -C %Server%:"/tmp/EyeWitnessReport_%Timestamp%.tar.gz" "%Documentacion%\EyeWitnessReport_%Timestamp%.tar.gz"
"%~dp0plink.exe" -no-antispoof -ssh -P 22 -l %Username% -pw %Password% -C %Server% "rm -fr '/tmp/EyeWitnessReport_%Timestamp%.tar.gz' ; rm -fr '/tmp/EyeWitnessReport_%Timestamp%'"
echo "%Documentacion%\EyeWitness_%Timestamp%.tar.gz"
pause