forked from dangnguyen2207/phase3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTraffic.hta
102 lines (89 loc) · 2.62 KB
/
Traffic.hta
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<HTML>
<HEAD>
<TITLE>Traffic Emulator</title>
<HTA:APPLICATION
ApplicationName="SSH.hta"
SingleInstance="No"
WindowsState="normal"
Scroll="No"
Navigable="Yes"
MaximizeButton="Yes"
SysMenu="Yes"
Caption="Yes"
></HEAD>
<SCRIPT LANGUAGE="VBScript">
Sub Window_Onload
'# Size Window
sHorizontal = 700
sVertical = 270
Window.resizeTo sHorizontal, sVertical
'# Get Monitor Details
Set objWMIService = GetObject _
("winmgmts:root\cimv2")
intHorizontal = sHorizontal *2
intVertical = sVertical *2
Set colItems = objWMIService.ExecQuery( _
"Select ScreenWidth, ScreenHeight from" _
& " Win32_DesktopMonitor", , 48)
For Each objItem In colItems
sWidth= objItem.ScreenWidth
sHeight = objItem.ScreenHeight
If sWidth > sHorizontal _
then intHorizontal = sWidth
If sHeight > sVertical _
then intVertical = sHeight
Next
Set objWMIService = Nothing
'# Center window on the screen
intLeft = (intHorizontal - sHorizontal) /2
intTop = (intVertical - sVertical) /2
Window.moveTo intLeft, intTop
'# default window content
window.location.href="#Top"
End Sub
Sub RunScript
on Error Resume Next
strScan1 = Scan1.Value
strCommand = "C:\VulnerabilitesAnalyzer\Common\Report.exe " & strScan1 & " " & strScan2
Dim objShell, objCmdExec
Set objShell = CreateObject("WScript.Shell")
Set objCmdExec = objshell.exec(strCommand)
getCommandOutput = objCmdExec.StdOut.ReadAll
Set objShell = Nothing
Self.Close()
End Sub
Sub CancelScript
Set oShell = Nothing
Set objNetwork = Nothing
Self.Close()
End Sub
</SCRIPT>
<BODY STYLE="font:14 pt arial; color:black; filterrogidXImageTransform.Microsoft.Gradient( GradientType=1, StartColorStr='#000000', EndColorStr='#0000FF')">
<a name="Top"></a><CENTER>
<table border="0" cellpadding="2" cellspacing="2"><font size="2" color="black" face="Arial">
<tr>
<td height="30">
<p>Source IP Address: </p>
</td>
<td height="30"> <input type="text" name="Source" size="30"></td></tr>
<tr>
<td height="30">
<p>Destination IP Address: </p>
</td>
<td height="30"> <input type="text" name="Destination" size="30"></td></tr>
<tr>
<td height="30">
<p>Protocol </p>
</td>
<td height="30"> <input type="radio" name="Protocol" value="TCP">TCP <input type="radio" name="Protocol" value="UDP">UDP</td></tr>
<tr>
<td height="30">
<p>Port Number: </p>
</td>
<td height="30"> <input type="text" name="Port" size="30"></td></tr>
</table><BR>
<HR color="#0000FF">
<Input id=runbutton class="button" type="button" value=" Emulate " name="run_button" onClick="RunScript">
<Input id=runbutton class="button" type="button" value=" Cancel " name="cancel_button" onClick="CancelScript">
</CENTER>