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
Script and library to wait for a DNS authority server to get its configuration.

DNSWait dnswait is a small script to wait for the "propagation" of a namserver configuration. Installing It's as easy as: python -m pip install dnswai

Julien Palard 14 Jan 17, 2022
Bittensor - an open, decentralized, peer-to-peer network that functions as a market system for the development of artificial intelligence

At Bittensor, we are creating an open, decentralized, peer-to-peer network that functions as a market system for the development of artificial intelligence.

Opentensor 169 Dec 30, 2022
(A)sync client for sms.ru with pydantic responses

🚧 aioSMSru Send SMS Check SMS status Get SMS cost Get balance Get limit Get free limit Get my senders Check login/password Add to stoplist Remove fro

Eugene Mayer 4 Jul 03, 2022
Exfiltrate files using the HTTP protocol version ("HTTP/1.0" is a 0 and "HTTP/1.1" is a 1)

http-protocol-exfil Use the HTTP protocol version to send a file bit by bit ("HTTP/1.0" is a 0 and "HTTP/1.1" is a 1). It uses GET requests so the Blu

Ricardo Ruiz 23 Apr 30, 2022
wireguard-config-benchmark is a python script that benchmarks the download speeds for the connections defined in one or more wireguard config files

wireguard-config-benchmark is a python script that benchmarks the download speeds for the connections defined in one or more wireguard config files. If multiple configs are benchmarked it will output

Sal 12 May 07, 2022
MoreIP 一款基于Python的面向 MacOS/Linux 用户用于查询IP/域名信息的日常渗透小工具

MoreIP 一款基于Python的面向 MacOS/Linux 用户用于查询IP/域名信息的日常渗透小工具

xq17 9 Sep 21, 2022
pfSense integration with Home Assistant

hass-pfsense Join pfSense with home-assistant! hass-pfsense uses the built-in xmlrpc service of pfSense for all interactions. No special plugins or so

Travis Glenn Hansen 105 Dec 24, 2022
Some files casually made by @AneekBiswas

Python-Tools All Pyhthon Files are created and managed by @AneekBiswas Modules needed to be downloaded 1.CLI bagels.py random guess.py random text-tow

1 Feb 23, 2022
Remote vanilla PDB (over TCP sockets) done right: no extras, proper handling around connection failures and CI.

Overview docs tests package Remote vanilla PDB (over TCP sockets) done right: no extras, proper handling around connection failures and CI. Based on p

Ionel Cristian Mărieș 227 Dec 27, 2022
Connects to databases or sftp server based on configured environmental variables.

Myconnections Connects to Oracle databases or sftp servers depending on configured environmental variables. VERY IMPORTANT: VPN must exist. Installati

0 Jan 02, 2022
Huawei firewall automatically updates Chinese ip to target IP group.

Huawei firewall automatically updates Chinese ip to target IP group.

Lundaa 0 Jan 11, 2022
A pretty quick and simple interface to paramiko SFTP

A pretty quick and simple interface to paramiko SFTP. Provides multi-threaded routines with progress notifications for reliable, asynchronous transfers. This is a Python3 optimized fork of pysftp wit

14 Dec 21, 2022
AV Evasion, a Red Team Tool - Fiber, APC, PNG and UUID

AV Evasion, a Red Team Tool - Fiber, APC, PNG and UUID

9 Mar 07, 2022
A transport agnostic sync/async RPC library that focuses on exposing services with a well-defined API using popular protocols.

WARNING: This is from spyne's development branch. This version is not released yet! Latest stable release can be found in the 2_13 branch. If you like

1.1k Dec 23, 2022
Desktop application for checking sites connection in a background mode

Site connectivity checker Desktop application for checking site connection in a background mode by sending ICMP messages. Problem and solution Usually

Karina Singatullina 26 Dec 19, 2022
Home Assistant integration for MyEnergi devices

myenergi for Home Assistant myenergi custom component for Home Assistant This is a very early release, will add more documentations soon! This compone

Johan Isacsson 70 Dec 18, 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 the code repository for the USENIX Security 2021 paper, "Weaponizing Middleboxes for TCP Reflected Amplification".

weaponizing-censors Censors pose a threat to the entire Internet. In this work, we show that censoring middleboxes and firewalls can be weaponized by

UMD Breakerspace 119 Dec 31, 2022
A Python Tor template on Gitpod

A Python Tor template on Gitpod This is template configured for ephemeral development environments on Gitpod. prebuild Get Started With Your Own Proje

Ivan Yastrebov 1 Dec 17, 2021
Base on browser-time to get har from network, and use python to analyze the data .

base on browser-time to get har from network, and use python to analyze the data

1 Dec 20, 2021