Debian Codegraph @

src/app/components/lan-table/lan-table.component.html

raw symbols SCIP
1 <div *ngIf="viewSpoof" class="action-container shadow">
2 <form (ngSubmit)="onSpoofStart()">
3 <div class="form-group">
4 <label for="targets">arp.spoof.targets
5 <small class="text-muted">
6 Comma separated list of targets for the arp.spoof module.
7 </small>
8 </label>
9 <input type="text"
10 class="form-control form-control-sm param-input"
11 name="targets"
12 id="targets"
13 placeholder="Current targets of arp.spoof"
14 [(ngModel)]="spoofOpts.targets">
15 </div>
16
17 <div class="form-group">
18 <label for="targets">arp.spoof.whitelist
19 <small class="text-muted">
20 Comma separated list of IP addresses, MAC addresses or aliases to skip while spoofing.
21 </small>
22 </label>
23 <input type="text" class="form-control form-control-sm param-input" id="whitelist" name="whitelist" [(ngModel)]="spoofOpts.whitelist">
24 </div>
25
26 <div class="form-group form-check">
27 <input type="checkbox" class="form-check-input" id="fullDuplex" name="fullDuplex" [(ngModel)]="spoofOpts.fullduplex">
28 <label class="form-check-label" for="fullDuplex">
29 full-duplex spoofing
30 <small class="text-muted">
31 If set, both the targets and the gateway will be attacked, otherwise only the targets.
32 <strong>If the router has ARP spoofing protections in place this will make the attack fail.</strong>
33 </small>
34 </label>
35 </div>
36
37 <div class="form-group form-check">
38 <input type="checkbox" class="form-check-input" id="internal" name="internal" [(ngModel)]="spoofOpts.internal">
39 <label class="form-check-label" for="internal">
40 spoof local connections
41 <small class="text-muted">
42 If set, local connections among computers of the network will be spoofed, otherwise only connections going to and coming from the external networks.
43 </small>
44 </label>
45 </div>
46
47 <div class="form-group form-check">
48 <input type="checkbox" class="form-check-input" id="ban" name="ban" [(ngModel)]="spoofOpts.ban">
49 <label class="form-check-label" for="ban">
50 ban mode
51 <small class="text-muted">
52 If set, packets coming from the targets will not be forwarded and they won't be able to reach the internet.
53 </small>
54 </label>
55 </div>
56
57 <hr/>
58
59 <div class="form-group">
60 <button type="submit" class="btn btn-sm btn-warning">
61 <ng-container *ngIf="isSpoofing">
62 <i class="fas fa-redo-alt"></i>
63 Restart arp.spoof
64 </ng-container>
65 <ng-container *ngIf="!isSpoofing">
66 <i class="fas fa-play"></i>
67 Start arp.spoof
68 </ng-container>
69 </button>
70 <button type="button" class="btn btn-sm btn-dark" style="margin-left: 5px" (click)="hideSpoofMenu()">
71 Cancel
72 </button>
73 </div>
74 </form>
75 </div>
76
77 <div class="table-responsive">
78 <table class="table table-dark table-sm">
79 <thead>
80 <tr>
81 <th width="1%" class="nowrap" sortable-column="ipv4" sort-type="ip" sort-direction="asc">IP</th>
82 <th width="1%" class="nowrap" sortable-column="mac">MAC</th>
83 <th sortable-column="hostname">Hostname</th>
84 <th sortable-column="vendor">Vendor</th>
85 <th width="1%" class="nowrap" sortable-column="sent">Sent</th>
86 <th width="1%" class="nowrap" sortable-column="received">Recvd</th>
87 <th width="1%" class="nowrap" sortable-column="last_seen">Seen</th>
88 <th>Info</th>
89 </tr>
90 </thead>
91 <tbody>
92 <tr *ngIf="hosts.length == 0">
93 <td colspan="6" align="center">
94 <i>empty</i>
95 </td>
96 </tr>
97
98 <tr *ngFor="let host of hosts | search: omnibar.query" [class.alive]="host | alive:1000">
99 <td class="nowrap">
100 <div *ngIf="!scanState.scanning.includes(host.ipv4)" ngbDropdown [open]="visibleMenu == host.mac">
101 <span>
102 <input
103 *ngIf="viewSpoof"
104 type="checkbox"
105 style="margin-right: 15px"
106 [attr.data-ip]="host.ipv4"
107 class="spoof-toggle"
108 [disabled]="host == iface || host == gateway"
109 (change)="updateSpoofingList()"
110 [checked]="isSpoofed(host)">
111
112 <button class="btn btn-sm btn-dark btn-action" ngbDropdownToggle (click)="visibleMenu = (visibleMenu == host.mac ? null : host.mac)">
113 {{ host.ipv4 }}
114 </button>
115 <div ngbDropdownMenu class="menu-dropdown">
116 <ul>
117 <li>
118 <a (click)="visibleMenu = null; clipboard.copy(host.ipv4)">Copy</a>
119 </li>
120 <li>
121 <a (click)="visibleMenu = null; showScannerModal(host)">Scan Ports</a>
122 </li>
123 <li *ngIf="isSpoofed(host)">
124 <a (click)="showSpoofMenuFor(host, false)">Remove from arp.spoof.targets</a>
125 </li>
126 <li *ngIf="!isSpoofed(host)">
127 <a (click)="showSpoofMenuFor(host, true)">Add to arp.spoof.targets</a>
128 </li>
129 </ul>
130 </div>
131
132 <i *ngIf="isSpoofed(host)" style="margin-left: 5px; color: #d2322d" ngbTooltip="Part of arp.spoof.targets" class="fas fa-radiation"></i>
133
134 </span>
135 </div>
136
137 <span *ngIf="scanState.scanning.includes(host.ipv4)">
138 {{ host.ipv4 }}
139 <span class="badge badge-pill badge-warning" style="margin-left: 5px" ngbTooltip="Scanning {{ scanState.progress }}% ...">
140 <span class="spinner-border spinner-border-sm" style="font-size:.7rem" role="status" aria-hidden="true"></span>
141 {{ scanState.progress | number:'1.0-0' }}%
142 <a style="cursor: pointer" (click)="api.cmd('syn.scan stop')" ngbTooltip="Stop scan">
143 <i class="fas fa-stop"></i>
144 </a>
145 </span>
146 </span>
147
148 </td>
149 <td>
150 <div ngbDropdown [open]="visibleMenu == host.mac + 'mac'">
151 <button class="btn btn-sm btn-dark btn-action" ngbDropdownToggle (click)="visibleMenu = (visibleMenu == host.mac + 'mac' ? null : host.mac + 'mac')">
152 {{ host.mac | uppercase }}
153 </button>
154 <div ngbDropdownMenu class="menu-dropdown">
155 <ul>
156 <li>
157 <a (click)="visibleMenu = null; clipboard.copy(host.mac.toUpperCase())">Copy</a>
158 </li>
159 <li>
160 <a (click)="visibleMenu = null; setAlias(host)">Set Alias</a>
161 </li>
162 </ul>
163 </div>
164 </div>
165 </td>
166 <td [class.empty]="!host.hostname && !host.alias">
167 {{ host.hostname }}
168
169 <span *ngIf="host.alias" (click)="setAlias(host)" class="badge badge-pill badge-secondary" style="cursor: pointer">
170 {{ host.alias }}
171 </span>
172 </td>
173 <td [class.empty]="!host.vendor">{{ host.vendor ? host.vendor : 'unknown' }}</td>
174 <td [class.empty]="!host.sent" class="nowrap">{{ host.sent | size }}</td>
175 <td [class.empty]="!host.received" class="nowrap">{{ host.received | size }}</td>
176 <td class="time">{{ host.last_seen | date: 'HH:mm:ss'}}</td>
177 <td class="metas nowrap">
178
179 <span *ngIf="host.mac == iface.mac" class="badge badge-secondary btn-tiny">interface</span>
180 <span *ngIf="host.mac == gateway.mac" class="badge badge-secondary btn-tiny">gateway</span>
181
182 <span *ngFor="let group of groupMetas(host.meta.values) | keyvalue" class="btn-group drop-left">
183
184 <div ngbDropdown [open]="visibleMeta == host.mac+group.key" placement="left">
185 <button ngbDropdownToggle
186 class="btn btn-sm badge badge-warning btn-action drop-small btn-tiny"
187 [class.badge-danger]="group.key == 'PORTS'"
188 (click)="visibleMeta = (visibleMeta == host.mac+group.key ? null : host.mac+group.key)">
189 {{ group.key }}
190 </button>
191
192 <div ngbDropdownMenu class="menu-dropdown">
193 <table class="table table-sm table-dark">
194 <tbody>
195 <ng-container *ngIf="group.key == 'PORTS'">
196 <tr *ngFor="let port of host.meta.values.ports | keyvalue">
197 <td>{{ port.value.port }}</td>
198 <td [class.empty]="port.value.service == ''">{{ port.value.service ? port.value.service : '?' }}</td>
199 <td class="text-muted">{{ port.value.proto }}</td>
200 <td [class.empty]="port.value.banner == ''">{{ port.value.banner ? port.value.banner : 'no banner' }}</td>
201 </tr>
202 </ng-container>
203
204 <ng-container *ngIf="group.key != 'PORTS'">
205 <tr *ngFor="let item of group.value | keyvalue">
206 <th>{{ item.key == undefined || item.key === 'undefined' ? '' : item.key }}</th>
207 <td>{{ item.value }}</td>
208 </tr>
209 </ng-container>
210 </tbody>
211 </table>
212 </div>
213
214 </div>
215
216 </span>
217
218 </td>
219 </tr>
220 </tbody>
221 </table>
222 </div>
223
224 <div id="scannerModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="scannerModalTitle">
225 <div class="modal-dialog" role="document">
226 <div class="modal-content">
227 <div class="modal-header">
228 <div class="modal-title" id="scannerModalTitle">
229 <h5>Select Ports</h5>
230 </div>
231 <button type="button" class="close" data-dismiss="modal" aria-label="Close">
232 <span aria-hidden="true">&times;</span>
233 </button>
234 </div>
235 <div class="modal-body">
236 <form (ngSubmit)="doPortScan()">
237 <div class="form-group row">
238 <label for="scanIP" class="col-sm-1 col-form-label">IP</label>
239 <div class="col-sm">
240 <input type="text" class="form-control param-input" id="scanIP" value="">
241 </div>
242 </div>
243 <div class="form-group row">
244 <label for="startPort" class="col-sm-1 col-form-label">Start</label>
245 <div class="col-sm">
246 <input type="number" min="1" max="65535" class="form-control param-input" id="startPort" value="1">
247 </div>
248 <label for="endPort" class="col-sm-1 col-form-label">End</label>
249 <div class="col-sm">
250 <input type="number" min="1" max="65535" class="form-control param-input" id="endPort" value="1000">
251 </div>
252 </div>
253 <div class="text-right">
254 <button type="submit" class="btn btn-dark">Scan</button>
255 </div>
256 </form>
257 </div>
258 </div>
259 </div>
260 </div>
261
262 <div id="inputModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="inputModalTitle">
263 <div class="modal-dialog" role="document">
264 <div class="modal-content">
265 <div class="modal-header">
266 <div class="modal-title">
267 <h5 id="inputModalTitle"></h5>
268 </div>
269 <button type="button" class="close" data-dismiss="modal" aria-label="Close">
270 <span aria-hidden="true">&times;</span>
271 </button>
272 </div>
273 <div class="modal-body">
274 <form (ngSubmit)="doSetAlias()">
275 <div class="form-group row">
276 <div class="col">
277 <input type="text" class="form-control param-input" id="in" value="">
278 <input type="hidden" id="inhost" value="">
279 </div>
280 </div>
281 <div class="text-right">
282 <button type="submit" class="btn btn-dark">Ok</button>
283 </div>
284 </form>
285 </div>
286 </div>
287 </div>
288 </div>