Sync with FiSHLiM HEAD
This commit is contained in:
parent
d651022873
commit
5a50da6f82
|
@ -26,6 +26,7 @@ Not working:
|
||||||
* Password-protected key storage
|
* Password-protected key storage
|
||||||
* Topic encryption
|
* Topic encryption
|
||||||
* Remote exploitation (hopefully!)
|
* Remote exploitation (hopefully!)
|
||||||
|
* Plaintext content that contain +OK is decrypted twice
|
||||||
|
|
||||||
|
|
||||||
Commands
|
Commands
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
|
|
||||||
static const char plugin_name[] = "FiSHLiM";
|
static const char plugin_name[] = "FiSHLiM";
|
||||||
static const char plugin_desc[] = "Encryption plugin for the FiSH protocol. Less is More!";
|
static const char plugin_desc[] = "Encryption plugin for the FiSH protocol. Less is More!";
|
||||||
static const char plugin_version[] = "0.0.15";
|
static const char plugin_version[] = "0.0.16";
|
||||||
|
|
||||||
static const char usage_setkey[] = "Usage: SETKEY [<nick or #channel>] <password>, sets the key for a channel or nick";
|
static const char usage_setkey[] = "Usage: SETKEY [<nick or #channel>] <password>, sets the key for a channel or nick";
|
||||||
static const char usage_delkey[] = "Usage: DELKEY <nick or #channel>, deletes the key for a channel or nick";
|
static const char usage_delkey[] = "Usage: DELKEY <nick or #channel>, deletes the key for a channel or nick";
|
||||||
|
@ -161,9 +161,15 @@ static int handle_incoming(char *word[], char *word_eol[], void *userdata) {
|
||||||
// Add the encrypted data
|
// Add the encrypted data
|
||||||
peice = decrypted;
|
peice = decrypted;
|
||||||
uw++; // Skip "OK+"
|
uw++; // Skip "OK+"
|
||||||
|
|
||||||
|
if (ew == w+1) {
|
||||||
|
// Prefix with colon, which gets stripped out otherwise
|
||||||
|
if (!append(&message, &length, ":")) goto decrypt_error;
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// Add unencrypted data (for example, a prefix from a bouncer or bot)
|
// Add unencrypted data (for example, a prefix from a bouncer or bot)
|
||||||
peice = (uw == w+1 ? word[uw]+1 : word[uw]);
|
peice = word[uw];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!append(&message, &length, peice)) goto decrypt_error;
|
if (!append(&message, &length, peice)) goto decrypt_error;
|
||||||
|
|
Loading…
Reference in New Issue