vfarid / cf-ip-scanner-py Goto Github PK
View Code? Open in Web Editor NEWCloudflare's IP Scanner in Python
License: GNU General Public License v3.0
Cloudflare's IP Scanner in Python
License: GNU General Public License v3.0
Hi, I found a significant issue in the start.py
file.
When start.py
was running, I monitored the network and saw that most of the packets were going to one Cloudflare IP address. After more investigation of the code and network monitoring, I saw that only the getPing
function sends ICMP packets to the correct IP address destination when pinging.
The getLatencyAndJitter
, getDownloadSpeed
, and getUploadSpeed
functions always send their packets to the default IP address of speed.cloudflare.com
. This should not happen because we want to send packets to each IP address to find out which ones are clean.
I tested start.py
on Windows 11 with Python 3.11.5 and Ubuntu 20.04 with Python 3.8.10, and the problem was there.
سلام
اگه میشه یه گزینه بذارید برای حذف تست آپلود چون من اینترنتم سرعتش ۱۶ هستش ولی آپلود تا ۱ هم نمیرسه و وقتی میخوام دقت تست برنامه رو بالا ببرم مجبورم حجم تست رو تا ۱۵ مگابایت بالا ببرم و سر هر تست چون میخواد ۱۵ مگابایت آپلود کنه چند دقیقه طول میکش ولی دانلود رو در جا تست میکنه. فکر کنم این مشکل برای همه کسانی که (ای دی اس ال) دارن پیش بیاد.
یا اینکه تعیین حجم تست آپلود رو از دانلود جدا کنید.
با تشکر از این برنامه خوبتون
please add all the packages(even standard packages that have imported to the script) to the requirements.txt
and tell the users to use pip install -r requirements.txt
to install all the packages at once. even those installed packages won't make any error, pip will skip them without confusing the user.
btw thank you Vahid.
خرّم آن کس که در این محنت گاه///خاطری را سبب تسکین است//صائب
سلامتوی ورژن 1.3 بدون مشکل کار میکنه اما توی ورژن 1.4 خطا زیر رو میدهد
PS C:\Users\RAR\Desktop\cf-ip-scanner-py-1.4> py .\start.py
Traceback (most recent call last):
File "C:\Users\RAR\Desktop\cf-ip-scanner-py-1.4\start.py", line 14, in
import curses
File "C:\Users\RAR\AppData\Local\Programs\Python\Python310\lib\curses_init_.py", line 13, in
from _curses import *
ModuleNotFoundError: No module named '_curses'
ممنون از ابزار کارآمدی که ساختین یه مشکلی برای پیش اومد که گفتم اینجا بگم بقیه استفاده کنن من اونجایی که ساب دامین میخواست فقط ساب دامین رو نوشتم بدون خود دامنه اصلی ایپی ها اد شدن و مشکلی نداشت ولی رکورد های قبلی روی سابدامین پاک نمیشدن کامل که نوشتم درست شد اینطوری ip.example.com
سلام و عرض ادب
من اسکریپت شما رو در لینوکس اجرا میکنم با python3 ولی نتیجه بصورت زیر میاد
Traceback (most recent call last):
File "start.py", line 262, in
def startTest(stdscr: curses.window, ip_list: Pattern[AnyStr], config: configparser.ConfigParser):
AttributeError: module 'curses' has no attribute 'window'
چطور این مشکلو حل کنم.
Hi, First thank for you great job.
Is it possible for you to add parallel IP scanning using threads or multi processors ?
Like something in https://github.com/MortezaBashsiz/CFScanner
سلام.
من این اسکریپت رو روی مک اجرا کردم و متاسفانه رنجی که قطعا توش آیپی سالم و پر سرعت وجود داره و من خودم در حال استفادش هستم رو همش
منفی ۱ میزنه.
اصلا یک دونه ایپی هم پیدا نمیکنه. با اینکه تمام تنظیمات رو در بالاتری حد ممکن قرار دادم, مثل پینگ ۱۰۰۰۰!!
فیلم رو ببینید.
البته من رنج ایپی هارو پاک کردم و فقط این یکی رو گذاشتم جهت تست. هرچند در حالت اورجینال هم همش خطا میداد.
سرور speed.cloudflare.com فیلتر شده.
بعد از تست پینگ،بقیه تست ها انجام نمیشه
سلام وحید جان بعد تمامی موارد که تو نیازمندی فایل بود نصب کردم برنامه که استارت میزنم همه چیز رو روی حالت پیش فرض خودتت قرار میدم حتی تعداد ای پی میذارم 1 دونه ولی حتی یکدونه هم نمایش نمیده در حالی که موقع اسکن بعضی ای پی ها زیرش مینوسه پینگشون رو ولی ثبت نمیکنه بالغ بر 2 هزار خورده ای ای پی تست کرد ولی یک دونه هم پیدا نکرد مشکل به نظرت کجاست؟
start.py", line 10, in
import ping3
ModuleNotFoundError: No module named 'ping3'
سلام آقا وحید خسته نباشید میخواستم بگم روی ویندوز زمانی که میخوام اجرا کنم این خطا میاد ( طبق روش ویدیو خودتون )
File "C:\Users\Lenovo\Desktop\cf-ip-scanner-py-1.5\start.py", line 14, in
import curses
File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python312\Lib\curses_init_.py", line 13, in
from _curses import *
ModuleNotFoundError: No module named '_curses'
Hi,
Thanks for your efforts on this useful Python script.
The problem is that it does not work when I want to put it in my cronjobs! Of course, I have commented out those lines about asking users to input data, however, it still does not work automatically according to the crontab schedule.
سلام وقت بخیر
امکانش هست قابلیت اسکن بر روی رنج اختصاصی و یا افزودن یک رنج خاص به لیست ای پی های اسکنر رو فراهم کنید
این مورد خیلی میتونه به دوستان برای راحت تر شدن اسکنشون کمک بکنه
با سپاس فراوان از بابت زحمات بی دریغ شما
1) Let user to import custom CIDR in absolute path by anyname (to let user customize CIDR for any isp) and store it config file
2) Show results in tabular outputs like what it shows in terminal
3) Just shows a simple question to change predefined configs
4) Let user load extra configs absolute to /configs/lablablab.ini and just type the name of config
5) Let user export result in absolute /output/ or /export or something like it in another name like "shatel.txt"
6) Let user to set order by result but set
7) Let user to re-test founded ips to check stability
8) Prepend founded ip to tabular data result vice versa for more readability
سلام و تشکر
چطور میشه کانفیگ vless اضافه کرد.
من وقتس تو ارایه یه نمونه تنظم تروجان یا ویلس جی ار پی سی میزارم چیزی پیدا نمیکنه
البته دامنه رو چک کردم با ساب مشکلداره
خود کانفیگ چیز خاصی داره ؟
چون من نمونه کانفیگ وی تو ری اکانت شخصیمو گزاشتم
روز بخیر
توی ویندوز اجراش می کنم سر این خط مشکل پیدا میکنه، ترای هم گذاشتم ولی خطای نمایش نمیده و می پره بیرون
selectd_ip_list, total_test = curses.wrapper(startTest, ip_list=ip_list, config=config)
ممنون برای برنامه خوبی که نوشتین
یه ایده داشتم که به صورت ریل تایم نتایج رو هم به یه فایل اضافه کنه ؛ هر موقع ایپی جدید پیدا شد append کنه به فایل
Hi, I am facing this error while using your script (Requirements installed successfully and API Key and Zone ID are correct):
➜ cf-ip-scanner-py git:(main) python3 start.py
Press CTRL+C to exit...
Enter max IP [5]:
Enter max ping [500]:
Enter max jitter [100]:
Enter max latency [1000]:
Enter IPs to include (comma seperated, '-' to ignore) []:
Enter IPs to exclude (comma seperated, '-' to ignore) []:
Enter test data size in KB [2048]:
Enter minimum download speed (Mbps) [3.0]:
Enter minimum upload speed (Mbps) [0.2]:
Do you want to upload the result to your Cloudflare subdomain (yes/no) [no]? yes
Do you want to delete extisting records of given subdomain before uploading the result to your Cloudflare (yes/no) [yes]?
Cloudflare email [********]:
Cloudflare zone ID [************************]:
Cloudflare API key [************************]:
Subdomain to modify (i.e ip.my-domain.com) [********]:
Processing 104.19.160.0/20...
Shuffling the IPs...Done.
9 of 2564096 matched IPs have peen tested.
5 IP(s) found:
|---|---------------|--------|-------|-------|--------|----------|
| # | IP |Ping(ms)|Jit(ms)|Lat(ms)|Up(Mbps)|Down(Mbps)|
|---|---------------|--------|-------|-------|--------|----------|
| 1|104.17.138.248 | 135 | 75 | 547 | 0.72 | 4.07 |
| 2|172.65.9.51 | 137 | 24 | 516 | 0.72 | 4.05 |
| 3|104.22.3.43 | 148 | 43 | 524 | 0.73 | 3.96 |
| 4|104.16.137.212 | 124 | 38 | 518 | 0.72 | 4.10 |
| 5|104.24.10.187 | 138 | 72 | 540 | 0.72 | 3.96 |
|---|---------------|--------|-------|-------|--------|----------|
IP list successfuly exported to `selected-ips.csv` file.
Deleting existing records...Failed to update Cloudflare subdomain!
403 Client Error: Forbidden for url: https://api.cloudflare.com/client/v4/zones/************************/dns_records/************************
Done.
سلام
در زمان اجرای اسکریپت این فایل cf-ipv4.txt رو بازم داره که ارور می ده
Traceback (most recent call last):
File "C:\Users\Hes\Desktop\cf-ip-scanner-py-1.5\start.py", line 14, in
import curses
File "C:\Users\Hes\AppData\Local\Programs\Python\Python311\Lib\curses_init_.py", line 13, in
from _curses import *
ModuleNotFoundError: No module named '_curses'
Hello
Thanks for your good software
I have a request
Can you add custom ip range and custom config scan ; for example scanning Cloudfront cdn ip
سلام وحید جان قبلا روی ویندوز راحت ران میشد ولی الان این خطا رو میده
Processing 104.19.160.0/20...
Shuffling the IPs...Done.
OpenSSL is not installed! You man install it to your system and try again.
یک فایل برای اینکه ویندوزی ها بتونن راحت تر از برنامه استفاده کنن اضافه کردم به نام run.bat که همینجا براتون ارسال می کنم اگر صلاح دونستید به پروژه اضافه کنید. کارش اینکه تمامی نیازمندی های پروژه رو بره دانلود کنه یا راهنمایی تون کنه از کجا می تونید دانلودش کنید
و برای اینکه بتونید تمامی ساب دامنه های اضافه شده بوسیله برنامه رو هم حذف کنید، همون فایل اصلی برنامه رو یکم تغییر دادم به نام deleteAll.py که اونم ارسال می کنم(خیلی خوب نشد ولی کار رو در میاره :-) )
extended files.zip
با تشکر از برنامه خوبتون
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.