Skip to content
Snippets Groups Projects
Commit 9d10146a authored by deuce's avatar deuce
Browse files

Store the remote software version in the BinkP object, don't do special

stuff in binkp.js, only the protocol.  BinkIT now does the Mystic check.
parent 0b20faff
No related branches found
No related tags found
No related merge requests found
...@@ -851,7 +851,7 @@ function inbound_auth_cb(pwd, bp) ...@@ -851,7 +851,7 @@ function inbound_auth_cb(pwd, bp)
} else { } else {
log(LOG_WARNING, "CRAM-MD5 password mismatch for " + addr log(LOG_WARNING, "CRAM-MD5 password mismatch for " + addr
+ format(" (expected: %s, received: %s)", expected, pwd[0])); + format(" (expected: %s, received: %s)", expected, pwd[0]));
if (bp.mystic_detected) { if (bp.remote_ver.substr(0, 7) === 'Mystic/') {
/* /*
* MysticBBS v1.12A39 at least has an issue when the CRYPT * MysticBBS v1.12A39 at least has an issue when the CRYPT
* option is included after the CRAM-MD5 challenge. It appends * option is included after the CRAM-MD5 challenge. It appends
......
...@@ -93,8 +93,7 @@ function BinkP(name_ver, inbound, rx_callback, tx_callback) ...@@ -93,8 +93,7 @@ function BinkP(name_ver, inbound, rx_callback, tx_callback)
this.in_keys = undefined; this.in_keys = undefined;
this.out_keys = undefined; this.out_keys = undefined;
this.capabilities = '115200,TCP,BINKP'; this.capabilities = '115200,TCP,BINKP';
this.mystic_bug = false; this.remote_ver = undefined;
this.mystic_detected = false;
this.sent_files = []; this.sent_files = [];
this.failed_sent_files = []; this.failed_sent_files = [];
...@@ -1164,13 +1163,7 @@ BinkP.prototype.recvFrame = function(timeout) ...@@ -1164,13 +1163,7 @@ BinkP.prototype.recvFrame = function(timeout)
log(LOG_INFO, "Peer version: " + args.slice(1).join(' ')); log(LOG_INFO, "Peer version: " + args.slice(1).join(' '));
tmp = ret.data.split(/ /); tmp = ret.data.split(/ /);
if (tmp.length >= 3) { if (tmp.length >= 3) {
if (tmp[1].substr(0, 7) === 'Mystic/') { this.remote_ver = tmp[1];
/*
* This allows work-arounds for Mystic binkp
* bugs. See binkit.js for details.
*/
this.mystic_detected = true;
}
if (tmp[2].substr(0, 6) === 'binkp/') { if (tmp[2].substr(0, 6) === 'binkp/') {
ver = tmp[2].substr(6).split(/\./); ver = tmp[2].substr(6).split(/\./);
if (ver.length >= 2) { if (ver.length >= 2) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment