Skip to content

Commit d3467a8

Browse files
committed
Tooltips and refactoring
1 parent c7dc753 commit d3467a8

File tree

3 files changed

+61
-180
lines changed

3 files changed

+61
-180
lines changed

app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class SQLMapGenerator {
3838
'--random-agent': 'userAgent',
3939
'--mobile': 'mobileUserAgent',
4040
'--referer': 'referer',
41-
'-H': 'headers',
41+
'--headers': 'headers',
4242

4343
'--cookie': 'cookie',
4444
'--cookie-del': 'cookieDel',
@@ -312,7 +312,7 @@ class SQLMapGenerator {
312312
}
313313

314314
this.setStandardConfigItem(config, '--referer');
315-
this.setStandardConfigItem(config, '-H');
315+
this.setStandardConfigItem(config, '--headers');
316316

317317
// ## Authentication
318318
this.setStandardConfigItem(config, '--cookie');

sql-command-builder.html

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,9 @@ <h3>Request Headers</h3>
317317
<label class="form-label" title="HTTP Referer header value" for="referer">HTTP REFERER HEADER<br/><span>--referer</span></label>
318318
<input type="url" id="referer" class="form-control" placeholder="https://127.0.0.1/login">
319319
</div>
320-
<!-- -H -->
320+
<!-- -headers -->
321321
<div class="form-group" title="Extra HTTP headers separated by a newline.">
322-
<label class="form-label" title="Additional HTTP Headers" for="headers">EXTRA HTTP HEADERS<br/><span>-H</span></label>
322+
<label class="form-label" title="Additional HTTP Headers" for="headers">EXTRA HTTP HEADERS<br/><span>--headers</span></label>
323323
<textarea id="headers" class="form-control" rows="4" placeholder="X-Forwarded-For: 127.0.0.1&#10;Authorization: Bearer token"></textarea>
324324
</div>
325325
<h3>Authentication</h3>
@@ -592,7 +592,7 @@ <h3>Attack Optimalization</h3>
592592

593593
<!-- Attack techniques -->
594594
<div class="form-group">
595-
<label class="form-label" title="">ATTACK TECHNIQUES<br/><span>--technique</span></label>
595+
<label class="form-label">ATTACK TECHNIQUES<br/><span>--technique</span></label>
596596
<div class="checkbox-grid">
597597
<label class="checkbox-label">
598598
<input type="checkbox" id="techB" value="B">
@@ -627,8 +627,8 @@ <h3>Attack Optimalization</h3>
627627
</div>
628628
</div>
629629
<!-- Attack tuning -->
630-
<div class="form-group" title="Connection optimization - using persistent HTTP(s) connections">
631-
<label class="form-label">ATTACK TUNING</label>
630+
<div class="form-group">
631+
<label class="form-label" title="Connection optimization - using persistent HTTP(s) connections">ATTACK TUNING</label>
632632
<div class="checkbox-grid">
633633
<!-- --invalid-bignum -->
634634
<label class="checkbox-label" title="This parameter forces sqlmap to use large integer numbers for invalidating original parameter values during SQL injection tests.
@@ -758,8 +758,9 @@ <h3>Attack Optimalization</h3>
758758
<input type="text" id="sqlFile" class="form-control" placeholder="statements.sql">
759759
</div>
760760
<!-- ENUMERATION -->
761-
<div class="checkbox-grid" style="grid-row-start: 1; grid-row-end: 6;" title="These options can be used to enumerate the back-end database management system information, structure and data contained in the tables">
762-
<label class="form-label">ENUMERATION AND DATA EXFILTRATION</label>
761+
<div class="checkbox-grid" style="grid-row-start: 1; grid-row-end: 6;">
762+
<label class="form-label" title="These options can be used to enumerate the back-end database management system information, structure and data contained in the tables">
763+
ENUMERATION AND DATA EXFILTRATION</label>
763764
<label class="checkbox-label" title="Retrieve everything">
764765
<input type="checkbox" id="all">
765766
<span class="checkmark"></span>

style.css

Lines changed: 51 additions & 171 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
--hacker-primary: #00f83e;
2626
--hacker-secondary: #9bffaafa;
2727
--hacker-bg-dark: #0d1117;
28+
--hacker-bg-dark-opacity: #0a0c14ee;
2829
--hacker-surface: #141a23f8;
2930
--hacker-border: #223d2b;
3031

@@ -582,92 +583,6 @@ select.form-control {
582583
rgba(var(--color-info-rgb, 98, 108, 113), var(--status-border-opacity));
583584
}
584585

585-
586-
587-
/* Utility classes */
588-
.flex {
589-
display: flex;
590-
}
591-
.flex-col {
592-
flex-direction: column;
593-
}
594-
.items-center {
595-
align-items: center;
596-
}
597-
.justify-center {
598-
justify-content: center;
599-
}
600-
.justify-between {
601-
justify-content: space-between;
602-
}
603-
.gap-4 {
604-
gap: var(--space-xs);
605-
}
606-
.gap-8 {
607-
gap: var(--space-s);
608-
}
609-
.gap-16 {
610-
gap: var(--space-l);
611-
}
612-
613-
.m-0 {
614-
margin: 0;
615-
}
616-
.mt-8 {
617-
margin-top: var(--space-s);
618-
}
619-
.mb-8 {
620-
margin-bottom: var(--space-s);
621-
}
622-
.mx-8 {
623-
margin-left: var(--space-s);
624-
margin-right: var(--space-s);
625-
}
626-
.my-8 {
627-
margin-top: var(--space-s);
628-
margin-bottom: var(--space-s);
629-
}
630-
631-
.p-0 {
632-
padding: 0;
633-
}
634-
.py-8 {
635-
padding-top: var(--space-s);
636-
padding-bottom: var(--space-s);
637-
}
638-
.px-8 {
639-
padding-left: var(--space-s);
640-
padding-right: var(--space-s);
641-
}
642-
.py-16 {
643-
padding-top: var(--space-l);
644-
padding-bottom: var(--space-l);
645-
}
646-
.px-16 {
647-
padding-left: var(--space-l);
648-
padding-right: var(--space-l);
649-
}
650-
651-
.block {
652-
display: block;
653-
}
654-
.hidden {
655-
display: none;
656-
}
657-
658-
/* Accessibility */
659-
.sr-only {
660-
position: absolute;
661-
width: 1px;
662-
height: 1px;
663-
padding: 0;
664-
margin: -1px;
665-
overflow: hidden;
666-
clip: rect(0, 0, 0, 0);
667-
white-space: nowrap;
668-
border-width: 0;
669-
}
670-
671586
:focus-visible {
672587
outline: var(--focus-outline);
673588
outline-offset: 2px;
@@ -687,7 +602,7 @@ select.form-control {
687602
margin-bottom: var(--space-3xl);
688603
position: sticky;
689604
top: 8px;
690-
z-index: 9999999;
605+
z-index: 900;
691606
}
692607

693608
.command-header {
@@ -732,55 +647,6 @@ select.form-control {
732647
word-break: break-all;
733648
}
734649

735-
/* Templates Section */
736-
.templates-section {
737-
margin-bottom: var(--space-3xl);
738-
}
739-
740-
.templates-section h3 {
741-
color: var(--hacker-primary);
742-
margin-bottom: var(--space-l);
743-
font-size: var(--font-size-xl);
744-
}
745-
746-
.templates-grid {
747-
display: grid;
748-
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
749-
gap: var(--space-l);
750-
}
751-
752-
.template-btn {
753-
background: var(--hacker-surface);
754-
border: 1px solid var(--hacker-border);
755-
border-radius: var(--radius-l);
756-
padding: var(--space-l);
757-
text-align: left;
758-
cursor: pointer;
759-
transition: all 0.3s ease;
760-
display: flex;
761-
flex-direction: column;
762-
}
763-
764-
.template-btn:hover {
765-
border-color: var(--hacker-primary);
766-
box-shadow: 0 0 20px rgba(0, 255, 65, 0.2);
767-
transform: translateY(-2px);
768-
}
769-
770-
.template-btn strong {
771-
color: var(--hacker-primary);
772-
font-size: var(--font-size-l);
773-
margin-bottom: var(--space-s);
774-
}
775-
776-
.template-btn span {
777-
color: var(--color-text-secondary);
778-
font-size: var(--font-size-s);
779-
}
780-
781-
.tab-btn:hover {
782-
color: var(--hacker-primary);
783-
}
784650

785651
/** NAV TABS */
786652
.tab-btn.active {
@@ -825,12 +691,6 @@ select.form-control {
825691
box-shadow: var(--shadow-m);
826692
}
827693

828-
.card__header,
829-
.card__footer {
830-
padding: var(--space-l);
831-
border-bottom: 1px solid var(--color-card-border-inner);
832-
}
833-
834694
.card__body {
835695
padding: var(--space-2xl);
836696
}
@@ -1079,53 +939,73 @@ select.form-control {
1079939
color: #ffe66d;
1080940
}
1081941

942+
.additional-help {
943+
font-size: var(--font-size-s);
944+
color: var(--color-text-secondary);
945+
margin-top: var(--space-l);
946+
line-height: 1.5;
947+
height: 3em;
948+
user-select: none;
949+
}
950+
951+
.row-expand {
952+
grid-column: 1 / -1;
953+
}
954+
955+
/* Hide unstylled arrows from input type number */
956+
input[type=number] {
957+
-moz-appearance: textfield;
958+
appearance: textfield;
959+
margin: 0;
960+
}
961+
input[type=number]::-webkit-inner-spin-button,
962+
input[type=number]::-webkit-outer-spin-button {
963+
-webkit-appearance: none;
964+
margin: 0;
965+
}
966+
1082967
/* Tooltip styles */
1083-
.tooltip {
968+
.tooltip,
969+
[title] {
1084970
position: relative;
1085-
display: inline-block;
971+
1086972
}
1087973

1088-
.tooltip::after {
1089-
content: attr(data-tooltip);
974+
.tooltip::after,
975+
[title]::after {
1090976
position: absolute;
1091-
bottom: 125%;
977+
bottom: calc(100% + var(--space-xs));
1092978
left: 50%;
1093979
transform: translateX(-50%);
1094-
background: var(--hacker-bg-dark);
1095-
color: var(--hacker-primary);
980+
background: var(--hacker-bg-dark-opacity);
981+
color: var(--hacker-secondary);
1096982
padding: var(--space-s);
1097983
border-radius: var(--radius-m);
1098984
font-size: var(--font-size-xs);
1099-
white-space: nowrap;
985+
white-space: normal;
986+
overflow-wrap: break-word;
987+
width: max-content;
988+
max-width: min(30rem, calc(100vw - 2rem));
989+
box-sizing: border-box;
1100990
opacity: 0;
1101991
visibility: hidden;
1102-
transition: all 0.3s ease;
992+
display: none;
993+
transition: opacity 0.3s ease;
1103994
border: 1px solid var(--hacker-border);
1104995
z-index: 1000;
1105996
}
1106997

1107-
.tooltip:hover::after {
1108-
opacity: 1;
1109-
visibility: visible;
1110-
}
1111-
1112-
.additional-help {
1113-
font-size: var(--font-size-s);
1114-
color: var(--color-text-secondary);
1115-
margin-top: var(--space-l);
1116-
line-height: 1.5;
1117-
height: 3em;
1118-
user-select: none;
1119-
}
1120-
1121-
.tamper--script {
1122-
font-weight: bold;
998+
.tooltip::after {
999+
content: attr(data-tooltip);
11231000
}
11241001

1125-
.tamper--help {
1126-
padding-left: 20px;
1002+
[title]::after {
1003+
content: attr(title);
11271004
}
11281005

1129-
.row-expand {
1130-
grid-column: 1 / -1;
1006+
.tooltip:hover::after,
1007+
[title]:hover::after {
1008+
display: block;
1009+
opacity: 1;
1010+
visibility: visible;
11311011
}

0 commit comments

Comments
 (0)