Skip to content

Commit 442aa92

Browse files
authored
Update README.md
1 parent 09ba853 commit 442aa92

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@ Steps:
1414
2. Download pfx2as file from CAIDA
1515
3. Generate the mapping db file
1616
4. Usage
17+
1718
import pyasn
19+
1820
asndb = pyasn.pyasn('ipasn.dat')
21+
1922
asndb.lookup('8.8.8.8') # should return: (15169, '8.8.8.0/24'), the origin AS, and the BGP prefix it matches
23+
2024
asndb.get_as_prefixes(1128) # returns ['130.161.0.0/16', '131.180.0.0/16', '145.94.0.0/16'], TU-Delft prefixes
2125

0 commit comments

Comments
 (0)