Skip to content

python script to convert back and forth between asdot+ and asplain format

License

Notifications You must be signed in to change notification settings

tbaschak/asdot-asplain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

asdot-asplain

python script to convert back and forth between asdot+ and asplain format

Usage

Usage:
  ./asn-convert.py <asn>

    <asn> - ASN to convert in ASPLAIN or ASDOT+ format

Outputs ASPLAIN if given ASDOT+, and ASDOT+ if given ASPLAIN,
unless as 16-bit ASN, then no change

Examples

Converts ASPLAIN to ASDOT+, ASDOT+ to ASPLAIN, and does nothing.

$ ./asn-convert.py 393523; ./asn-convert.py 6.307; ./asn-convert.py 65179
6.307
393523
65179

Converts ASPLAIN to ASDOT+, then back to ASPLAIN.

$ ./asn-convert.py `./asn-convert.py 393523`
393523

Converts ASDOT+ to ASPLAIN, then back to ASDOT+.

$ ./asn-convert.py `./asn-convert.py 6.307`
6.307

Library use

makes 2 functions available:

  • asdot2plain( asdot )
  • asplain2asdot( asplain )

References

About

python script to convert back and forth between asdot+ and asplain format

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages