Jump to content

Telephone area codes and prefixes database? For Wordlist generation


vailixi
 Share

Recommended Posts

I was hoping find a good list of possible US phone numbers. Back in the day I had a database of all of the cities, zip codes, area codes, prefixes etc, but I can't remember what it was called or where I got it from. Basically I was going to use all of the possible valid area codes and phone numbers for some NETGEARXX rainbow tables. But I really didn't want to generate a 102 GB wordlist when only a fraction of the words are going to be possible valid numbers.

Anybody know where I can find a file with valid area code and prefix information? Is it in one of the geolocation databases?

 

Link to comment
Share on other sites

Crunch. 

 

./crunch 10 10 -t 206%%%%%%% -o /root/206.txt

206 Seattle Washington phone number area code.

 

Personal phone numbers and 1800-provider numbers are commonly used.

 

edit.. I didn't read the entire post.typically pipe the results to pyrite or hashcat instead of generating a file.

Edited by i8igmac
Link to comment
Share on other sites

On 10/7/2018 at 10:24 PM, i8igmac said:

./crunch 10 10 -t 206%%%%%%% -o /root/206.txt

This is pretty much what I'm doing.

Say there are 53 valid prefixes in Seattle. I would put those into prefixes.txt read through the list and call crunch with the area code and prefix. The wordlist it will generate is 530,000 lines rather than 10,000,000. The rainbow table takes 23 minutes to generate rather than 7 hours.

#!/bin/bash

touch seattlenumbers.txt

AREACODE="206"
DIGITS="%%%%"

cat /root/prefixes.txt | while read line; do

NUMBER=$AREACODE$line$DIGITS

crunch 10 10 -t $NUMBER >> seattlenumbers.txt; done

 

Link to comment
Share on other sites

Kinda seems like the information would be out there already and readily available. It's weird, you used to be able to find this stuff easily. Seems there more websites there are the harder it is to find useful information.

your suggestion on scripting seems to be right course of action. Maybe something like this:

#!/bin/bash

SITE="https://www.allareacodes.com/"

cat /root/Desktop/areacodes.txt | while read line; do

URL=$SITE$line

sleep 15
wget $URL; done

grep -o '([0-9]\{3\})[^\s][0-9]\{3\}' /root/Desktop/areacodes/ > areaprefix.txt

 

Edited by vailixi
Link to comment
Share on other sites

For whatever reason the text file I ended up with had some extra carriage return or newline characters and crunch was counting some of those as extra characters so crunch was throwing errors. So I wrote a quick python script to write out all of the digits.

#!/usr/bin/python
import sys
l = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
   	
for a in range(0, 9):
	for b in range(0, 9):
		for c in range(0, 9):
			for d in range(0, 9):
				with open("/root/Desktop/areacodes/one.txt") as f:
					for line in f:
						i=(line.strip())+(l[a])+(l[b])+(l[c])+(l[d])
						print i

It took about 11 minutes to generate the list. 1,090,503,810 lines and a little under 12GB which is about 11% of the 10,000,000,000 lines and 102 GB that crunch would have produced. At any rate generating a rainbow table that size would probably take months so splitting it into lists with local numbers then generating the tables would probably be the way to go. I'll put the list of up for download like with my other wordlists because it took a little bit of work to put together.

Link to comment
Share on other sites

On 10/9/2018 at 1:15 AM, vailixi said:

For whatever reason the text file I ended up with had some extra carriage return or newline characters and crunch was counting some of those as extra characters so crunch was throwing errors. So I wrote a quick python script to write out all of the digits.


#!/usr/bin/python
import sys
l = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
   	
for a in range(0, 9):
	for b in range(0, 9):
		for c in range(0, 9):
			for d in range(0, 9):
				with open("/root/Desktop/areacodes/one.txt") as f:
					for line in f:
						i=(line.strip())+(l[a])+(l[b])+(l[c])+(l[d])
						print i

It took about 11 minutes to generate the list. 1,090,503,810 lines and a little under 12GB which is about 11% of the 10,000,000,000 lines and 102 GB that crunch would have produced. At any rate generating a rainbow table that size would probably take months so splitting it into lists with local numbers then generating the tables would probably be the way to go. I'll put the list of up for download like with my other wordlists because it took a little bit of work to put together.

python permutation might be faster.

 

Here is how i do it in ruby

[0,1,2,3,4,5,6,7,8,9].permutation{|x| f.puts(x.join)}

 

Edit this one produces the correct results.

[0,1,2,3,4,5,6,7,8,9].repeated_permutation(6){|x| puts x.join}

http://rubyfiddle.com/riddles/69c8c

Test the code with the link

 

I was looking at cuda libs for ruby to see if things can run quicker. You should check python for cuda libs.

 

 

Edited by i8igmac
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

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