
أداة مساعدة للكشف عن مختلف التقنيات المستخدمة في عنوان IP معيّن.
الميزات • التثبيت • الاستخدام • انضم إلى ديسكورد
cdncheck هي أداة لتحديد التقنية المرتبطة بعناوين الشبكة dns / ip.

يتطلب cdncheck إصدار go1.19 للتثبيت بنجاح. شغّل الأمر التالي لتثبيت أحدث إصدار:
go install -v github.com/projectdiscovery/cdncheck/cmd/cdncheck@latest
cdncheck -h
سيعرض هذا صفحة المساعدة الخاصة بالأداة. فيما يلي جميع الخيارات التي تدعمها.
Usage:
./cdncheck [flags]
Flags:
INPUT:
-i, -input string[] list of ip / dns to process
DETECTION:
-cdn display only cdn in cli output
-cloud display only cloud in cli output
-waf display only waf in cli output
MATCHER:
-mcdn, -match-cdn string[] match host with specified cdn provider (cloudfront, fastly, google, leaseweb)
-mcloud, -match-cloud string[] match host with specified cloud provider (aws, google, oracle)
-mwaf, -match-waf string[] match host with specified waf provider (cloudflare, incapsula, sucuri, akamai)
FILTER:
-fcdn, -filter-cdn string[] filter host with specified cdn provider (cloudfront, fastly, google, leaseweb)
-fcloud, -filter-cloud string[] filter host with specified cloud provider (aws, google, oracle)
-fwaf, -filter-waf string[] filter host with specified waf provider (cloudflare, incapsula, sucuri, akamai)
OUTPUT:
-resp display technology name in cli output
-o, -output string write output in plain format to file
-v, -verbose display verbose output
-j, -jsonl write output in json(line) format
-nc, -no-color disable colors in cli output
-version display version of the project
-silent only display results in output
CONFIG:
-r, -resolver string[] list of resolvers to use (file or comma separated)
-e, -exclude exclude detected ip from output
-retry int maximum number of retries for dns resolution (must be at least 1) (default 2)
UPDATE:
-up, -update update cdncheck to latest version
-duc, -disable-update-check disable automatic cdncheck update check
يحتوي ملف provider.yaml على قائمة بمزودي CDN وWAF وCloud. تحتوي القائمة على URLs وASNs وCIDRs والتي يتم تجميعها بعد ذلك في ملف sources_data.json نهائي باستخدام برنامج generate-index.
مثال على ملف provider.yaml -
cdn:
# asn contains the ASN numbers for providers
asn:
leaseweb:
- AS60626
# urls contains a list of URLs for CDN providers
urls:
cloudfront:
- https://d7uri8nf7uskq.cloudfront.net/tools/list-cloudfront-ips
fastly:
- https://api.fastly.com/public-ip-list
# cidr contains the CIDR ranges for providers
cidr:
akamai:
- "23.235.32.0/20"
- "43.249.72.0/22"
- "103.244.50.0/24"
- "103.245.222.0/23"
- "103.245.224.0/24"
- "104.156.80.0/20"
يمكن إضافة مزودين جدد يمكن جلب بياناتهم من رابط URL أو ASN أو قائمة CIDR ثابتة إلى ملف provider.yaml باتباع الخطوات البسيطة التالية:
cmd/generate-index/provider.yaml.cmd/generate-index.provider.yaml وحدد موقع القسم الخاص بنوع المزود الذي تريد إضافته (CDN أو WAF أو Cloud).provider.yaml.يمكن إجراء الإضافات المستندة إلى CNAME وWappalyzer في ملف other.go. فقط أضف القيم إلى المتغيرات وستكون جاهزًا.
// cdnCnameDomains contains a map of CNAME to domains to cdns
var cdnCnameDomains = map[string]string{
"cloudfront.net": "amazon",
"amazonaws.com": "amazon",
...
}
// cdnWappalyzerTechnologies contains a map of wappalyzer technologies to cdns
var cdnWappalyzerTechnologies = map[string]string{
"imperva": "imperva",
"incapsula": "incapsula",
...
}
مكتبة مساعدة تتحقق مما إذا كان عنوان IP معيّن يعمل على Cloud / CDN / WAF.
يمكن استخدام المكتبة عن طريق استيراد github.com/projectdiscovery/cdncheck. فيما يلي مثال أساسي:
package main
import (
"fmt"
"net"
"github.com/projectdiscovery/cdncheck"
)
func main() {
client := cdncheck.New()
ip := net.ParseIP("173.245.48.12")
// checks if an IP is contained in the cdn denylist
matched, val, err := client.CheckCDN(ip)
if err != nil {
panic(err)
}
if matched {
fmt.Printf("%v is a %v\n", ip, val)
} else {
fmt.Printf("%v is not a CDN\n", ip)
}
// checks if an IP is contained in the cloud denylist
matched, val, err = client.CheckCloud(ip)
if err != nil {
panic(err)
}
if matched {
fmt.Printf("%v is a %v\n", ip, val)
} else {
fmt.Printf("%v is not a Cloud\n", ip)
}
// checks if an IP is contained in the waf denylist
matched, val, err = client.CheckWAF(ip)
if err != nil {
panic(err)
}
if matched {
fmt.Printf("%v WAF is %v\n", ip, val)
} else {
fmt.Printf("%v is not a WAF\n", ip)
}
}
تم صنع cdncheck بكل ❤️ بواسطة فريق projectdiscovery ويتم توزيعه بموجب رخصة MIT.