Last active
June 25, 2020 06:16
-
-
Save suraneti/80752c5887440a4c7181b9dc5c367c3f to your computer and use it in GitHub Desktop.
Example of sending command to rAthena database.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Get Cookie by login account on fluxCP site.