Jump to content

autoit dns server


JRSmile
 Share

Recommended Posts

Hi there,

i have a little knowledge issue with python...

i want to use autoit as backend for a little dns server (LAN parties etc.)

so the software will handle the udp&tcp stuff and autoit will sponsor the logic of the system this is easily possible in python as you can see here:

POWERDNS website

but i cant figure out if and how it is possible with autoit.

already tried some stuff with cui stdrr read write consolewrite and so on but no success.

if somebody would be so kind and have a look at this example in python and maybe explain if it is possible to do it in autoit or even translates it into autoit, i would present him a bussy. :-)

here is the python function mentionend on the link above:

#!/usr/bin/perl -w
# sample PowerDNS Coprocess backend
#

use strict;


$|=1;                   # no buffering

my $line=<>;
chomp($line);

unless($line eq "HELO\t1") {
    print "FAIL\n";
    print STDERR "Recevied '$line'\n";
    <>;
    exit;
}
print "OK   Sample backend firing up\n";    # print our banner

while(<>)
{
    print STDERR "$$ Received: $_";
    chomp();
    my @arr=split(/\t/);
    if(@arr<6) {
        print "LOG  PowerDNS sent unparseable line\n";
        print "FAIL\n";
        next;
    }

    my ($type,$qname,$qclass,$qtype,$id,$ip)=split(/\t/);

    if(($qtype eq "A" || $qtype eq "ANY") && $qname eq "webserver.example.com") {
        print STDERR "$$ Sent A records\n";
        print "DATA $qname  $qclass A   3600    -1  1.2.3.4\n";
        print "DATA $qname  $qclass A   3600    -1  1.2.3.5\n";
        print "DATA $qname  $qclass A   3600    -1  1.2.3.6\n";
    }
    elsif(($qtype eq "CNAME" || $qtype eq "ANY") && $qname eq "www.example.com") {
        print STDERR "$$ Sent CNAME records\n";
        print "DATA $qname  $qclass CNAME   3600    -1  webserver.example.com\n";
    }
    elsif($qtype eq "MBOXFW") {
        print STDERR "$$ Sent MBOXFW records\n";
        print "DATA $qname  $qclass MBOXFW  3600    -1  powerdns\@example.com\n";
    }


    print STDERR "$$ End of data\n";
    print "END\n";
}

Best regards,

your JRSmile.

$a=StringSplit("547275737420796F757220546563686E6F6C75737421","")
For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4)
Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])));''Chr("a")&"HI"
Next ;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile;
MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-)
Link to comment
Share on other sites

noone?

$a=StringSplit("547275737420796F757220546563686E6F6C75737421","")
For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4)
Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])));''Chr("a")&"HI"
Next ;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile;
MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-)
Link to comment
Share on other sites

  • 8 months later...

bump?

$a=StringSplit("547275737420796F757220546563686E6F6C75737421","")
For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4)
Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])));''Chr("a")&"HI"
Next ;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile;
MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...