mirror of
https://github.com/rofl0r/proxychains-ng
synced 2025-01-23 01:12:59 +08:00
add dump_buffer in debug
This commit is contained in:
parent
560613256a
commit
48422d4c07
@ -22,6 +22,14 @@ void dump_proxy_chain(proxy_data *pchain, unsigned int count) {
|
||||
}
|
||||
}
|
||||
|
||||
void dump_buffer(unsigned char * data, size_t len){
|
||||
printf("buffer_dump[");
|
||||
for(int i=0; i<len; i++){
|
||||
printf("%d ", *(data+i));
|
||||
}
|
||||
printf("]\n");
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
// Do not allow this translation unit to end up empty
|
||||
|
@ -8,6 +8,7 @@
|
||||
# define PDEBUG(fmt, args...) PSTDERR("DEBUG:pid[%d]:" fmt, getpid(), ## args)
|
||||
# define DEBUGDECL(args...) args
|
||||
# define DUMP_PROXY_CHAIN(A, B) dump_proxy_chain(A, B)
|
||||
# define DUMP_BUFFER(data, len) dump_buffer(data, len)
|
||||
#else
|
||||
# define PDEBUG(fmt, args...) do {} while (0)
|
||||
# define DEBUGDECL(args...)
|
||||
@ -18,7 +19,7 @@
|
||||
|
||||
#include "core.h"
|
||||
void dump_proxy_chain(proxy_data *pchain, unsigned int count);
|
||||
|
||||
void dump_buffer(unsigned char* data, size_t len);
|
||||
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user