File size: 47,385 Bytes
d8c6121
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>AI Hacker Agent - Intelligent Cyber Attack Simulation</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        /* Custom CSS for animations and special effects */
        .chat-message-enter {
            opacity: 0;
            transform: translateY(10px);
        }
        .chat-message-enter-active {
            opacity: 1;
            transform: translateY(0);
            transition: opacity 300ms, transform 300ms;
        }
        .attack-path {
            stroke-dasharray: 1000;
            stroke-dashoffset: 1000;
            animation: dash 2s linear forwards;
        }
        @keyframes dash {
            to {
                stroke-dashoffset: 0;
            }
        }
        .glowing-border {
            animation: pulse 2s infinite;
        }
        @keyframes pulse {
            0%, 100% {
                box-shadow: 0 0 5px rgba(59, 130, 246, 0.5);
            }
            50% {
                box-shadow: 0 0 15px rgba(59, 130, 246, 0.8);
            }
        }
        .attack-animation {
            animation: attackPulse 1.5s infinite;
        }
        @keyframes attackPulse {
            0%, 100% {
                transform: scale(1);
                box-shadow: 0 0 5px rgba(220, 38, 38, 0.5);
            }
            50% {
                transform: scale(1.05);
                box-shadow: 0 0 15px rgba(220, 38, 38, 0.8);
            }
        }
        .rotate-icon {
            animation: spin 2s linear infinite;
        }
        @keyframes spin {
            from {
                transform: rotate(0deg);
            }
            to {
                transform: rotate(360deg);
            }
        }
        .terminal-font {
            font-family: 'Courier New', monospace;
        }
    </style>
</head>
<body class="bg-gray-900 text-gray-100">
    <!-- Main Container -->
    <div class="flex flex-col h-screen">
        <!-- Header -->
        <header class="bg-gray-800 border-b border-gray-700 p-4 flex items-center justify-between">
            <div class="flex items-center space-x-3">
                <div class="bg-blue-500 p-2 rounded-full">
                    <i class="fas fa-robot text-white text-xl"></i>
                </div>
                <h1 class="text-2xl font-bold">AI Hacker Agent</h1>
                <span class="px-2 py-1 bg-green-600 rounded-md text-xs font-semibold">v2.0</span>
            </div>
            <div class="flex items-center space-x-4">
                <div class="relative group">
                    <button class="p-2 rounded-full hover:bg-gray-700">
                        <i class="fas fa-bell text-gray-400"></i>
                        <span class="absolute top-0 right-0 w-2 h-2 bg-red-500 rounded-full"></span>
                    </button>
                    <div class="hidden group-hover:block absolute right-0 mt-2 w-64 bg-gray-800 border border-gray-700 rounded-md shadow-lg z-10">
                        <div class="p-3 border-b border-gray-700">
                            <p class="text-sm font-semibold">3 New Alerts</p>
                        </div>
                        <div class="p-3 text-sm">
                            <p class="mb-2"><span class="text-red-400">[Critical]</span> Unauthorized access detected</p>
                            <p class="mb-2"><span class="text-yellow-400">[Warning]</span> New CVE-2023-1234 found</p>
                            <p><span class="text-blue-400">[Info]</span> System update available</p>
                        </div>
                    </div>
                </div>
                <div class="flex items-center space-x-2 cursor-pointer">
                    <div class="w-8 h-8 rounded-full bg-blue-600 flex items-center justify-center">
                        <span class="font-semibold">SA</span>
                    </div>
                    <span class="text-sm">Security Admin</span>
                </div>
            </div>
        </header>

        <!-- Main Content -->
        <div class="flex flex-1 overflow-hidden">
            <!-- Sidebar -->
            <aside class="w-64 bg-gray-800 border-r border-gray-700 flex flex-col">
                <div class="p-4 border-b border-gray-700">
                    <h2 class="text-lg font-semibold">Navigation</h2>
                </div>
                <nav class="flex-1 overflow-y-auto">
                    <ul>
                        <li>
                            <a href="#" class="flex items-center p-3 hover:bg-gray-700 text-blue-400">
                                <i class="fas fa-comment-dots mr-3"></i>
                                <span>AI Dialog</span>
                            </a>
                        </li>
                        <li>
                            <a href="#" class="flex items-center p-3 hover:bg-gray-700">
                                <i class="fas fa-scroll mr-3"></i>
                                <span>Attack Scripts</span>
                            </a>
                        </li>
                        <li>
                            <a href="#" class="flex items-center p-3 hover:bg-gray-700">
                                <i class="fas fa-list-check mr-3"></i>
                                <span>Task List</span>
                            </a>
                        </li>
                        <li>
                            <a href="#" class="flex items-center p-3 hover:bg-gray-700">
                                <i class="fas fa-chart-pie mr-3"></i>
                                <span>Data Analysis</span>
                            </a>
                        </li>
                        <li>
                            <a href="#" class="flex items-center p-3 hover:bg-gray-700">
                                <i class="fas fa-building-shield mr-3"></i>
                                <span>Asset Management</span>
                            </a>
                        </li>
                        <li>
                            <a href="#" class="flex items-center p-3 hover:bg-gray-700">
                                <i class="fas fa-toolbox mr-3"></i>
                                <span>MCP Tools</span>
                            </a>
                        </li>
                    </ul>
                </nav>
                <div class="p-4 border-t border-gray-700">
                    <div class="bg-gray-900 rounded-lg p-3">
                        <div class="flex items-center">
                            <div class="w-10 h-10 rounded-full bg-purple-600 flex items-center justify-center mr-3">
                                <i class="fas fa-shield-halved"></i>
                            </div>
                            <div>
                                <h4 class="font-medium text-sm">System Status</h4>
                                <div class="flex items-center">
                                    <div class="w-2 h-2 rounded-full bg-green-500 mr-2"></div>
                                    <span class="text-xs">All systems operational</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </aside>

            <!-- Main Panel -->
            <main class="flex-1 flex flex-col overflow-hidden bg-gray-900">
                <!-- Task Header -->
                <div class="p-4 border-b border-gray-700 flex items-center justify-between">
                    <div>
                        <h2 class="text-xl font-bold">AI Dialog Interface</h2>
                        <p class="text-sm text-gray-400">Natural language interaction with AI Hacker Agent</p>
                    </div>
                    <div>
                        <button class="px-4 py-2 bg-blue-600 hover:bg-blue-700 rounded-md mr-2">
                            <i class="fas fa-plus mr-2"></i> New Attack Simulation
                        </button>
                        <button class="px-4 py-2 bg-gray-700 hover:bg-gray-600 rounded-md">
                            <i class="fas fa-question mr-2"></i> Help
                        </button>
                    </div>
                </div>

                <!-- Main Content Area -->
                <div class="flex-1 flex overflow-hidden">
                    <!-- Left Panel - Chat Interface -->
                    <div class="w-1/2 border-r border-gray-700 flex flex-col">
                        <!-- Chat Header -->
                        <div class="p-4 border-b border-gray-700 flex items-center">
                            <div class="relative">
                                <div class="w-8 h-8 rounded-full bg-blue-500 flex items-center justify-center mr-3">
                                    <i class="fas fa-robot text-white"></i>
                                </div>
                                <span class="absolute -bottom-1 -right-1 w-3 h-3 bg-green-500 rounded-full border-2 border-gray-800"></span>
                            </div>
                            <div>
                                <h3 class="font-semibold">AI Hacker Agent</h3>
                                <p class="text-xs text-gray-400">Online - Ready to assist</p>
                            </div>
                        </div>
                        
                        <!-- Chat Messages -->
                        <div id="chat-messages" class="flex-1 overflow-y-auto p-4 space-y-4">
                            <!-- AI Welcome Message -->
                            <div class="flex animate-[chat-message-enter_0.3s_ease-out]">
                                <div class="w-8 h-8 rounded-full bg-blue-500 flex-shrink-0 flex items-center justify-center mr-3">
                                    <i class="fas fa-robot text-white"></i>
                                </div>
                                <div>
                                    <div class="bg-gray-800 rounded-lg p-3 max-w-[80%]">
                                        <p>Welcome to AI Hacker Agent v2.0. I'm your AI assistant for intelligent cyber attack simulations.</p>
                                        <p class="mt-2">How can I help you with your security testing today? Here are some examples:</p>
                                        <ul class="list-disc pl-5 mt-2 space-y-1 text-blue-300">
                                            <li>"Perform a full network penetration test"</li>
                                            <li>"Check for SQL injection vulnerabilities"</li>
                                            <li>"Simulate a phishing email campaign"</li>
                                        </ul>
                                    </div>
                                    <div class="text-xs text-gray-500 mt-1">Today at 10:02 AM</div>
                                </div>
                            </div>
                            
                            <!-- User Example Message -->
                            <div class="flex justify-end animate-[chat-message-enter_0.3s_ease-out]">
                                <div>
                                    <div class="bg-blue-600 rounded-lg p-3 max-w-[80%] ml-auto">
                                        <p>I want to simulate an advanced persistent threat against our web applications and internal network.</p>
                                    </div>
                                    <div class="text-xs text-gray-500 mt-1 text-right">Today at 10:03 AM</div>
                                </div>
                            </div>
                            
                            <!-- AI Response -->
                            <div class="flex animate-[chat-message-enter_0.3s_ease-out]">
                                <div class="w-8 h-8 rounded-full bg-blue-500 flex-shrink-0 flex items-center justify-center mr-3">
                                    <i class="fas fa-robot text-white"></i>
                                </div>
                                <div>
                                    <div class="bg-gray-800 rounded-lg p-3 max-w-[80%]">
                                        <p class="font-medium mb-2">I've generated an attack simulation plan targeting web applications and internal networks:</p>
                                        
                                        <div class="bg-gray-900 rounded-md p-3 mb-3 border border-gray-700">
                                            <h4 class="font-semibold text-blue-300 text-sm mb-1">Attack Simulation Plan</h4>
                                            <ol class="list-decimal pl-5 space-y-1 text-sm">
                                                <li>Web Application Scanning (SQLi, XSS, RCE)</li>
                                                <li>Credential Stuffing via Exposed APIs</li>
                                                <li>Lateral Movement via SMB/AD Exploits</li>
                                                <li>Data Exfiltration Simulation</li>
                                            </ol>
                                            <div class="flex space-x-2 mt-3">
                                                <button class="text-xs px-2 py-1 bg-green-600 hover:bg-green-700 rounded">
                                                    <i class="fas fa-check mr-1"></i> Approve
                                                </button>
                                                <button class="text-xs px-2 py-1 bg-blue-600 hover:bg-blue-700 rounded" onclick="showEditOptions()">
                                                    <i class="fas fa-pen mr-1"></i> Edit
                                                </button>
                                                <button class="text-xs px-2 py-1 bg-red-600 hover:bg-red-700 rounded">
                                                    <i class="fas fa-times mr-1"></i> Reject
                                                </button>
                                            </div>
                                        </div>
                                        
                                        <p>Would you like me to proceed with this plan or make adjustments?</p>
                                    </div>
                                    <div class="text-xs text-gray-500 mt-1">Today at 10:03 AM</div>
                                </div>
                            </div>
                        </div>
                        
                        <!-- Input Area -->
                        <div class="p-4 border-t border-gray-700">
                            <div class="flex items-center space-x-2">
                                <button class="p-2 rounded-full hover:bg-gray-700">
                                    <i class="fas fa-paperclip text-gray-400"></i>
                                </button>
                                <div class="flex-1 relative">
                                    <input type="text" id="chat-input" placeholder="Type your message or attack request..." 
                                        class="w-full bg-gray-800 rounded-full py-3 px-4 pr-10 focus:outline-none focus:ring-2 focus:ring-blue-500">
                                    <button class="absolute right-3 top-3 text-gray-400 hover:text-blue-400">
                                        <i class="far fa-smile"></i>
                                    </button>
                                </div>
                                <button id="send-button" class="p-3 rounded-full bg-blue-600 hover:bg-blue-700">
                                    <i class="fas fa-paper-plane"></i>
                                </button>
                            </div>
                            <div class="mt-2 text-xs text-gray-500 flex justify-between">
                                <div>
                                    <span class="cursor-pointer hover:text-blue-400"><i class="fas fa-magic mr-1"></i> AI Suggestions</span>
                                    <span class="mx-2">|</span>
                                    <span class="cursor-pointer hover:text-blue-400"><i class="fas fa-history mr-1"></i> History</span>
                                </div>
                                <div>
                                    <span class="cursor-pointer hover:text-blue-400">Advanced Options</span>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    <!-- Right Panel - Attack Visualization -->
                    <div class="w-1/2 flex flex-col bg-gray-800">
                        <!-- Attack Visualization Header -->
                        <div class="p-4 border-b border-gray-700 flex justify-between items-center">
                            <h3 class="font-semibold">Attack Simulation Dashboard</h3>
                            <div class="flex space-x-2">
                                <button class="p-2 rounded hover:bg-gray-700 text-sm">
                                    <i class="fas fa-sync-alt mr-1"></i> Refresh
                                </button>
                                <button class="p-2 rounded hover:bg-gray-700 text-sm">
                                    <i class="fas fa-sliders-h mr-1"></i> Filters
                                </button>
                            </div>
                        </div>
                        
                        <!-- Attack Strategy Visualization -->
                        <div class="p-4 border-b border-gray-700">
                            <h4 class="font-medium text-sm mb-3 flex items-center">
                                <i class="fas fa-project-diagram mr-2 text-blue-400"></i>
                                Planned Attack Path
                            </h4>
                            <div class="relative overflow-auto bg-gray-900 rounded-lg p-4 h-48 flex items-center justify-center glowing-border">
                                <svg width="100%" height="100%" viewBox="0 0 400 160" class="min-w-[400px]">
                                    <!-- Web Server -->
                                    <rect x="10" y="50" width="80" height="60" rx="5" fill="none" stroke="#3B82F6" stroke-width="2" class="attack-animation" />
                                    <text x="50" y="90" text-anchor="middle" fill="#fff" font-size="12" font-family="Arial">Web App</text>
                                    
                                    <!-- First Arrow -->
                                    <path d="M100,80 L130,80" stroke="#3B82F6" stroke-width="2" marker-end="url(#arrowhead)" class="attack-path" />
                                    
                                    <!-- API Gateway -->
                                    <rect x="140" y="50" width="80" height="60" rx="5" fill="none" stroke="#3B82F6" stroke-width="2" />
                                    <text x="180" y="90" text-anchor="middle" fill="#fff" font-size="12" font-family="Arial">API</text>
                                    
                                    <!-- Second Arrow -->
                                    <path d="M230,80 L260,80" stroke="#3B82F6" stroke-width="2" marker-end="url(#arrowhead)" class="attack-path" />
                                    
                                    <!-- Database -->
                                    <rect x="270" y="50" width="80" height="60" rx="5" fill="none" stroke="#3B82F6" stroke-width="2" />
                                    <text x="310" y="90" text-anchor="middle" fill="#fff" font-size="12" font-family="Arial">Database</text>
                                    
                                    <!-- Arrowhead definition -->
                                    <defs>
                                        <marker id="arrowhead" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto">
                                            <polygon points="0 0, 10 3.5, 0 7" fill="#3B82F6"/>
                                        </marker>
                                    </defs>
                                </svg>
                            </div>
                        </div>
                        
                        <!-- Attack Execution Status -->
                        <div class="p-4 border-b border-gray-700">
                            <h4 class="font-medium text-sm mb-3 flex items-center">
                                <i class="fas fa-tasks mr-2 text-green-400"></i>
                                Current Task Status
                            </h4>
                            <div class="space-y-3">
                                <div class="flex items-center justify-between">
                                    <div class="flex items-center">
                                        <div class="w-3 h-3 rounded-full bg-yellow-400 mr-2 animate-pulse"></div>
                                        <span class="text-sm">Web Application Scanning</span>
                                    </div>
                                    <span class="text-xs bg-gray-700 px-2 py-1 rounded">In Progress</span>
                                </div>
                                <div class="flex items-center justify-between">
                                    <div class="flex items-center">
                                        <div class="w-3 h-3 rounded-full bg-gray-500 mr-2"></div>
                                        <span class="text-sm text-gray-400">Credential Stuffing</span>
                                    </div>
                                    <span class="text-xs bg-gray-700 px-2 py-1 rounded">Pending</span>
                                </div>
                                <div class="flex items-center justify-between">
                                    <div class="flex items-center">
                                        <div class="w-3 h-3 rounded-full bg-gray-500 mr-2"></div>
                                        <span class="text-sm text-gray-400">Lateral Movement</span>
                                    </div>
                                    <span class="text-xs bg-gray-700 px-2 py-1 rounded">Pending</span>
                                </div>
                                <div class="flex items-center justify-between">
                                    <div class="flex items-center">
                                        <div class="w-3 h-3 rounded-full bg-gray-500 mr-2"></div>
                                        <span class="text-sm text-gray-400">Data Exfiltration</span>
                                    </div>
                                    <span class="text-xs bg-gray-700 px-2 py-1 rounded">Pending</span>
                                </div>
                            </div>
                        </div>
                        
                        <!-- Asset Details -->
                        <div class="p-4 border-b border-gray-700">
                            <h4 class="font-medium text-sm mb-3 flex items-center">
                                <i class="fas fa-server mr-2 text-purple-400"></i>
                                Targeted Assets
                            </h4>
                            <div class="grid grid-cols-2 gap-2 text-sm">
                                <div class="bg-gray-900 p-2 rounded border border-gray-700">
                                    <div class="flex items-center">
                                        <i class="fas fa-globe mr-2 text-blue-400"></i>
                                        <span>Web Server (192.168.1.50)</span>
                                    </div>
                                </div>
                                <div class="bg-gray-900 p-2 rounded border border-gray-700">
                                    <div class="flex items-center">
                                        <i class="fas fa-database mr-2 text-green-400"></i>
                                        <span>PostgreSQL (192.168.1.51)</span>
                                    </div>
                                </div>
                                <div class="bg-gray-900 p-2 rounded border border-gray-700">
                                    <div class="flex items-center">
                                        <i class="fas fa-network-wired mr-2 text-yellow-400"></i>
                                        <span>Internal Network (/24)</span>
                                    </div>
                                </div>
                                <div class="bg-gray-900 p-2 rounded border border-gray-700">
                                    <div class="flex items-center">
                                        <i class="fas fa-users mr-2 text-red-400"></i>
                                        <span>Active Directory</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                        <!-- Quick Actions -->
                        <div class="p-4">
                            <h4 class="font-medium text-sm mb-3 flex items-center">
                                <i class="fas fa-bolt mr-2 text-yellow-400"></i>
                                Quick Actions
                            </h4>
                            <div class="grid grid-cols-3 gap-2">
                                <button class="bg-gray-700 hover:bg-gray-600 p-2 rounded-md text-xs">
                                    <i class="fas fa-stop mr-1"></i> Stop
                                </button>
                                <button class="bg-blue-600 hover:bg-blue-700 p-2 rounded-md text-xs">
                                    <i class="fas fa-pause mr-1"></i> Pause
                                </button>
                                <button class="bg-green-600 hover:bg-green-700 p-2 rounded-md text-xs">
                                    <i class="fas fa-play mr-1"></i> Resume
                                </button>
                                <button class="bg-purple-600 hover:bg-purple-700 p-2 rounded-md text-xs">
                                    <i class="fas fa-file-export mr-1"></i> Export
                                </button>
                                <button class="bg-yellow-600 hover:bg-yellow-700 p-2 rounded-md text-xs">
                                    <i class="fas fa-stopwatch mr-1"></i> Schedule
                                </button>
                                <button class="bg-red-600 hover:bg-red-700 p-2 rounded-md text-xs">
                                    <i class="fas fa-trash mr-1"></i> Delete
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </main>
        </div>
    </div>
    
    <!-- Edit Attack Plan Modal -->
    <div id="edit-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
        <div class="bg-gray-800 rounded-lg w-1/2 max-w-2xl">
            <div class="p-4 border-b border-gray-700 flex justify-between items-center">
                <h3 class="font-semibold">Edit Attack Simulation Plan</h3>
                <button onclick="hideEditOptions()" class="text-gray-400 hover:text-white">
                    <i class="fas fa-times"></i>
                </button>
            </div>
            <div class="p-4">
                <div class="space-y-4">
                    <div class="bg-gray-900 p-3 rounded border border-gray-700">
                        <div class="flex items-center justify-between mb-2">
                            <h4 class="font-medium flex items-center">
                                <i class="fas fa-globe mr-2 text-blue-400"></i>
                                Web Application Scanning
                            </h4>
                            <label class="inline-flex items-center cursor-pointer">
                                <input type="checkbox" checked class="sr-only peer">
                                <div class="relative w-9 h-5 bg-gray-700 peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-blue-800 rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-blue-600"></div>
                            </label>
                        </div>
                        <div class="pl-8">
                            <div class="flex items-center mb-1">
                                <input id="web-sqli" type="checkbox" checked class="w-4 h-4 text-blue-600 bg-gray-700 border-gray-600 rounded focus:ring-blue-500">
                                <label for="web-sqli" class="ms-2 text-sm">SQL Injection</label>
                            </div>
                            <div class="flex items-center mb-1">
                                <input id="web-xss" type="checkbox" checked class="w-4 h-4 text-blue-600 bg-gray-700 border-gray-600 rounded focus:ring-blue-500">
                                <label for="web-xss" class="ms-2 text-sm">Cross-Site Scripting (XSS)</label>
                            </div>
                            <div class="flex items-center">
                                <input id="web-rce" type="checkbox" checked class="w-4 h-4 text-blue-600 bg-gray-700 border-gray-600 rounded focus:ring-blue-500">
                                <label for="web-rce" class="ms-2 text-sm">Remote Code Execution</label>
                            </div>
                        </div>
                    </div>
                    
                    <div class="bg-gray-900 p-3 rounded border border-gray-700">
                        <div class="flex items-center justify-between mb-2">
                            <h4 class="font-medium flex items-center">
                                <i class="fas fa-key mr-2 text-green-400"></i>
                                Credential Stuffing
                            </h4>
                            <label class="inline-flex items-center cursor-pointer">
                                <input type="checkbox" checked class="sr-only peer">
                                <div class="relative w-9 h-5 bg-gray-700 peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-blue-800 rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-blue-600"></div>
                            </label>
                        </div>
                        <div class="pl-8">
                            <div class="mb-2">
                                <label class="block text-sm mb-1">Target API Endpoint</label>
                                <input type="text" value="/api/v1/login" class="bg-gray-800 border border-gray-700 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2">
                            </div>
                            <div class="flex items-center mb-1">
                                <input id="use-dictionary" type="checkbox" checked class="w-4 h-4 text-blue-600 bg-gray-700 border-gray-600 rounded focus:ring-blue-500">
                                <label for="use-dictionary" class="ms-2 text-sm">Use Dictionary Attack</label>
                            </div>
                            <div class="flex items-center">
                                <input id="use-cred-stuffing" type="checkbox" class="w-4 h-4 text-blue-600 bg-gray-700 border-gray-600 rounded focus:ring-blue-500">
                                <label for="use-cred-stuffing" class="ms-2 text-sm">Use Known Credentials</label>
                            </div>
                        </div>
                    </div>
                    
                    <div class="bg-gray-900 p-3 rounded border border-gray-700">
                        <div class="flex items-center justify-between mb-2">
                            <h4 class="font-medium flex items-center">
                                <i class="fas fa-arrows-alt mr-2 text-yellow-400"></i>
                                Lateral Movement
                            </h4>
                            <label class="inline-flex items-center cursor-pointer">
                                <input type="checkbox" checked class="sr-only peer">
                                <div class="relative w-9 h-5 bg-gray-700 peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-blue-800 rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-blue-600"></div>
                            </label>
                        </div>
                        <div class="pl-8">
                            <div class="mb-2">
                                <label class="block text-sm mb-1">Target Protocol</label>
                                <select class="bg-gray-800 border border-gray-700 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2">
                                    <option selected>SMB</option>
                                    <option>RDP</option>
                                    <option>Active Directory</option>
                                </select>
                            </div>
                            <div class="flex items-center mb-1">
                                <input id="detect-defenses" type="checkbox" checked class="w-4 h-4 text-blue-600 bg-gray-700 border-gray-600 rounded focus:ring-blue-500">
                                <label for="detect-defenses" class="ms-2 text-sm">Detect Defensive Measures</label>
                            </div>
                        </div>
                    </div>
                    
                    <div class="bg-gray-900 p-3 rounded border border-gray-700">
                        <div class="flex items-center justify-between mb-2">
                            <h4 class="font-medium flex items-center">
                                <i class="fas fa-file-export mr-2 text-red-400"></i>
                                Data Exfiltration
                            </h4>
                            <label class="inline-flex items-center cursor-pointer">
                                <input type="checkbox" checked class="sr-only peer">
                                <div class="relative w-9 h-5 bg-gray-700 peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-blue-800 rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-blue-600"></div>
                            </label>
                        </div>
                        <div class="pl-8">
                            <div class="mb-2">
                                <label class="block text-sm mb-1">Exfiltration Method</label>
                                <select class="bg-gray-800 border border-gray-700 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2">
                                    <option selected>DNS Tunneling</option>
                                    <option>HTTP POST</option>
                                    <option>ICMP</option>
                                </select>
                            </div>
                            <div class="flex items-center">
                                <input id="size-limit" type="checkbox" class="w-4 h-4 text-blue-600 bg-gray-700 border-gray-600 rounded focus:ring-blue-500">
                                <label for="size-limit" class="ms-2 text-sm">Limit Data Size (1MB)</label>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="p-4 border-t border-gray-700 flex justify-end space-x-3">
                <button onclick="hideEditOptions()" class="px-4 py-2 bg-gray-700 hover:bg-gray-600 rounded-md">
                    Cancel
                </button>
                <button onclick="saveEditedPlan()" class="px-4 py-2 bg-green-600 hover:bg-green-700 rounded-md">
                    <i class="fas fa-save mr-2"></i> Save Changes
                </button>
            </div>
        </div>
    </div>
    
    <script>
        // Function to show edit modal
        function showEditOptions() {
            document.getElementById('edit-modal').classList.remove('hidden');
        }
        
        // Function to hide edit modal
        function hideEditOptions() {
            document.getElementById('edit-modal').classList.add('hidden');
        }
        
        // Function to save edited plan
        function saveEditedPlan() {
            // In a real app, this would send data to the backend
            hideEditOptions();
            
            // Add a message to the chat
            const chatMessages = document.getElementById('chat-messages');
            const newMessage = document.createElement('div');
            newMessage.className = 'flex justify-end animate-[chat-message-enter_0.3s_ease-out]';
            newMessage.innerHTML = `
                <div>
                    <div class="bg-blue-600 rounded-lg p-3 max-w-[80%] ml-auto">
                        <p>I've reviewed and edited the attack plan. Please proceed with these adjustments.</p>
                    </div>
                    <div class="text-xs text-gray-500 mt-1 text-right">Just now</div>
                </div>
            `;
            chatMessages.appendChild(newMessage);
            
            // Scroll to bottom
            chatMessages.scrollTop = chatMessages.scrollHeight;
            
            // Simulate AI response
            setTimeout(() => {
                const aiResponse = document.createElement('div');
                aiResponse.className = 'flex animate-[chat-message-enter_0.3s_ease-out]';
                aiResponse.innerHTML = `
                    <div class="w-8 h-8 rounded-full bg-blue-500 flex-shrink-0 flex items-center justify-center mr-3">
                        <i class="fas fa-robot text-white"></i>
                    </div>
                    <div>
                        <div class="bg-gray-800 rounded-lg p-3 max-w-[80%]">
                            <p class="font-medium mb-1">Thank you for your adjustments. I'll update the attack simulation plan accordingly.</p>
                            <div class="flex space-x-2 mt-2">
                                <button class="text-xs px-2 py-1 bg-green-600 hover:bg-green-700 rounded">
                                    <i class="fas fa-play mr-1"></i> Start Simulation
                                </button>
                                <button class="text-xs px-2 py-1 bg-blue-600 hover:bg-blue-700 rounded">
                                    <i class="fas fa-eye mr-1"></i> Preview Changes
                                </button>
                            </div>
                        </div>
                        <div class="text-xs text-gray-500 mt-1">Just now</div>
                    </div>
                `;
                chatMessages.appendChild(aiResponse);
                
                // Scroll to bottom
                chatMessages.scrollTop = chatMessages.scrollHeight;
            }, 1500);
        }
        
        // Handle send button click
        document.getElementById('send-button').addEventListener('click', function() {
            const input = document.getElementById('chat-input');
            const message = input.value.trim();
            
            if (message) {
                const chatMessages = document.getElementById('chat-messages');
                
                // Add user message
                const userMessage = document.createElement('div');
                userMessage.className = 'flex justify-end animate-[chat-message-enter_0.3s_ease-out]';
                userMessage.innerHTML = `
                    <div>
                        <div class="bg-blue-600 rounded-lg p-3 max-w-[80%] ml-auto">
                            <p>${message}</p>
                        </div>
                        <div class="text-xs text-gray-500 mt-1 text-right">Just now</div>
                    </div>
                `;
                chatMessages.appendChild(userMessage);
                
                // Clear input
                input.value = '';
                
                // Scroll to bottom
                chatMessages.scrollTop = chatMessages.scrollHeight;
                
                // Simulate AI thinking
                const thinkingDiv = document.createElement('div');
                thinkingDiv.className = 'flex animate-[chat-message-enter_0.3s_ease-out]';
                thinkingDiv.innerHTML = `
                    <div class="w-8 h-8 rounded-full bg-blue-500 flex-shrink-0 flex items-center justify-center mr-3">
                        <i class="fas fa-robot text-white"></i>
                    </div>
                    <div>
                        <div class="bg-gray-800 rounded-lg p-3 max-w-[80%] flex items-center">
                            <div class="animate-pulse mr-2">AI is thinking</div>
                            <div class="flex space-x-1">
                                <div class="w-2 h-2 bg-gray-400 rounded-full animate-bounce"></div>
                                <div class="w-2 h-2 bg-gray-400 rounded-full animate-bounce" style="animation-delay: 0.2s"></div>
                                <div class="w-2 h-2 bg-gray-400 rounded-full animate-bounce" style="animation-delay: 0.4s"></div>
                            </div>
                        </div>
                    </div>
                `;
                chatMessages.appendChild(thinkingDiv);
                
                // Scroll to bottom again
                chatMessages.scrollTop = chatMessages.scrollHeight;
                
                // Simulate AI response after delay
                setTimeout(() => {
                    // Remove thinking message
                    chatMessages.removeChild(thinkingDiv);
                    
                    // Add AI response
                    const aiResponse = document.createElement('div');
                    aiResponse.className = 'flex animate-[chat-message-enter_0.3s_ease-out]';
                    aiResponse.innerHTML = `
                        <div class="w-8 h-8 rounded-full bg-blue-500 flex-shrink-0 flex items-center justify-center mr-3">
                            <i class="fas fa-robot text-white"></i>
                        </div>
                        <div>
                            <div class="bg-gray-800 rounded-lg p-3 max-w-[80%]">
                                <p class="font-medium mb-2">I've analyzed your request and prepared a detailed attack simulation plan:</p>
                                
                                <div class="bg-gray-900 rounded-md p-3 mb-3 border border-gray-700">
                                    <h4 class="font-semibold text-blue-300 text-sm mb-1">Attack Simulation Plan</h4>
                                    <ol class="list-decimal pl-5 space-y-1 text-sm">
                                        <li>Initial Reconnaissance (Port Scanning)</li>
                                        <li>Vulnerability Assessment</li>
                                        <li>Exploitation Attempts</li>
                                        <li>Post-Exploitation Activities</li>
                                        <li>Data Collection & Exfiltration</li>
                                    </ol>
                                    <div class="flex space-x-2 mt-3">
                                        <button class="text-xs px-2 py-1 bg-green-600 hover:bg-green-700 rounded">
                                            <i class="fas fa-check mr-1"></i> Approve
                                        </button>
                                        <button class="text-xs px-2 py-1 bg-blue-600 hover:bg-blue-700 rounded" onclick="showEditOptions()">
                                            <i class="fas fa-pen mr-1"></i> Edit
                                        </button>
                                        <button class="text-xs px-2 py-1 bg-red-600 hover:bg-red-700 rounded">
                                            <i class="fas fa-times mr-1"></i> Reject
                                        </button>
                                    </div>
                                </div>
                                
                                <p>Would you like me to proceed with this simulation?</p>
                            </div>
                            <div class="text-xs text-gray-500 mt-1">Just now</div>
                        </div>
                    `;
                    chatMessages.appendChild(aiResponse);
                    
                    // Scroll to bottom
                    chatMessages.scrollTop = chatMessages.scrollHeight;
                }, 2000);
            }
        });
        
        // Handle Enter key in chat input
        document.getElementById('chat-input').addEventListener('keypress', function(e) {
            if (e.key === 'Enter') {
                document.getElementById('send-button').click();
            }
        });
    </script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=capta1n/bas555" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>