Тёмный

Save time by developing a Python script to read and modify IP addresses 

CyberMe
Подписаться 829
Просмотров 205
50% 1

Do you have enough time in the day for manual data entry? I certainly do not. In fact I never have enough time, so I write a script for nearly every task performed in and out of the work place.
Today we cover a Python script I developed in order to save me hours of my day manually writing IP addresses based on ranges provided from a system administrator. This file contained hundreds of lines and in each of those lines were ranges of private IP's. That is great and all but I needed each individual IP for the task I was looking to accomplish. So, instead of reading each range and writing each one down, I created this script.
This script will look in each line. If the line contains a range using a - between two IP addresses, the script will find the prefix and the required range. It will then assign each individual IP in that range to the prefix. If it finds a / in the line, specifying a subnet, it will use built in functions to accomplish the same thing.
The script is not perfect, but that is the point. It is not a program, it is a script. A script I may only use a few times. This script took under an hour to write and already saved me hours of work reading in multiple files.
Have you started learning Python? If not, I suggest you do. Regardless of what part of the industry you are tied to. Weather that be penetration testing or system administration, Python can save you time. A lot of the guys and girls who have been in the industry a long time opt out, but I urge you to opt in. Take the time to learn the language and spend that time elsewhere learning other things.
github : github.com/CyberMe-Jack/Youtu...
I hope you enjoyed this video, do not forget to drop a like and subscribe for more.
As always, Never Stop Learning!

Хобби

Опубликовано:

 

8 авг 2023

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии    
Далее
5 Good Python Habits
17:35
Просмотров 414 тыс.
BASH scripting will change your life
14:18
Просмотров 1 млн
A Deep Dive Into Date And Time In Python
19:39
Просмотров 41 тыс.
All 39 Python Keywords Explained
34:08
Просмотров 127 тыс.
How I Would Learn Python FAST in 2023 (from zero)
7:08
Python's 5 Worst Features
19:44
Просмотров 103 тыс.
Прошёл босиком 3600 метров
0:59
Просмотров 2,8 млн
Будни в пекарне. Часть 1
0:59
Просмотров 4,4 млн