mirror of
https://github.com/rofl0r/proxychains-ng
synced 2025-02-09 06:33:31 +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
|
#else
|
||||||
|
|
||||||
// Do not allow this translation unit to end up empty
|
// 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 PDEBUG(fmt, args...) PSTDERR("DEBUG:pid[%d]:" fmt, getpid(), ## args)
|
||||||
# define DEBUGDECL(args...) args
|
# define DEBUGDECL(args...) args
|
||||||
# define DUMP_PROXY_CHAIN(A, B) dump_proxy_chain(A, B)
|
# define DUMP_PROXY_CHAIN(A, B) dump_proxy_chain(A, B)
|
||||||
|
# define DUMP_BUFFER(data, len) dump_buffer(data, len)
|
||||||
#else
|
#else
|
||||||
# define PDEBUG(fmt, args...) do {} while (0)
|
# define PDEBUG(fmt, args...) do {} while (0)
|
||||||
# define DEBUGDECL(args...)
|
# define DEBUGDECL(args...)
|
||||||
@ -18,7 +19,7 @@
|
|||||||
|
|
||||||
#include "core.h"
|
#include "core.h"
|
||||||
void dump_proxy_chain(proxy_data *pchain, unsigned int count);
|
void dump_proxy_chain(proxy_data *pchain, unsigned int count);
|
||||||
|
void dump_buffer(unsigned char* data, size_t len);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user