IT.COM

guide Mine for available domains using Linux (howto)

NameSilo
Watch

kprojects

Established Member
Impact
79
I've been using this lately - after building a list of strings - to find out what's available out there.. figured i'd share in case anyone else is looking for something like this.. I'm using Linux to mine for domains...

Create your wordlist
First, build your list with python - this will create a 4 digit list of alphanumeric characters:
Code:
#!/usr/bin/python
chars = range(ord('a'), ord('z')+1);
print [chr(a) + chr(b) +chr(c) +chr(d) for a in chars for b in chars for c in chars for d in chars]

(If you want 5 character alphanumeric, use this:
Code:
#!/usr/bin/python
chars = range(ord('a'), ord('z')+1);
print [chr(a) + chr(b) +chr(c) +chr(d) +chr(e) for a in chars for b in chars for c in chars for d in chars]

Then, run it into a file:
Code:
name-of-file.py > 4-letter-strings.txt

next, make it so it's just one per line:
Code:
cat 4-letter-strings.txt |tr " " "\n" > 4l-domains.txt

Now, get rid of all of the ' and , in the file:

Code:
 sed -i -- 's/'//g' 4-letter-strings.txt
sed -i -- 's/,//g' 4-letter-strings.txt

Next, add your domain extension.. .com, .net, etc..

Code:
sed -e 's/$/.net/' -i 4-letter-strings.txt

Now, you should have a file full of LLLL or LLLLL.com/net strings..

Check your wordlist to see if they're available:
Run the 'for loop' to check them:

Code:
#!/bin/bash

for d in $(cat 4-letter-strings.txt);do echo "--- $d" >> finished.txt && sleep 32 && /usr/bin/whois $d|grep -i 'no match\|not found' >> finished.txt;done

Then, you can look through the finished.txt file for available domains..

If you'd like to get emailed a report, use this script (i named it script-mail.sh on my server):

Code:
#!/bin/bash
# check-mail.sh
if cat /usr/local/bin/finished.txt | grep 'No match' > /dev/null; then
grep -i "no match" /usr/local/bin/finished.txt | tee /tmp/domains.txt >> /usr/local/bin/found.txt
>/usr/local/bin/finished.txt
cat /tmp/domains.txt | mail -s "found a domain" [email protected]
fi
(and put it in cron for every hour or so...)
Code:
*/5 * * * * /usr/local/bin/check-mail.sh > /dev/null 2>&1

Hope this helps someone.. it's a bit crude, but it works!

Rob
 
2
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
I dont know how to use code you have here is there a way i can get a link to download on my system?
Thanks
 
0
•••
Nice tutorial kprojects. Could you do this with a local machine or do you need to use a Linux VPS?
 
0
•••
0
•••
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back