Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f3bfdca

Browse files
Merge pull request avinashkranjan#2165 from shraddha761/DOH_DIG
DOH dig script is added
2 parents 2030913 + cbd9f51 commit f3bfdca

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

‎Doh-Dig/Readme.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# DoH DNS Lookup Script
2+
3+
This script performs a DNS lookup using DNS-over-HTTPS (DoH) and the Cloudflare DNS service. It allows you to query DNS records for a specific domain using DoH and retrieve the corresponding DNS information in JSON format.
4+
5+
6+

‎Doh-Dig/dog-dig.py‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import os
2+
import requests
3+
4+
DOH_SERVER = os.environ.get("DOH_SERVER", "https://cloudflare-dns.com/dns-query")
5+
6+
def doh_dns_lookup(domain, record_type):
7+
url = f"{DOH_SERVER}?name={domain}&type={record_type}"
8+
headers = {
9+
"Accept": "application/dns-json"
10+
}
11+
12+
response = requests.get(url, headers=headers)
13+
14+
if response.status_code == 200:
15+
return response.json()
16+
else:
17+
return None

‎SCRIPTS.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@
100100
| 96\. | Sorting Techniques | Sorting techniques are scripts that arrange a collection of data elements in a particular order, typically ascending or descending. | [Take Me](./Sorting%20Techniques/) | [Himanshu Agarwal](https://github.com/himanshu-03)
101101
| 99\. | File Organizer script | A File Organizer script is a program or script that automates the process of organizing files within a directory or multiple directories | [Take Me](./File Organizer script/) | [Abhinav kumar](https://github.com/Abhinavcode13)
102102
| 100\. | File Encryption/Decryption script | A File Organizer script is a program or script that automates the process of organizing files within a directory or multiple directories | [Take Me](./File Encryption/Decryption script/) | [Abhinav kumar](https://github.com/Abhinavcode13)
103+
| 101\. | Doh-dig Script | This script performs a DNS lookup using DNS-over-HTTPS (DoH) and the Cloudflare DNS service. It allows you to query DNS records for a specific domain using DoH and retrieve the corresponding DNS information in JSON format.
104+
| [Take Me](./Doh-dig/) | [Shraddha Singh](https://github.com/shraddha761)
103105
| 101\. | Crypt_Socket | Basic client-server application for secure socket communication in Python, using SSL/TLS encryption. The code demonstrates how to establish a secure connection between a server and a client, ensuring confidentiality and integrity of the transmitted data.
104106
| [Take Me](./Crypt_Socket/) | [Shraddha SIngh](https://github.com/shraddha761)
105107
| 101\. |Story Generator | This script randomly selects a character, setting, action, and conclusion from predefined lists and generates a story using these elements. | [Take Me](./Story_Generator/story_generator.py) | [Shraddha Singh](https://github.com/shraddha761)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /