-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.js
More file actions
43 lines (33 loc) · 1.07 KB
/
Copy pathindex.js
File metadata and controls
43 lines (33 loc) · 1.07 KB
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
//Coded By : DARK KENZ
const fs = require('fs');
const readline = require('readline');
const comboListFilePath = 'combolist.txt';
function parseComboLine(line) {
const [username, password] = line.split(':');
const cleanedPassword = password ? password.slice(0, password.indexOf(' ')) : '';
return cleanedPassword ? `${username}:${cleanedPassword}` : username;
}
function parseComboList() {
const comboList = [];
const lineReader = readline.createInterface({
input: fs.createReadStream(comboListFilePath),
crlfDelay: Infinity
});
lineReader.on('line', (line) => {
const combo = parseComboLine(line);
comboList.push(combo);
});
lineReader.on('close', () => {
const outputFile = 'combolist.txt';
const result = comboList.join('\n');
fs.writeFile(outputFile, result, (err) => {
if (err) {
console.error('Hata oluştu: Dosya kaydedilemedi.');
} else {
console.log('Combo listesi dosyaya kaydedildi.');
}
});
});
}
parseComboList();
//Coded By : DARK KENZ