-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
45 lines (35 loc) · 1.6 KB
/
Copy pathindex.js
File metadata and controls
45 lines (35 loc) · 1.6 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
44
45
const express = require('express');
const multer = require('multer');
const fs = require('fs');
const path = require('path');
const app = express();
const upload = multer();
app.get('/', (req, res) => {
res.sendFile(path.join(__dirname, 'index.html'));
});
app.post('/upload', upload.single('file'), (req, res) => {
const file = req.file;
if (!file || file.mimetype !== 'application/x-msdownload') {
res.status(400).send('Invalid file');
return;
}
const fileContent = req.file.buffer.toString('binary');
let modifiedContent = fileContent;
// Check if the file contains the instance of "http://www.boomlings.com/database"
if (!fileContent.includes('www.boomlings.com/database')) {
res.status(400).send('File does not contain "http://www.boomlings.com/database"! Did you use a gdps?');
return;
} else if(modifiedContent.includes('http://www.boomlings.com/database')) {
modifiedContent = modifiedContent.replace(/http:\/\/www\.boomlings\.com\/database/g, 'https://dindegmdps.us.to/database');
} else {
modifiedContent = modifiedContent.replace(/https:\/\/www\.boomlings\.com\/database/g, 'https://dindegmdps.us.to//database');
}
modifiedContent = modifiedContent.replace(/aHR0cDovL3d3dy5ib29tbGluZ3MuY29tL2RhdGFiYXNl/g, 'aHR0cHM6Ly9kaW5kZWdtZHBzLnVzLnRvL2RhdGFiYXNl');
const modifiedFile = Buffer.from(modifiedContent, 'binary');
res.setHeader('Content-Disposition', 'attachment; filename=DindeGDPS.exe');
res.setHeader('Content-Type', 'application/x-msdownload');
res.send(modifiedFile);
});
app.listen(2000, () => {
console.log(`Server is running on port 2000`);
});