-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathjohn.html
301 lines (262 loc) · 8.9 KB
/
john.html
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
<html><head><base href="." /><style>
body {
font-family: 'Courier New', monospace;
background-color: #1a1a1a;
color: #00ff00;
padding: 20px;
}
.container {
max-width: 1200px;
margin: 0 auto;
}
.tool-section {
background-color: #2a2a2a;
border: 1px solid #00ff00;
border-radius: 5px;
padding: 15px;
margin-bottom: 20px;
box-shadow: 0 0 10px rgba(0, 255, 0, 0.2);
transition: all 0.3s ease;
}
.tool-section:hover {
transform: translateX(5px);
box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}
.tool-header {
display: flex;
justify-content: space-between;
align-items: center;
cursor: pointer;
padding: 5px;
border-bottom: 1px dashed #00ff00;
}
.tool-header h2 {
margin: 0;
font-size: 1.4em;
}
.tool-content {
display: block !important;
padding: 20px;
}
.flex-row {
display: flex;
gap: 20px;
align-items: flex-start;
}
.flex-column {
flex: 1;
}
.option-group {
background-color: #222;
padding: 20px;
margin: 15px 0;
border-radius: 5px;
border: 1px solid #00ff00;
}
.option-group h3 {
color: #00ff00;
margin-bottom: 15px;
border-bottom: 1px solid #00ff00;
padding-bottom: 5px;
}
.checkbox-group {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 15px;
margin: 15px 0;
}
button {
background-color: #004400;
color: #00ff00;
border: 1px solid #00ff00;
padding: 10px 20px;
cursor: pointer;
margin: 5px;
border-radius: 3px;
transition: all 0.3s ease;
}
button:hover {
background-color: #006600;
box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}
.generate-button {
width: 100%;
padding: 15px;
font-size: 1.2em;
margin-top: 20px;
background-color: #004400;
transition: all 0.3s ease;
}
.generate-button:hover {
background-color: #006600;
transform: scale(1.02);
}
#command-output {
background-color: #000;
padding: 20px;
border: 1px solid #00ff00;
margin-top: 20px;
min-height: 50px;
border-radius: 5px;
position: relative;
}
.copy-button {
position: absolute;
top: 10px;
right: 10px;
}
.blink {
animation: blink 1s step-end infinite;
}
@keyframes blink {
50% { opacity: 0; }
}
.tool-description {
font-size: 1.1em;
margin: 10px 0 20px 0;
}
input[type="text"], select {
background-color: #333;
color: #00ff00;
border: 1px solid #00ff00;
padding: 8px;
margin: 5px 0;
border-radius: 3px;
width: 100%;
}
</style></head><body>
<div class="container">
<h1>John the Ripper Command Generator</h1>
<div class="tool-section">
<div class="tool-header">
<h2>John Configuration</h2>
<div class="tool-description">Advanced Password Cracker</div>
</div>
<div class="tool-content active">
<!-- Input File Options -->
<div class="option-group">
<h3>Input</h3>
<label>Hash File Path:</label>
<input type="text" id="john-input" placeholder="/path/to/hashes.txt">
<div class="checkbox-group">
<div><input type="checkbox" id="john-format" value="--format="> <select id="hash-format">
<option value="NT">NT (NTLM)</option>
<option value="md5">MD5</option>
<option value="sha1">SHA1</option>
<option value="Raw-SHA256">SHA256</option>
<option value="bcrypt">bcrypt</option>
<option value="Raw-MD5">Raw-MD5</option>
<option value="mysql">MySQL</option>
<option value="oracle">Oracle</option>
</select></div>
</div>
</div>
<!-- Wordlist Options -->
<div class="option-group">
<h3>Wordlist Configuration</h3>
<label>Wordlist Path:</label>
<input type="text" id="john-wordlist" placeholder="/path/to/wordlist.txt">
<div class="checkbox-group">
<div><input type="checkbox" id="john-rules" value="--rules"> Use rules</div>
<div><input type="checkbox" id="john-incremental" value="--incremental"> Incremental mode</div>
<div><input type="checkbox" id="john-external" value="--external:"> External mode</div>
<div><input type="checkbox" id="john-loopback" value="--loopback"> Loopback mode</div>
</div>
</div>
<!-- Performance Options -->
<div class="option-group">
<h3>Performance</h3>
<div class="checkbox-group">
<div><input type="checkbox" id="john-fork" value="--fork=4"> Use 4 processes</div>
<div><input type="checkbox" id="john-opensql" value="--opencl"> Use OpenCL</div>
<div><input type="checkbox" id="john-single" value="--single"> Single crack mode</div>
<div><input type="checkbox" id="john-markov" value="--markov"> Markov mode</div>
</div>
</div>
<!-- Session Options -->
<div class="option-group">
<h3>Session Management</h3>
<div class="checkbox-group">
<div><input type="checkbox" id="john-session" value="--session=mysession"> Save session</div>
<div><input type="checkbox" id="john-restore" value="--restore"> Restore session</div>
<div><input type="checkbox" id="john-status" value="--status"> Show status</div>
</div>
</div>
<!-- Output Options -->
<div class="option-group">
<h3>Output Options</h3>
<div class="checkbox-group">
<div><input type="checkbox" id="john-pot" value="--pot=custom.pot"> Custom pot file</div>
<div><input type="checkbox" id="john-show" value="--show"> Show cracked passwords</div>
<div><input type="checkbox" id="john-log" value="--log=john.log"> Enable logging</div>
</div>
</div>
<!-- Advanced Options -->
<div class="option-group">
<h3>Advanced Options</h3>
<div class="checkbox-group">
<div><input type="checkbox" id="john-mask" value="--mask='?a?a?a?a?a?a'"> Use mask attack</div>
<div><input type="checkbox" id="john-encoding" value="--encoding=UTF-8"> UTF-8 encoding</div>
<div><input type="checkbox" id="john-config" value="--config=john.conf"> Custom config</div>
</div>
</div>
<button onclick="generateJohnCommand()" class="generate-button">Generate Command</button>
</div>
</div>
<!-- Command Output -->
<div id="command-output">
<span class="blink">$</span> <span id="command-text"></span>
<button class="copy-button" onclick="copyCommand()">Copy</button>
</div>
</div>
<script>
function generateJohnCommand() {
const inputFile = document.getElementById('john-input')?.value || '';
const wordlist = document.getElementById('john-wordlist')?.value || '';
let options = [];
// Add format if selected
if (document.getElementById('john-format')?.checked) {
const format = document.getElementById('hash-format')?.value || '';
if (format) options.push(`--format=${format}`);
}
// Add wordlist if provided
if (wordlist) {
options.push(`--wordlist=${wordlist}`);
}
// Add all other checked options
const checkboxIds = [
'john-rules', 'john-incremental', 'john-external', 'john-loopback',
'john-fork', 'john-opensql', 'john-single', 'john-markov',
'john-session', 'john-restore', 'john-status',
'john-pot', 'john-show', 'john-log',
'john-mask', 'john-encoding', 'john-config'
];
checkboxIds.forEach(id => {
const element = document.getElementById(id);
if (element?.checked) {
options.push(element.value);
}
});
// Construct final command
const command = `john ${options.join(' ')} ${inputFile}`
.replace(/\s+/g, ' ')
.trim();
const commandTextElement = document.getElementById('command-text');
if (commandTextElement) {
commandTextElement.textContent = command;
}
}
function copyCommand() {
const commandText = document.getElementById('command-text')?.textContent || '';
navigator.clipboard.writeText(commandText).then(() => {
alert('Command copied to clipboard!');
}).catch(err => {
console.error('Failed to copy command:', err);
alert('Failed to copy command to clipboard');
});
}
document.addEventListener('DOMContentLoaded', () => {
generateJohnCommand();
});
</script>
</body></html>