Huawei firewall automatically updates Chinese ip to target IP group.

Overview

前言

还在初始阶段,有很多内容没添加,例如:日志系统操作日志、连接方式支持telnet、多线程模式并发操作等,不过目前基本能用,后面再慢慢补充吧...

  • 测试机型:华为USG6000
  • 运行环境:Python3

使用

1、打开config.ini进行配置【详见配置文件注释

在【device_info】项中输入想要连接的设备信息

例如:

ip=192.168.1.1
connection_method=ssh
port=23
username = test
password = test123

注意事项:目前暂时只支持ssh连接,后续考虑增加其他

在【chinaip_config】中输入部分自定义设置

例如:

write_text_switch = 0
ip_number = 3000
remote_name = vrpcfg.cfg
local_path = FW_vrpcfg

注意事项:务必使ip组分为两个组,目前部分代码只针对两个组进行了操作

在【custom_script】中确认自定义脚本模式

例如:

custom_script_mode = 0
script_file = scripts.txt

注意事项:需要输入脚本文件的绝对路径,若放在程序运行目录可以不用写绝对路径

2、确认python环境已部署

构建环境使用python3,不确定python2能否运行

3、第一次运行

第一次打开会判断lock.ini文件是否存在,不存在即为第一次运行本程序,默认新建两个ip组,并向内插入数据

注意:为保证每条命令插入成功,建议添加每条命令执行后的延时为0.5,总共预计5600多条命令,运行时间大概47分钟

提示:若觉得过慢,第一次可手动插入,只要保证命名的ip组与下方所示两个ip组相同,且在插入数据后,在程序目录新建一个lock.ini即可

  • china_ip_group_1
  • china_ip_group_2

4、第二次运行:

第二次检测到lock.ini文件存在后,将直接拉取防火墙上的配置文件,并读取两个IP组的数据,同时拉取互联网最新的中国IP段数据,两者进行比对,生成两个列表

  • 添加列表:防火墙中不存在的IP数据
  • 删除列表:防火墙中存在但互联网中已过时的IP数据

预计比对更新时间5秒(根据变动数据的多少来决定)

申明

当你查阅、下载了本项目源代码或二进制程序,即代表你接受了以下条款

  • 本软件仅供技术交流,学术交流使用
  • 本软件作者编写出该软件旨在学习 Python
  • 用户在使用本软件时,若用户在当地产生一切违法行为由用户承担
  • 严禁用户将本软件使用于商业和个人其他意图
  • 若用户不同意上述条款任意一条,请勿使用本软件

结束

有问题可联系邮箱:[email protected]

Owner
Lundaa
Lundaa
Docker container for demoing Wi-Fi calling stack.

VoWiFiLocalDemo - Docker container that runs StrongSwan and Kamailio to demonstrate how Wi-Fi calling works on smartphones.

18 Nov 12, 2022
A repository dedicated to IoT(internet of things ) and python scripts

📑 Introduction Week of Learning is a weekly program in which you will get all the necessary knowledge about Circuit-Building, Arduino and Micro-Contr

27 Nov 22, 2022
VRF-StarkNet - Contracts for verifiable randomness on StarkNet

VRF-StarkNet Contracts for verifiable randomness on StarkNet Motivation Deployed

Non 32 Oct 30, 2022
A powerful framework for decentralized federated learning with user-defined communication topology

Scatterbrained Decentralized Federated Learning Scatterbrained makes it easy to build federated learning systems. In addition to traditional federated

Johns Hopkins Applied Physics Laboratory 7 Sep 26, 2022
A simple python script that parses the MSFT Teams log file for the users current Teams status and then outputs the status color to a MQTT connected light.

Description A simple python script that parses the MSFT Teams log file for the users current Teams status and then outputs the status color to a MQTT

Lorentz Factr 8 Dec 16, 2022
Dark Utilities - Cloudflare Uam Bypass

Dark Utilities - Cloudflare Uam Bypass

Inplex-sys 26 Dec 14, 2022
Easy to use gRPC-web client in python

pyease-grpc Easy to use gRPC-web client in python Tutorial This package provides a requests like interface to make calls to gRPC-Web servers.

Sudipto Chandra 4 Dec 03, 2022
An ansible playbook to set up wireguard server.

Poor man's VPN (pay for only what you need) An ansible playbook to quickly set up Wireguard server for occasional personal use. It takes around five m

Amrit Bera 613 Dec 25, 2022
DEMO SOCKET AF INET SSL PYTHON

DEMO_SOCKET_AF_INET_SSL_PYTHON Python demo of socket family as AF_INET using TCP with SSL. Compatibility : macOS & GNU/Linux Network Topology style :

Enola 1 Jan 24, 2022
Arp Spoofer using Python 3.

ARP Spoofer / Wifi Killer By Auax Run: Run the application with the following command: python3 spoof.py -t target_ip_address -lh host_ip_address I

Auax 6 Sep 15, 2022
Rufus is a Dos tool written in Python3.

🦎 Rufus 🦎 Rufus is a simple but powerful Denial of Service tool written in Python3. The type of the Dos attack is TCP Flood, the power of the attack

Billy 88 Dec 20, 2022
This is a top level socket library, making servers and clients EASY!

quick-net Sockets don't have to be a pain That's the motto this library was built with, and that's exactly what we made! This is a top-level socket li

Nate the great 15 Dec 17, 2021
Nautobot is a Network Source of Truth and Network Automation Platform.

Nautobot is a Network Source of Truth and Network Automation Platform. Nautobot was initially developed as a fork of NetBox (v2.10.4). Nautobot runs as a web application atop the Django Python framew

Nautobot 549 Dec 31, 2022
A vpn that sits in your browser, accessible via a website

VPNInYourBrowser A vpn that sits in your browser, accessible via a website Example setup: https://VPNInBrowser.jaffa42.repl.co Setup Put the code onto

1 Jan 20, 2022
TunnelProxy 是一个本地隧道代理,可以从fofa爬取免费的socks代理,然后构建代理池,如果一个代理失效,会自动切换

TunnelProxy 是一个本地隧道代理,可以从fofa爬取免费的socks代理,然后构建代理池,如果一个代理失效,会自动切换。 应用场景 渗透测试需要访问某些国内网站(比如edu的),想要隐藏自己,但是国外代理不能访问,也没有稳定的可用代理的时候。 之后,可能我会增加国外代理,实现白嫖科学上网。

urdr-gungnir 45 Nov 17, 2022
A simple electrical network analyzer, BASED ON computer-aided design.

Electrical Network Analyzer A simple electrical network analyzer. Given the oriented graph of the electrical network (circut), BASED ON computer-aided

Ahmad Abdulrahman 4 Oct 15, 2022
Tool to transfer credential files from Firefox to your local machine to decrypt offline.

Firefox-Dumper Firefox Dumper identifies the current user's Firefox profile directory and exfiltrates the credential files to the attacker's FTP serve

Joe Helle 22 Sep 10, 2022
Converts from PC formatted MAC addresses (hardware addresses) to Cisco format or vice-versa

MAC-Converter Converts from PC formatted MAC addresses (hardware addresses) to Cisco format or vice-versa Stores the results to a file in the same dir

Stew Alexander 0 Dec 24, 2022
Quickly fetch your WiFi password and if needed, generate a QR code of your WiFi to allow phones to easily connect

wifi-password Quickly fetch your WiFi password and if needed, generate a QR code of your WiFi to allow phones to easily connect. Works on macOS and Li

Siddharth Dushantha 2.6k Jan 05, 2023
Send files to your friends over network! (100mb max)

PyServed v2.0.1 Made by Shaurya Pratap Singh Installation Using pip(for stable releases.) - $ pip install pyserved Using Git (for latest updates) -

Sblip.dev 4 Mar 22, 2022