Results 1 to 4 of 4

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: no dns-utils???

  1. #1
    Default no dns-utils???
    I have to resort to python just to get a dns lookup. Looking in the cydia repo, there is no package that contains "dig", no "nslookup", no "host". So just to get a dns lookup, I have to do something like (in python):

    import socket
    print socket.gethostbyname('www.google.com')


    What a headache.

  2. #2
    Quote Originally Posted by jcyph3r View Post
    I have to resort to python just to get a dns lookup.
    Code:
    apt-get install bind
    will get you dig and nslookup, otherwise I quite like your little python script

    I know nothing about Python, but I cobbled this together from your example, just save it in /usr/local/bin/dig and then chmod 755 /usr/local/bin/dig and pretend...



    Code:
    #!/usr/bin/python
    import sys
    import socket
    
    if (len(sys.argv) > 1):
            print socket.gethostbyname(sys.argv[1])
    else:
            print "Usage", sys.argv[0], "<FQDN>"

  3. #3
    Quote Originally Posted by sfinktah View Post
    Code:
    apt-get install bind
    will get you dig and nslookup, otherwise I quite like your little python script
    Thanks, the bind package also seems to give /usr/bin/host as well. I hadn't installed that because the package description only referred to installing a DNS *server*.

  4. #4
    Plz try below...


    # apt-get install bind
    # cat > /etc/resolv.conf
    nameserver 8.8.8.8
    ^D

    # cp /usr/bin/dig /usr/bin/dig_
    # cp /usr/bin/nslookup /usr/bin/nslookup_
    # cp /usr/bin/host /usr/bin/host_
    # apt-get remove bind
    # mv /usr/bin/dig_ /usr/bin/dig
    # mv /usr/bin/nslookup_ /usr/bin/nslookup
    # mv /usr/bin/host_ /usr/bin/host

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •