|
我的脚本是这样的,我加了黄色的部分,用来显示每个user运行时对应的ip地址。逐步执行的时候可以读if语句,全部执行的时候就不读if语句了。是什么问题呢?vuser日志中也没有这个记录
Action()
{
char *results = NULL;
char *ip;
int rescnt = 0;
lr_save_string("192.168.1.213","DnsServer"); // Set DNS server IP Address
lr_save_string(www.sh**md**.com, "Hostname"); // Set hostname to resolve
// Perform DNS Query
results = (char *) ms_dns_query("DnsQuery",
"URL=dns://{DnsServer}",
"QueryHost={Hostname}",
LAST);
// List all the results... (if more than one)
while (*results) {
rescnt++;
lr_log_message(
lr_eval_string("(%d) IP address for {Hostname} is %s"),
rescnt,
results);
if (ip = lr_get_vuser_ip())
lr_vuser_status_message("The ip address is %s",ip);
else
lr_vuser_status_message("IP spoofing disabled");
results = (char *) ms_dns_nextresult(results);
}
return 0;
} |
|