Re: Resolve hostname by specified nameserver

2009-10-20 Thread Rafał Pocztarski
>    my $res = Net::DNS::Resolver->new(nameservers=>[$nameserver]) or die;

Sorry, I overlooked the part where you wrote that you can't use
Net::DNS... Just ignore my message.

Rafał Pocztarski
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Resolve hostname by specified nameserver

2009-10-20 Thread Rafał Pocztarski
2009/10/20 rocku :
> So my question is - how to query a specific nameserver about a DNS 'A'
> record?

See the first example in the Net::DNS manpage:

http://search.cpan.org/~olaf/Net-DNS-0.65/lib/Net/DNS.pm#EXAMPLES

Just change:

my $res = Net::DNS::Resolver->new;

to:

my $res = Net::DNS::Resolver->new(nameservers=>[$nameserver]) or die;

where $nameserver is the IP address of your name server.

Rafał Pocztarski
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Text Encrypt and Decryption

2009-10-19 Thread Rafał Pocztarski
2009/10/19 Kprasad :
> Can I encrypt our perl script by using these codes?
> I need suggestion that it's safe or not do encrypt and decrypt our .pl or
> .plx file with this code.

Who do you want to hide it from? Someone who gets the code?

> my $obscure =  pack("u",$_);
> my $unobscure = unpack(chr(ord("a") + 19 + print ""),$obscure);

First of all, this text is uuencoded, not encrypted. See:
http://en.wikipedia.org/wiki/Uuencoding
This encoding is used for sending binary data over text links, not for
encryption.

Even if the value of (chr(ord("a") + 19 + print "") was hard to guess
- and it isn't, it's basically 19th letter after "a" and then one next
- it wouldn't matter because pack/unpack don't have that many options
for encoding strings of text, and even if it did you still have to
include something that evaluates to the correct value in your code
that enyone can evaluate to see what that secret value is without even
any need to understand the code used to hide it.

Rafał Pocztarski
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs