-
Notifications
You must be signed in to change notification settings - Fork 0
/
vostok-service.js
32 lines (31 loc) · 1.05 KB
/
vostok-service.js
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
const axios = require('axios');
const { exec } = require('child_process');
module.exports.getAccount = function (params) {
// const request = {
// method: 'GET',
// responseType: 'json',
// url: params.url,
// headers: {
// Connection: 'keep-alive',
// Pragma: 'no-cache',
// 'Cache-Control': 'no-cache',
// 'Sec-Fetch-Mode': 'cors',
// 'Accept-Language': 'ru-RU',
// Accept: 'application/json, text/javascript, */*; q=0.01',
// 'Accept-Encoding': 'gzip, deflate, br',
// 'X-CSRF-TOKEN': params['X-CSRF-TOKEN'],
// Referer: 'https://ubank.bankvostok.com.ua/',
// 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.3',
// Cookie: params['Cookie']
// }
// };
// return axios(request)
return new Promise((resolve) => {
const command = `curl ${params.fullArgs}`;
console.log(command);
exec(command, function (error, stdout, stderr) {
console.log(stdout);
resolve(stdout);
});
});
};