Malware Domain List

Malware Related => Tools of the trade / Internet News => Topic started by: JohnC on October 07, 2008, 03:04:39 pm

Title: A little Batch problem..
Post by: JohnC on October 07, 2008, 03:04:39 pm
I wanted to lookup a list of domains and find the NX ones. Thought it would be a simple enough task, but it seems when there is a NX domain it doesn't redirect the text to the file I specify, it redirects it to the command prompt. Somebody told me it is based on the return code of the program, if it returns 0 it will redirect to a file, and if it is an error return code like a -1 it would output to the screen. Again I thought this would be simple enough to check use an if ERRORLEVEL, but nslookup always returns 0 unless I'm doing something wrong.

So I'm looking for suggestions to achieve what I want.

Under linux everything is redirected to the file I specify *shrug*.
Title: Re: A little Batch problem..
Post by: cjeremy on October 07, 2008, 06:50:41 pm
so would a simple 2>&1 redirect work for you.... ie

./nslookup_script.pl > myout 2>&1

?????
Title: Re: A little Batch problem..
Post by: JohnC on October 07, 2008, 08:35:52 pm
Thank you cjeremy :)