libfreerdp-utils: remove hexdump utils in favor of WinPR utils
This commit is contained in:
parent
cfa2e169c1
commit
808fc210e3
@ -30,7 +30,7 @@
|
||||
|
||||
#include <freerdp/types.h>
|
||||
#include <freerdp/constants.h>
|
||||
#include <freerdp/utils/hexdump.h>
|
||||
#include <winpr/print.h>
|
||||
#include <freerdp/utils/unicode.h>
|
||||
#include <freerdp/utils/svc_plugin.h>
|
||||
#include <freerdp/client/cliprdr.h>
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include <freerdp/utils/list.h>
|
||||
#include <freerdp/utils/thread.h>
|
||||
#include <freerdp/utils/svc_plugin.h>
|
||||
#include <freerdp/utils/hexdump.h>
|
||||
#include <winpr/print.h>
|
||||
#include <freerdp/channels/rdpdr.h>
|
||||
|
||||
#ifndef _WIN32
|
||||
|
@ -40,7 +40,7 @@
|
||||
#include <winpr/crt.h>
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/utils/hexdump.h>
|
||||
#include <winpr/print.h>
|
||||
#include <freerdp/utils/stream.h>
|
||||
#include <freerdp/utils/svc_plugin.h>
|
||||
#include <freerdp/utils/thread.h>
|
||||
@ -1547,7 +1547,7 @@ void smartcard_device_control(SMARTCARD_DEVICE* scard, IRP* irp)
|
||||
stream_set_pos(irp->output, pos);
|
||||
|
||||
#ifdef WITH_DEBUG_SCARD
|
||||
freerdp_hexdump(stream_get_data(irp->output), stream_get_length(irp->output));
|
||||
winpr_HexDump(stream_get_data(irp->output), stream_get_length(irp->output));
|
||||
#endif
|
||||
irp->IoStatus = 0;
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <freerdp/utils/stream.h>
|
||||
#include <freerdp/utils/hexdump.h>
|
||||
#include <winpr/print.h>
|
||||
|
||||
#include "tsmf_constants.h"
|
||||
#include "tsmf_types.h"
|
||||
@ -425,7 +425,7 @@ BOOL tsmf_codec_parse_media_type(TS_AM_MEDIA_TYPE* mediatype, STREAM* s)
|
||||
DEBUG_DVC("cbFormat %d", cbFormat);
|
||||
|
||||
#ifdef WITH_DEBUG_DVC
|
||||
freerdp_hexdump(stream_get_tail(s), cbFormat);
|
||||
winpr_HexDump(stream_get_tail(s), cbFormat);
|
||||
#endif
|
||||
|
||||
switch (mediatype->FormatType)
|
||||
|
@ -22,7 +22,7 @@
|
||||
#endif
|
||||
|
||||
#include <freerdp/utils/event.h>
|
||||
#include <freerdp/utils/hexdump.h>
|
||||
#include <winpr/print.h>
|
||||
#include <freerdp/utils/rail.h>
|
||||
#include <freerdp/rail/rail.h>
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <X11/Xutil.h>
|
||||
|
||||
#include <freerdp/utils/event.h>
|
||||
#include <freerdp/utils/hexdump.h>
|
||||
#include <winpr/print.h>
|
||||
#include <freerdp/utils/rail.h>
|
||||
#include <freerdp/rail/rail.h>
|
||||
|
||||
@ -657,7 +657,7 @@ void xf_process_rail_appid_resp_event(xfInfo* xfi, rdpChannels* channels, RDP_EV
|
||||
"applicationId=(length=%d dump)\n",
|
||||
appid_resp->windowId, appid_resp->applicationId.length);
|
||||
|
||||
freerdp_hexdump(appid_resp->applicationId.string, appid_resp->applicationId.length);
|
||||
winpr_HexDump(appid_resp->applicationId.string, appid_resp->applicationId.length);
|
||||
}
|
||||
|
||||
void xf_process_rail_langbarinfo_event(xfInfo* xfi, rdpChannels* channels, RDP_EVENT* event)
|
||||
|
@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/utils/hexdump.h>
|
||||
#include <winpr/print.h>
|
||||
#include <freerdp/utils/stream.h>
|
||||
#include <freerdp/codec/bitmap.h>
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <freerdp/constants.h>
|
||||
#include <freerdp/channels/channels.h>
|
||||
#include <freerdp/utils/event.h>
|
||||
#include <freerdp/utils/hexdump.h>
|
||||
#include <winpr/print.h>
|
||||
#include <freerdp/client/cliprdr.h>
|
||||
|
||||
#include "test_cliprdr.h"
|
||||
@ -89,7 +89,7 @@ static const BYTE test_data_response_data[] =
|
||||
static int test_rdp_channel_data(freerdp* instance, int chan_id, BYTE* data, int data_size)
|
||||
{
|
||||
printf("chan_id %d data_size %d\n", chan_id, data_size);
|
||||
freerdp_hexdump(data, data_size);
|
||||
winpr_HexDump(data, data_size);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -238,7 +238,7 @@ void test_cliprdr(void)
|
||||
{
|
||||
data_response_event = (RDP_CB_DATA_RESPONSE_EVENT*)event;
|
||||
printf("Data response size: %d\n", data_response_event->size);
|
||||
freerdp_hexdump(data_response_event->data, data_response_event->size);
|
||||
winpr_HexDump(data_response_event->data, data_response_event->size);
|
||||
}
|
||||
freerdp_event_free(event);
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <freerdp/constants.h>
|
||||
#include <freerdp/channels/channels.h>
|
||||
#include <freerdp/utils/event.h>
|
||||
#include <freerdp/utils/hexdump.h>
|
||||
#include <winpr/print.h>
|
||||
|
||||
#include "test_drdynvc.h"
|
||||
|
||||
@ -60,7 +60,7 @@ static int data_received = 0;
|
||||
static int test_rdp_channel_data(freerdp* instance, int chan_id, BYTE* data, int data_size)
|
||||
{
|
||||
printf("chan_id %d data_size %d\n", chan_id, data_size);
|
||||
freerdp_hexdump(data, data_size);
|
||||
winpr_HexDump(data, data_size);
|
||||
data_received = 1;
|
||||
return 0;
|
||||
}
|
||||
|
@ -77,10 +77,10 @@ void assert_stream(STREAM* s, BYTE* data, int length, const char* func, int line
|
||||
printf("\n %s (%d): length mismatch, actual:%d, expected:%d\n", func, line, actual_length, length);
|
||||
|
||||
printf("\nActual:\n");
|
||||
freerdp_hexdump(actual_data, actual_length);
|
||||
winpr_HexDump(actual_data, actual_length);
|
||||
|
||||
printf("Expected:\n");
|
||||
freerdp_hexdump(data, length);
|
||||
winpr_HexDump(data, length);
|
||||
|
||||
CU_FAIL("assert_stream, length mismatch");
|
||||
return;
|
||||
@ -93,10 +93,10 @@ void assert_stream(STREAM* s, BYTE* data, int length, const char* func, int line
|
||||
printf("\n %s (%d): buffer mismatch:\n", func, line);
|
||||
|
||||
printf("\nActual:\n");
|
||||
freerdp_hexdump(actual_data, length);
|
||||
winpr_HexDump(actual_data, length);
|
||||
|
||||
printf("Expected:\n");
|
||||
freerdp_hexdump(data, length);
|
||||
winpr_HexDump(data, length);
|
||||
|
||||
CU_FAIL("assert_stream, buffer mismatch");
|
||||
return;
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <CUnit/CUnit.h>
|
||||
#include <freerdp/types.h>
|
||||
#include <freerdp/utils/stream.h>
|
||||
#include <freerdp/utils/hexdump.h>
|
||||
#include <winpr/print.h>
|
||||
|
||||
#define add_test_suite(name) \
|
||||
CU_pSuite pSuite; \
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "gcc.h"
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/utils/hexdump.h>
|
||||
#include <winpr/print.h>
|
||||
#include <freerdp/utils/stream.h>
|
||||
|
||||
#include "test_gcc.h"
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "license.h"
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/utils/hexdump.h>
|
||||
#include <winpr/print.h>
|
||||
#include <freerdp/utils/stream.h>
|
||||
|
||||
#include "test_license.h"
|
||||
@ -327,44 +327,44 @@ void test_license(void)
|
||||
printf("\n");
|
||||
|
||||
printf("client random:\n");
|
||||
freerdp_hexdump(license->client_random, 32);
|
||||
winpr_HexDump(license->client_random, 32);
|
||||
printf("\n");
|
||||
|
||||
printf("server random:\n");
|
||||
freerdp_hexdump(license->server_random, 32);
|
||||
winpr_HexDump(license->server_random, 32);
|
||||
printf("\n");
|
||||
|
||||
printf("premaster secret:\n");
|
||||
freerdp_hexdump(license->premaster_secret, 48);
|
||||
winpr_HexDump(license->premaster_secret, 48);
|
||||
printf("\n");
|
||||
|
||||
printf("master secret:\n");
|
||||
freerdp_hexdump(license->master_secret, 48);
|
||||
winpr_HexDump(license->master_secret, 48);
|
||||
printf("\n");
|
||||
|
||||
printf("session key blob:\n");
|
||||
freerdp_hexdump(license->session_key_blob, 48);
|
||||
winpr_HexDump(license->session_key_blob, 48);
|
||||
printf("\n");
|
||||
|
||||
printf("licensing encryption key:\n");
|
||||
freerdp_hexdump(license->licensing_encryption_key, 16);
|
||||
winpr_HexDump(license->licensing_encryption_key, 16);
|
||||
printf("\n");
|
||||
|
||||
printf("mac salt key:\n");
|
||||
freerdp_hexdump(license->mac_salt_key, 16);
|
||||
winpr_HexDump(license->mac_salt_key, 16);
|
||||
printf("\n");
|
||||
|
||||
printf("modulus:\n");
|
||||
freerdp_hexdump(license->certificate->cert_info.modulus.data,
|
||||
winpr_HexDump(license->certificate->cert_info.modulus.data,
|
||||
license->certificate->cert_info.modulus.length);
|
||||
printf("\n");
|
||||
|
||||
printf("exponent:\n");
|
||||
freerdp_hexdump(license->certificate->cert_info.exponent, 4);
|
||||
winpr_HexDump(license->certificate->cert_info.exponent, 4);
|
||||
printf("\n");
|
||||
|
||||
printf("encrypted premaster secret:\n");
|
||||
freerdp_hexdump(license->encrypted_premaster_secret->data,
|
||||
winpr_HexDump(license->encrypted_premaster_secret->data,
|
||||
license->encrypted_premaster_secret->length);
|
||||
printf("\n");
|
||||
#endif
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "mcs.h"
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/utils/hexdump.h>
|
||||
#include <winpr/print.h>
|
||||
#include <freerdp/utils/stream.h>
|
||||
|
||||
#include "test_mcs.h"
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include <freerdp/types.h>
|
||||
#include <freerdp/constants.h>
|
||||
#include <freerdp/utils/print.h>
|
||||
#include <freerdp/utils/hexdump.h>
|
||||
#include <winpr/print.h>
|
||||
#include <freerdp/codec/nsc.h>
|
||||
|
||||
#include "test_nsc.h"
|
||||
@ -337,7 +337,7 @@ void test_nsc_decode(void)
|
||||
context = nsc_context_new();
|
||||
nsc_context_set_cpu_opt(context, CPU_SSE2);
|
||||
nsc_process_message(context, 32, 15, 10, (BYTE*) nsc_data, sizeof(nsc_data));
|
||||
/*freerdp_hexdump(context->bmpdata, 15 * 10 * 4);*/
|
||||
/*winpr_HexDump(context->bmpdata, 15 * 10 * 4);*/
|
||||
for (i = 0; i < 30000; i++)
|
||||
{
|
||||
nsc_process_message(context, 32, 54, 44, (BYTE*) nsc_stress_data, sizeof(nsc_stress_data));
|
||||
@ -368,9 +368,9 @@ void test_nsc_encode(void)
|
||||
stream_set_pos(enc_stream, 0);
|
||||
nsc_compose_message(context, enc_stream, rgb_data, 64, 64, 64 * 3);
|
||||
}
|
||||
/*freerdp_hexdump(stream_get_head(enc_stream), stream_get_length(enc_stream));*/
|
||||
/*winpr_HexDump(stream_get_head(enc_stream), stream_get_length(enc_stream));*/
|
||||
nsc_process_message(context, 32, 64, 64, stream_get_head(enc_stream), stream_get_length(enc_stream));
|
||||
/*freerdp_hexdump(context->bmpdata, 64 * 64 * 4);*/
|
||||
/*winpr_HexDump(context->bmpdata, 64 * 64 * 4);*/
|
||||
stream_free(enc_stream);
|
||||
|
||||
nsc_context_free(context);
|
||||
|
@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/utils/hexdump.h>
|
||||
#include <winpr/print.h>
|
||||
#include <freerdp/utils/stream.h>
|
||||
|
||||
#include "test_orders.h"
|
||||
|
@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/utils/hexdump.h>
|
||||
#include <winpr/print.h>
|
||||
#include <freerdp/utils/pcap.h>
|
||||
|
||||
#include "test_pcap.h"
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include <freerdp/constants.h>
|
||||
#include <freerdp/channels/channels.h>
|
||||
#include <freerdp/utils/event.h>
|
||||
#include <freerdp/utils/hexdump.h>
|
||||
#include <winpr/print.h>
|
||||
#include <freerdp/utils/rail.h>
|
||||
#include <freerdp/rail.h>
|
||||
|
||||
@ -446,10 +446,10 @@ int stream_equal_dump(void * dataS, size_t sizeS, void * data, size_t size)
|
||||
printf("Stream and dump have different length (%d != %d)\n",
|
||||
(int) sizeS, (int) size);
|
||||
printf("Stream hexdump:\n");
|
||||
freerdp_hexdump(dataS, sizeS);
|
||||
winpr_HexDump(dataS, sizeS);
|
||||
|
||||
printf("Dump hexdump:\n");
|
||||
freerdp_hexdump(data, size);
|
||||
winpr_HexDump(data, size);
|
||||
|
||||
printf("----------------- stream_equal_dump -----------------\n");
|
||||
return 0;
|
||||
@ -463,10 +463,10 @@ int stream_equal_dump(void * dataS, size_t sizeS, void * data, size_t size)
|
||||
printf("----------------- stream_equal_dump -----------------\n");
|
||||
printf("Stream and dump have different content from %d offset.\n", (int) i);
|
||||
printf("Stream hexdump:\n");
|
||||
freerdp_hexdump(dataS, sizeS);
|
||||
winpr_HexDump(dataS, sizeS);
|
||||
|
||||
printf("Dump hexdump:\n");
|
||||
freerdp_hexdump(data, size);
|
||||
winpr_HexDump(data, size);
|
||||
printf("----------------- stream_equal_dump -----------------\n");
|
||||
return 0;
|
||||
}
|
||||
@ -511,7 +511,7 @@ static void emulate_server_send_channel_data(
|
||||
counter++;
|
||||
|
||||
printf("Emulate server packet (%d packet):\n", counter);
|
||||
freerdp_hexdump(data, size);
|
||||
winpr_HexDump(data, size);
|
||||
|
||||
freerdp_channels_data(instance, 0, (char*)data, size,
|
||||
CHANNEL_FLAG_FIRST | CHANNEL_FLAG_LAST, size);
|
||||
@ -539,7 +539,7 @@ static int emulate_client_send_channel_data(
|
||||
counter++;
|
||||
|
||||
printf("Client send to server (%d packet):\n", counter);
|
||||
freerdp_hexdump(data, size);
|
||||
winpr_HexDump(data, size);
|
||||
|
||||
// add to global dumps list
|
||||
save_dump(data, size);
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
#include <freerdp/types.h>
|
||||
#include <freerdp/utils/print.h>
|
||||
#include <freerdp/utils/hexdump.h>
|
||||
#include <winpr/print.h>
|
||||
#include <freerdp/codec/rfx.h>
|
||||
|
||||
#include "rfx_types.h"
|
||||
@ -337,7 +337,7 @@ void test_encode(void)
|
||||
rgb_data = (BYTE *) malloc(64 * 64 * 3);
|
||||
for (i = 0; i < 64; i++)
|
||||
memcpy(rgb_data + i * 64 * 3, rgb_scanline_data, 64 * 3);
|
||||
//freerdp_hexdump(rgb_data, 64 * 64 * 3);
|
||||
//winpr_HexDump(rgb_data, 64 * 64 * 3);
|
||||
|
||||
enc_stream = stream_new(65536);
|
||||
stream_clear(enc_stream);
|
||||
@ -352,11 +352,11 @@ void test_encode(void)
|
||||
//dump_buffer(context->priv->cb_g_buffer, 4096);
|
||||
|
||||
/*printf("*** Y ***\n");
|
||||
freerdp_hexdump(stream_get_head(enc_stream), y_size);
|
||||
winpr_HexDump(stream_get_head(enc_stream), y_size);
|
||||
printf("*** Cb ***\n");
|
||||
freerdp_hexdump(stream_get_head(enc_stream) + y_size, cb_size);
|
||||
winpr_HexDump(stream_get_head(enc_stream) + y_size, cb_size);
|
||||
printf("*** Cr ***\n");
|
||||
freerdp_hexdump(stream_get_head(enc_stream) + y_size + cb_size, cr_size);*/
|
||||
winpr_HexDump(stream_get_head(enc_stream) + y_size + cb_size, cr_size);*/
|
||||
|
||||
stream_set_pos(enc_stream, 0);
|
||||
rfx_decode_rgb(context, enc_stream,
|
||||
|
@ -29,7 +29,7 @@ typedef struct rdp_certificate_store rdpCertificateStore;
|
||||
#include <freerdp/api.h>
|
||||
#include <freerdp/settings.h>
|
||||
#include <freerdp/utils/stream.h>
|
||||
#include <freerdp/utils/hexdump.h>
|
||||
#include <winpr/print.h>
|
||||
|
||||
struct rdp_certificate_data
|
||||
{
|
||||
|
@ -1,29 +0,0 @@
|
||||
/**
|
||||
* FreeRDP: A Remote Desktop Protocol Implementation
|
||||
* Hex Dump Utils
|
||||
*
|
||||
* Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __UTILS_HEXDUMP_H
|
||||
#define __UTILS_HEXDUMP_H
|
||||
|
||||
#include <freerdp/api.h>
|
||||
|
||||
#define FREERDP_HEXDUMP_LINE_LENGTH 16
|
||||
|
||||
FREERDP_API void freerdp_hexdump(BYTE* data, int length);
|
||||
|
||||
#endif /* __UTILS_HEXDUMP_H */
|
@ -27,7 +27,7 @@
|
||||
|
||||
#include <freerdp/settings.h>
|
||||
#include <freerdp/utils/stream.h>
|
||||
#include <freerdp/utils/hexdump.h>
|
||||
#include <winpr/print.h>
|
||||
|
||||
/* Certificate Version */
|
||||
#define CERT_CHAIN_VERSION_1 0x00000001
|
||||
|
@ -40,7 +40,7 @@ typedef struct rdp_ntlm_http rdpNtlmHttp;
|
||||
#include <freerdp/utils/sleep.h>
|
||||
#include <freerdp/utils/debug.h>
|
||||
#include <freerdp/utils/stream.h>
|
||||
#include <freerdp/utils/hexdump.h>
|
||||
#include <winpr/print.h>
|
||||
|
||||
struct rdp_ntlm
|
||||
{
|
||||
|
@ -337,7 +337,7 @@ int rpc_in_write(rdpRpc* rpc, BYTE* data, int length)
|
||||
#ifdef WITH_DEBUG_TSG
|
||||
rpc_pdu_header_print((rpcconn_hdr_t*) data);
|
||||
printf("Sending PDU (length: %d)\n", length);
|
||||
freerdp_hexdump(data, length);
|
||||
winpr_HexDump(data, length);
|
||||
#endif
|
||||
|
||||
status = tls_write_all(rpc->TlsIn, data, length);
|
||||
|
@ -79,7 +79,7 @@ typedef struct _RPC_PDU
|
||||
#include <freerdp/utils/sleep.h>
|
||||
#include <freerdp/utils/debug.h>
|
||||
#include <freerdp/utils/stream.h>
|
||||
#include <freerdp/utils/hexdump.h>
|
||||
#include <winpr/print.h>
|
||||
|
||||
/**
|
||||
* CAE Specification
|
||||
|
@ -155,7 +155,7 @@ BOOL license_send(rdpLicense* license, STREAM* s, BYTE type)
|
||||
|
||||
#ifdef WITH_DEBUG_LICENSE
|
||||
printf("Sending %s Packet, length %d\n", LICENSE_MESSAGE_STRINGS[type & 0x1F], wMsgSize);
|
||||
freerdp_hexdump(s->p - 4, wMsgSize);
|
||||
winpr_HexDump(s->p - 4, wMsgSize);
|
||||
#endif
|
||||
|
||||
stream_set_pos(s, length);
|
||||
@ -267,25 +267,25 @@ void license_generate_keys(rdpLicense* license)
|
||||
|
||||
#ifdef WITH_DEBUG_LICENSE
|
||||
printf("ClientRandom:\n");
|
||||
freerdp_hexdump(license->client_random, CLIENT_RANDOM_LENGTH);
|
||||
winpr_HexDump(license->client_random, CLIENT_RANDOM_LENGTH);
|
||||
|
||||
printf("ServerRandom:\n");
|
||||
freerdp_hexdump(license->server_random, SERVER_RANDOM_LENGTH);
|
||||
winpr_HexDump(license->server_random, SERVER_RANDOM_LENGTH);
|
||||
|
||||
printf("PremasterSecret:\n");
|
||||
freerdp_hexdump(license->premaster_secret, PREMASTER_SECRET_LENGTH);
|
||||
winpr_HexDump(license->premaster_secret, PREMASTER_SECRET_LENGTH);
|
||||
|
||||
printf("MasterSecret:\n");
|
||||
freerdp_hexdump(license->master_secret, MASTER_SECRET_LENGTH);
|
||||
winpr_HexDump(license->master_secret, MASTER_SECRET_LENGTH);
|
||||
|
||||
printf("SessionKeyBlob:\n");
|
||||
freerdp_hexdump(license->session_key_blob, SESSION_KEY_BLOB_LENGTH);
|
||||
winpr_HexDump(license->session_key_blob, SESSION_KEY_BLOB_LENGTH);
|
||||
|
||||
printf("MacSaltKey:\n");
|
||||
freerdp_hexdump(license->mac_salt_key, MAC_SALT_KEY_LENGTH);
|
||||
winpr_HexDump(license->mac_salt_key, MAC_SALT_KEY_LENGTH);
|
||||
|
||||
printf("LicensingEncryptionKey:\n");
|
||||
freerdp_hexdump(license->licensing_encryption_key, LICENSING_ENCRYPTION_KEY_LENGTH);
|
||||
winpr_HexDump(license->licensing_encryption_key, LICENSING_ENCRYPTION_KEY_LENGTH);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -327,10 +327,10 @@ void license_encrypt_premaster_secret(rdpLicense* license)
|
||||
|
||||
#ifdef WITH_DEBUG_LICENSE
|
||||
printf("modulus (%d bits):\n", key_length * 8);
|
||||
freerdp_hexdump(modulus, key_length);
|
||||
winpr_HexDump(modulus, key_length);
|
||||
|
||||
printf("exponent:\n");
|
||||
freerdp_hexdump(exponent, 4);
|
||||
winpr_HexDump(exponent, 4);
|
||||
#endif
|
||||
|
||||
encrypted_premaster_secret = (BYTE*) malloc(MODULUS_MAX_SIZE);
|
||||
@ -369,11 +369,11 @@ void license_decrypt_platform_challenge(rdpLicense* license)
|
||||
|
||||
#ifdef WITH_DEBUG_LICENSE
|
||||
printf("encrypted_platform challenge:\n");
|
||||
freerdp_hexdump(license->encrypted_platform_challenge->data,
|
||||
winpr_HexDump(license->encrypted_platform_challenge->data,
|
||||
license->encrypted_platform_challenge->length);
|
||||
|
||||
printf("platform challenge:\n");
|
||||
freerdp_hexdump(license->platform_challenge->data, license->platform_challenge->length);
|
||||
winpr_HexDump(license->platform_challenge->data, license->platform_challenge->length);
|
||||
#endif
|
||||
|
||||
crypto_rc4_free(rc4);
|
||||
@ -851,13 +851,13 @@ void license_send_platform_challenge_response_packet(rdpLicense* license)
|
||||
|
||||
#ifdef WITH_DEBUG_LICENSE
|
||||
printf("Licensing Encryption Key:\n");
|
||||
freerdp_hexdump(license->licensing_encryption_key, 16);
|
||||
winpr_HexDump(license->licensing_encryption_key, 16);
|
||||
|
||||
printf("HardwareID:\n");
|
||||
freerdp_hexdump(license->hwid, 20);
|
||||
winpr_HexDump(license->hwid, 20);
|
||||
|
||||
printf("Encrypted HardwareID:\n");
|
||||
freerdp_hexdump(buffer, 20);
|
||||
winpr_HexDump(buffer, 20);
|
||||
#endif
|
||||
|
||||
license->encrypted_hwid->type = BB_DATA_BLOB;
|
||||
|
@ -91,7 +91,7 @@ BOOL rdp_recv_server_redirection_pdu(rdpRdp* rdp, STREAM* s)
|
||||
stream_read(s, redirection->LoadBalanceInfo, redirection->LoadBalanceInfoLength);
|
||||
#ifdef WITH_DEBUG_REDIR
|
||||
DEBUG_REDIR("loadBalanceInfo:");
|
||||
freerdp_hexdump(redirection->LoadBalanceInfo, redirection->LoadBalanceInfoLength);
|
||||
winpr_HexDump(redirection->LoadBalanceInfo, redirection->LoadBalanceInfoLength);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -116,7 +116,7 @@ BOOL rdp_recv_server_redirection_pdu(rdpRdp* rdp, STREAM* s)
|
||||
|
||||
#ifdef WITH_DEBUG_REDIR
|
||||
DEBUG_REDIR("password_cookie:");
|
||||
freerdp_hexdump(redirection->PasswordCookie, redirection->PasswordCookieLength);
|
||||
winpr_HexDump(redirection->PasswordCookie, redirection->PasswordCookieLength);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <freerdp/utils/tcp.h>
|
||||
#include <freerdp/utils/sleep.h>
|
||||
#include <freerdp/utils/stream.h>
|
||||
#include <freerdp/utils/hexdump.h>
|
||||
#include <winpr/print.h>
|
||||
#include <freerdp/errorcodes.h>
|
||||
|
||||
#include <time.h>
|
||||
@ -397,7 +397,7 @@ int transport_read(rdpTransport* transport, STREAM* s)
|
||||
if (stream_bytes + status >= pdu_bytes)
|
||||
{
|
||||
printf("Local < Remote\n");
|
||||
freerdp_hexdump(s->data, pdu_bytes);
|
||||
winpr_HexDump(s->data, pdu_bytes);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -432,7 +432,7 @@ int transport_read(rdpTransport* transport, STREAM* s)
|
||||
if (status > 0)
|
||||
{
|
||||
printf("Local < Remote\n");
|
||||
freerdp_hexdump(s->data, status);
|
||||
winpr_HexDump(s->data, status);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -468,7 +468,7 @@ int transport_write(rdpTransport* transport, STREAM* s)
|
||||
if (length > 0)
|
||||
{
|
||||
printf("Local > Remote\n");
|
||||
freerdp_hexdump(s->data, length);
|
||||
winpr_HexDump(s->data, length);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -601,7 +601,7 @@ int transport_check_fds(rdpTransport** ptransport)
|
||||
if (length == 0)
|
||||
{
|
||||
printf("transport_check_fds: protocol error, not a TPKT or Fast Path header.\n");
|
||||
freerdp_hexdump(stream_get_head(transport->recv_buffer), pos);
|
||||
winpr_HexDump(stream_get_head(transport->recv_buffer), pos);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <winpr/crt.h>
|
||||
|
||||
#include <freerdp/utils/stream.h>
|
||||
#include <freerdp/utils/hexdump.h>
|
||||
#include <winpr/print.h>
|
||||
#include <freerdp/utils/unicode.h>
|
||||
|
||||
#include <freerdp/rail/icon.h>
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <winpr/windows.h>
|
||||
|
||||
#include <freerdp/utils/stream.h>
|
||||
#include <freerdp/utils/hexdump.h>
|
||||
#include <winpr/print.h>
|
||||
#include <freerdp/utils/unicode.h>
|
||||
|
||||
#include "librail.h"
|
||||
@ -176,7 +176,7 @@ void window_state_update(rdpWindow* window, WINDOW_ORDER_INFO* orderInfo, WINDOW
|
||||
memcpy(window->titleInfo.string, window_state->titleInfo.string, window->titleInfo.length);
|
||||
|
||||
#ifdef WITH_DEBUG_RAIL
|
||||
freerdp_hexdump(window->titleInfo.string, window->titleInfo.length);
|
||||
winpr_HexDump(window->titleInfo.string, window->titleInfo.length);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,6 @@ set(${MODULE_PREFIX}_SRCS
|
||||
dsp.c
|
||||
event.c
|
||||
bitmap.c
|
||||
hexdump.c
|
||||
list.c
|
||||
file.c
|
||||
passphrase.c
|
||||
|
@ -1,60 +0,0 @@
|
||||
/**
|
||||
* FreeRDP: A Remote Desktop Protocol Implementation
|
||||
* Hex Dump Utils
|
||||
*
|
||||
* Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <freerdp/types.h>
|
||||
|
||||
#include <freerdp/utils/hexdump.h>
|
||||
|
||||
void freerdp_hexdump(BYTE* data, int length)
|
||||
{
|
||||
BYTE* p = data;
|
||||
int i, line, offset = 0;
|
||||
|
||||
while (offset < length)
|
||||
{
|
||||
printf("%04x ", offset);
|
||||
|
||||
line = length - offset;
|
||||
|
||||
if (line > FREERDP_HEXDUMP_LINE_LENGTH)
|
||||
line = FREERDP_HEXDUMP_LINE_LENGTH;
|
||||
|
||||
for (i = 0; i < line; i++)
|
||||
printf("%02x ", p[i]);
|
||||
|
||||
for (; i < FREERDP_HEXDUMP_LINE_LENGTH; i++)
|
||||
printf(" ");
|
||||
|
||||
for (i = 0; i < line; i++)
|
||||
printf("%c", (p[i] >= 0x20 && p[i] < 0x7F) ? p[i] : '.');
|
||||
|
||||
printf("\n");
|
||||
|
||||
offset += line;
|
||||
p += line;
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <errno.h>
|
||||
#include <wctype.h>
|
||||
#include <freerdp/types.h>
|
||||
#include <freerdp/utils/hexdump.h>
|
||||
#include <winpr/print.h>
|
||||
|
||||
#include <freerdp/utils/unicode.h>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user