Skip to content

Instantly share code, notes, and snippets.

@suraneti
Last active June 25, 2020 06:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save suraneti/80752c5887440a4c7181b9dc5c367c3f to your computer and use it in GitHub Desktop.
Save suraneti/80752c5887440a4c7181b9dc5c367c3f to your computer and use it in GitHub Desktop.
Example of sending command to rAthena database.
const axios = require('axios');
const qs = require('qs');
const payload = qs.stringify({
'command': '@deathnote plan3' // example command
});
const config = {
method: 'post',
url: 'http://128.199.234.106/?module=webcommands',
headers: {
'Connection': 'keep-alive',
'Pragma': 'no-cache',
'Cache-Control': 'no-cache',
'Upgrade-Insecure-Requests': '1',
'Origin': 'http://128.199.234.106',
'Content-Type': 'application/x-www-form-urlencoded',
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
'Referer': 'http://128.199.234.106/?module=account&action=login&return_url=%2F%3Fmodule%3Dwebcommands',
'Accept-Language': 'en,th-TH;q=0.9,th;q=0.8',
'Cookie': 'fluxSessionData=pppt6pm239fl6ofsviime4so07; fluxSessionData=2k79opjjk55um0mp76fuaj4eit'
},
data: payload
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
@suraneti
Copy link
Author

Get Cookie by login account on fluxCP site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment