Ashwalker
Member
- Joined
- Jun 27, 2016
- Messages
- 37
- Reaction score
- 8
Required:
1. node.js https://nodejs.org/en/download/
2. Tibia client that you want to get RSA key from
In time of writing this (Tibia 10.94, May 31, 2016) RSA key is
How I can know or how it was first found out?
I don't know how it was found out and never tested it, but I've compared my results with otclient hardcoded value from https://github.com/edubart/otclient...29c42c354/modules/gamelib/const.lua#L232-L236 which is
Step by step tutorial:
1. in empty directory open terminal console
2. verify that you have node installed by executting command
- if not than please install node.js - have problems with that? Search help in node.js community
3. create new project with command (accept all default configs by pressing ENTER)
4. execute next command to install required dependencies
5. create file "findRSAkey.js" and edit it in your favourite text editor
6. paste there following code and save the file
7. in your console that you have previously opened run command
and you are done ;-)
1. node.js https://nodejs.org/en/download/
2. Tibia client that you want to get RSA key from
In time of writing this (Tibia 10.94, May 31, 2016) RSA key is
132127743205872284062295099082293384952776326496165507967876361843343953435544496682053323833394351797728954155097012103928360786959821132214473291575712138800495033169914814069637740318278150290733684032524174782740134357629699062987023311132821016569775488792221429527047321331896351555606801473202394175817
How I can know or how it was first found out?
I don't know how it was found out and never tested it, but I've compared my results with otclient hardcoded value from https://github.com/edubart/otclient...29c42c354/modules/gamelib/const.lua#L232-L236 which is
OTSERV_RSA = "1091201329673994292788609605089955415282375029027981291234687579" ..
"3726629149257644633073969600111060390723088861007265581882535850" ..
"3429057592827629436413108566029093628212635953836686562675849720" ..
"6207862794310902180176810615217550567108238764764442605581471797" ..
"07119674283982419152118103759076030616683978566631413"
CIPSOFT_RSA = "1321277432058722840622950990822933849527763264961655079678763618" ..
"4334395343554449668205332383339435179772895415509701210392836078" ..
"6959821132214473291575712138800495033169914814069637740318278150" ..
"2907336840325241747827401343576296990629870233111328210165697754" ..
"88792221429527047321331896351555606801473202394175817"
"3726629149257644633073969600111060390723088861007265581882535850" ..
"3429057592827629436413108566029093628212635953836686562675849720" ..
"6207862794310902180176810615217550567108238764764442605581471797" ..
"07119674283982419152118103759076030616683978566631413"
CIPSOFT_RSA = "1321277432058722840622950990822933849527763264961655079678763618" ..
"4334395343554449668205332383339435179772895415509701210392836078" ..
"6959821132214473291575712138800495033169914814069637740318278150" ..
"2907336840325241747827401343576296990629870233111328210165697754" ..
"88792221429527047321331896351555606801473202394175817"
Step by step tutorial:
1. in empty directory open terminal console
2. verify that you have node installed by executting command
Code:
node -v
3. create new project with command (accept all default configs by pressing ENTER)
Code:
npm init
Code:
npm install fs-sync binstring --save
6. paste there following code and save the file
Code:
// import dependencies
var fs = require('fs-sync');
var binstring = require('binstring');
// define all options here
var options = {
// where to save RSA key
outputFile: 'RSA.txt',
// where is your Tibia client
inputFile: 'C:/Program Files (x86)/Tibia/Tibia.exe',
// convert binary file to human readable utf8 format
conversionOptions: { in: 'bin', out:'utf8' },
// this is most important, it assumes that RSA key is string of 245 digits long or longer and no other string is so long like this one,
// if there will be more matches like this we have a problem
RSApattern: /\d{245,}/g
};
// humanize
var humanData = binstring(fs.read(options.inputFile), options.conversionOptions);
// extract RSA with RegEXP
var RSA = humanData.match(options.RSApattern);
// assume only 1 match found
try {
RSA[0] ? RSA = RSA[0] : null;
} catch (e) {
console.log('no match');
}
// save it to output file
fs.write(options.outputFile, RSA);
// confirm by outputing result to console
console.log(RSA);
7. in your console that you have previously opened run command
Code:
node findRSAkey.js
Last edited: