20i Reseller Hosting

Nominet EPP & DAC Guides

Discussion in 'Domain Tools' started by danielcoates, Jan 23, 2016.

  1. danielcoates

    danielcoates Active Member

    Joined:
    Apr 2013
    Posts:
    138
    Likes Received:
    5
    Does anybody know of any guides to using both EPP and DAC?

    Preferably with BASH, PHP or C?

    Thanks
     
  2. Domain Forum

    Acorn Domains Elite Member

    Joined:
    1999
    Messages:
    Many
    Likes Received:
    Lots
    articles.co.uk
     
  3. ian

    ian Well-Known Member

    Joined:
    Jan 2008
    Posts:
    3,670
    Likes Received:
    251
  4. danielcoates

    danielcoates Active Member

    Joined:
    Apr 2013
    Posts:
    138
    Likes Received:
    5
  5. DaveP United Kingdom

    DaveP Well-Known Member

    Joined:
    Mar 2010
    Posts:
    2,899
    Likes Received:
    52
    What are you confused about exactly? Have you any knowledge of programming?
     
  6. danielcoates

    danielcoates Active Member

    Joined:
    Apr 2013
    Posts:
    138
    Likes Received:
    5
    I have basic knowledge of BASH & C (and I mean basic), with a working knowledge in PHP. Most of what I have programmed in the past, have been simple database web scripts, I have never needed to progress further than that.

    I learnt what BASH and C I needed to manage Apache, and set-up vhosts and things like that, never really went much further as I had PHP for the rest.

    DAC: I have figured out how to Telnet into the DAC server, and that's helpful, but I need to be able to process the data into a file, for further checks, and this is where I am confused, how to I pipe the data to a txt file, or is Telnet the wrong way to go.

    If so, just point me in the direction of the correct program, and I'll figure the rest out.

    EPP: I have no idea where to start here, I am reading up on XML, and I'll figure something out from there, when the time comes, but for now, I am more interested in checking domains, than registering them.
     
  7. monaghan United Kingdom

    monaghan Moderator Staff Member

    Joined:
    May 2007
    Posts:
    2,101
    Likes Received:
    71
    From your reply, I'd suggest that you are not ready to be programming to the levels needed. I'd read up on network socket programming and see how confident you feel with it. In simple terms you open the port, write to it and read the response then deal with the response however you see fit.

    Nominet do not provide any code samples, they expect you to roll your own and most here who have done so will keep cards close to their chest as I'm guessing most have only written their code for catching purposes. If you understand network programming, then it's really quite simple to code something.
     
  8. ian

    ian Well-Known Member

    Joined:
    Jan 2008
    Posts:
    3,670
    Likes Received:
    251
    So what code do catchers need to be most proficient in these days? Scripts made entirely of c++, php, a mix, or something else completely?

    Wish I had paid attention to coding years ago!
     
  9. danielcoates

    danielcoates Active Member

    Joined:
    Apr 2013
    Posts:
    138
    Likes Received:
    5
    Thanks Monaghan, that was the sort of nod I was after 'Reasearch Network Socket Programming', I'll look into it :D

    As for not being ready, I'm not writing a catch script, just a list manager to automate checking my lists. When I get a little more confident I may look at doing that.

    Asking a domainer to reveal there trade secrets would be like asking Google to give Yahoo it's algorithms, and I'm not asking for that, just a nod in the right dirtection.
     
  10. danielcoates

    danielcoates Active Member

    Joined:
    Apr 2013
    Posts:
    138
    Likes Received:
    5
    EDIT: Please see later post, and correction!

    I've been looking into speed of languages over the last couple of days, and Python seems to be the fastest from what I've read, when I'm back at my pic I'll post some links.

    From what I have read on here it seems to be more to do with the latency to the Nominet servers
     
    Last edited: Jan 24, 2016
  11. Skinner

    Skinner Well-Known Member

    Joined:
    Jul 2008
    Posts:
    4,660
    Likes Received:
    137
    If you wanted raw speed, go assembly, long slog though. MASM makes me shudder and shiver :p

    With PHP for your current needs you don't really need to look into network programming, off the top of my head code would look like


    $sock = socket_create(af_inet, sock_stream, 0);
    socket_connect($sock , 'dac.nic.uk' , 3043);
    socket_send ($sock, "dom.uk", strlen(6), 0);
    //read socket
    //do as you need to do.
    socket_send ($sock, "#exit", 5, 0);
    socket_shutdown($sock, 2);
    socket_close($sock);

    Put a loop in to send multiple names, write to a database whatever, you need, but all the nasty network programming is done by PHP, the above it petty ALL the network programming needed for your needs.
     
  12. danielcoates

    danielcoates Active Member

    Joined:
    Apr 2013
    Posts:
    138
    Likes Received:
    5
    Assembly, nah, I'll steer clear of the a for now!

    Thanks, Skinner, that's a great help :D
     
  13. PoshTiger United Kingdom

    PoshTiger Well-Known Member

    Joined:
    Jun 2011
    Posts:
    1,414
    Likes Received:
    59
    Nah - C kicks it's ass!
     
  14. RobM

    RobM Well-Known Member Exclusive Member

    Joined:
    Mar 2012
    Posts:
    3,105
    Likes Received:
    444
    If a command takes 50ms to execute with one language and 5ms with another then latency will be an irrelevant factor.
     
  15. monaghan United Kingdom

    monaghan Moderator Staff Member

    Joined:
    May 2007
    Posts:
    2,101
    Likes Received:
    71
    Of course, if the language goes through the same common underlying C library files included with the OS then the actual language the control looping is written in is not going to make that much of a difference once the issue of compilation is removed from the equation as this mostly affects start-up time rather than execution time.
     
  16. RobM

    RobM Well-Known Member Exclusive Member

    Joined:
    Mar 2012
    Posts:
    3,105
    Likes Received:
    444
    Python and PHP are interpreted languages. Any routine you write in those languages can be faster executed in assembler or C. I think people are getting too hung up on latency - although that is one factor it becomes irrelevant if your code is full of slow loops, function calls, even something as simple as variable declaration *if* you are going to have to pass through an interpreter before you even get to a precompiled library. Also my statement still stands - if your code requires 50ms to run something that can be run at 5ms in another language you are at a disadantage. I believe it was Alex here who had suggested reading about networks and socketing. This is a must. If these routines are poorly written or slow you will be wasting time trying to catch. Of course for compiling lists speed isn't an issue and, as mentioned, PHP socket handling is probably one of the easier wrappers to use.
     
    Last edited: Jan 24, 2016
  17. danielcoates

    danielcoates Active Member

    Joined:
    Apr 2013
    Posts:
    138
    Likes Received:
    5
    I have to hold my head in shame, I've re-read one of the articles, and I got the languages the wrong way round! Did I mention I'm a newbie at this?

    The article I read states that C++ is faster than Python, and I got them the wrong way round, and yes, I know C++ is not the same as C, and that there will proberbly be performance differences in that too. :(

    The Article: C++ vs. Python vs. Perl vs. PHP performance benchmark

    Also, I'm not trying to write my own catch script, I'm nowhere near that level, yet!
     
  18. monaghan United Kingdom

    monaghan Moderator Staff Member

    Joined:
    May 2007
    Posts:
    2,101
    Likes Received:
    71
    Agreed, however, if using PHP then you'll probably end up going through the same C library as if you'd written it in C and with a modern computer, you'll probably still be spending a long time in your delay loop (so you don't break your DAC access rates) even if using an entirely interpreted language. The whole picture needs to be taken into account. For raw speed, then assembler is the way to go, for ease of ongoing maintenance, then a high level scripting language is ideal and a lot easier to write out those results into a database
     
  19. ian

    ian Well-Known Member

    Joined:
    Jan 2008
    Posts:
    3,670
    Likes Received:
    251
    Who's for Rob and Alex have a script speed off battle ;)
     
  20. RobM

    RobM Well-Known Member Exclusive Member

    Joined:
    Mar 2012
    Posts:
    3,105
    Likes Received:
    444
    Heh we are saying the same thing - write in assembler for speed. C if you can't write in assembler. Then PHP as a last resort :)
     
  21. monaghan United Kingdom

    monaghan Moderator Staff Member

    Joined:
    May 2007
    Posts:
    2,101
    Likes Received:
    71
    No thanks, gone are the days of looking through the processor documentation to compare the number of CPU cycles each OP code takes and then building the fastest code by hand!

    Even on an basic modern CPU you can poll the DAC with a simple PHP loop much faster than the limits allow, I even had to slow down my 1st attempt (many years ago now!) written on an old Windows server in C#