-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
18 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,29 @@ | ||
# DNS Resolver | ||
# DNS Resolver (ECSE 416) | ||
|
||
## Overview | ||
This is a simple DNS Resolver packaged in a self contained library. Query types currently supported are: `A | NS | MX` thus far. | ||
|
||
## Dependencies | ||
This tool uses Python 3, tested on Python 3.7.4. | ||
|
||
To install the dependencies run either: | ||
`pip install -r requirements.txt` | ||
|
||
or, | ||
To install the dependencies and run the package you can use: | ||
|
||
`pip install .` | ||
|
||
## Usage: | ||
For usage instructions use: | ||
|
||
`python main.py -h` | ||
|
||
To use as a library: | ||
```python3 | ||
import dns | ||
|
||
query = dns.Query(names=[("gmail.com", dns.QUERY_TYPE_MX)]) | ||
with dns.Resolver() as resolver: | ||
response = resolver.query(query, "8.8.8.8", port=53) | ||
print(response) | ||
``` | ||
|
||
### Errors | ||
The program will raise various errors based on the server response, more infomration can be found using `help(Resolver.query)` |