1
0
mirror of https://github.com/rofl0r/proxychains-ng synced 2026-05-17 03:02:41 +08:00

Add DUMP_PROXY_CHAIN for debug builds and debug.c.

This commit is contained in:
crass
2013-06-23 12:12:25 +07:00
committed by rofl0r
Unverified
parent b9ca1cdefd
commit 5c4c166802
5 changed files with 53 additions and 2 deletions
+21
View File
@@ -0,0 +1,21 @@
#ifdef DEBUG
# include "core.h"
# include "common.h"
# include "debug.h"
void DUMP_PROXY_CHAIN(proxy_data *pchain, unsigned int count) {
char ip_buf[16];
for (; count; pchain++, count--) {
pc_stringfromipv4(&pchain->ip.octet[0], ip_buf);
PDEBUG("[%s] %s %s:%d", proxy_state_strmap[pchain->ps],
proxy_type_strmap[pchain->pt],
ip_buf, htons(pchain->port));
if (*pchain->user || *pchain->pass) {
PSTDERR(" [u=%s,p=%s]", pchain->user, pchain->pass);
}
PSTDERR("\n");
}
}
#endif