// Author: Zach Kelly <zach.kelly@lmco.com>
use super::rdp::{RdpTransaction, RdpTransactionItem};
-use json::{Json, JsonT};
-use rdp::parser::*;
-use rdp::windows;
+use crate::json::{Json, JsonT};
+use crate::rdp::parser::*;
+use crate::rdp::windows;
use std;
use x509_parser::parse_x509_der;
/// json helper for X224ConnectionRequest
fn x224_req_to_json(js: &Json, x224: &X224ConnectionRequest) {
- use rdp::parser::NegotiationRequestFlags as Flags;
+ use crate::rdp::parser::NegotiationRequestFlags as Flags;
js.set_string("event_type", "initial_request");
if let Some(ref cookie) = x224.cookie {
/// json helper for X224ConnectionConfirm
fn x224_conf_to_json(js: &Json, x224: &X224ConnectionConfirm) {
- use rdp::parser::NegotiationResponseFlags as Flags;
+ use crate::rdp::parser::NegotiationResponseFlags as Flags;
js.set_string("event_type", "initial_response");
if let Some(ref from_server) = x224.negotiation_from_server {
if let Some(ref early_capability_flags) =
client.early_capability_flags
{
- use rdp::parser::EarlyCapabilityFlags as Flags;
+ use crate::rdp::parser::EarlyCapabilityFlags as Flags;
if !early_capability_flags.is_empty() {
let flags = Json::array();
//! * x.691-spec: <https://www.itu.int/rec/T-REC-X.691/en>
use nom::{be_u16, be_u8, le_u16, le_u32, le_u8, ErrorKind, IResult};
-use rdp::error::RDP_NOT_X224_CLASS_0_ERROR;
-use rdp::util::{
+use crate::rdp::error::RDP_NOT_X224_CLASS_0_ERROR;
+use crate::rdp::util::{
le_slice_to_string, parse_per_length_determinant, utf7_slice_to_string,
};
-use rdp::windows;
+use crate::rdp::windows;
/// constrains dimension to a range, per spec
/// rdp-spec, section 2.2.1.3.2 Client Core Data
#[cfg(test)]
mod tests_cookie_21182 {
- use rdp::parser::*;
+ use crate::rdp::parser::*;
static BYTES: [u8; 37] = [
0x03, 0x00, 0x00, 0x25, 0x20, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43,
#[cfg(test)]
mod tests_negotiate_49350 {
- use rdp::parser::*;
+ use crate::rdp::parser::*;
static BYTES: [u8; 20] = [
0x03, 0x00, 0x00, 0x13, 0x0e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
#[cfg(test)]
mod tests_core_49350 {
- use rdp::parser::*;
+ use crate::rdp::parser::*;
static BYTES: [u8; 429] = [
0x03, 0x00, 0x01, 0xac, 0x02, 0xf0, 0x80, 0x7f, 0x65, 0x82, 0x01, 0xa0,
#[cfg(test)]
mod tests_x223_response_49350 {
- use rdp::parser::*;
+ use crate::rdp::parser::*;
// changed offset 9 from 0x65 to 0x66 so it is no longer an mcs connect
static BYTES: [u8; 9] =
#[cfg(test)]
mod tests_t123_raw_49350 {
- use rdp::parser::*;
+ use crate::rdp::parser::*;
// changed offset 4 from 0x02 to 0x03 so it is no longer an X223 data object
static BYTES: [u8; 9] =
#[cfg(test)]
mod tests_x224_raw_49350 {
- use rdp::parser::*;
+ use crate::rdp::parser::*;
// changed offset 11 from 0x01 to 0x02 so it is not a known X224 payload type
static BYTES: [u8; 19] = [
#[cfg(test)]
mod tests_x223_raw_49350 {
- use rdp::parser::*;
+ use crate::rdp::parser::*;
// changed offset 9 from 0x65 to 0xff so it is no longer an mcs connect
static BYTES: [u8; 9] =
#[cfg(test)]
mod tests_negotiate_incomplete_49350 {
use nom;
- use rdp::parser::*;
+ use crate::rdp::parser::*;
static BYTES: [u8; 19] = [
0x03, 0x00, 0x00, 0x13, 0x0e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
#[cfg(test)]
mod tests_core_incomplete_49350 {
use nom;
- use rdp::parser::*;
+ use crate::rdp::parser::*;
static BYTES: [u8; 428] = [
0x03, 0x00, 0x01, 0xac, 0x02, 0xf0, 0x80, 0x7f, 0x65, 0x82, 0x01, 0xa0,