[pangp] Add Palo Alto Networks GlobalProtect App

This commit is contained in:
Nemo
2022-05-30 14:44:14 +05:30
parent 0ef90cd369
commit fc39472416
5 changed files with 38 additions and 3 deletions

View File

@@ -43,9 +43,10 @@ jobs:
run: |
git config --global init.defaultBranch main
git config --global extensions.partialClone true
pip install -r requirements.txt
python src/unrealircd.py
python src/haproxy.py
for i in src/*.py; do python $i;done
bundle exec ruby update.rb ./website ~/.cache releases
id: update_releases
- uses: stefanzweifel/git-auto-commit-action@v4

10
releases/pangp.json Normal file
View File

@@ -0,0 +1,10 @@
{
"3.0": "2016-02-16",
"3.1": "2016-06-23",
"4.0": "2017-01-30",
"4.1": "2018-03-01",
"5.0": "2019-02-12",
"5.1": "2019-12-12",
"5.2": "2020-07-30",
"5.3": "2021-06-01"
}

View File

@@ -1 +1,6 @@
beautifulsoup4==4.11.1
html5lib==1.1
mwparserfromhell==0.6.4
six==1.16.0
soupsieve==2.3.2.post1
webencodings==0.5.1

View File

@@ -9,7 +9,6 @@ list = {}
for i in range(17, 27):
url = "https://www.haproxy.org/download/%s/src/CHANGELOG" % (i/10)
print(url)
with urllib.request.urlopen(url) as response:
for line in response:
m = re.match(REGEX, line.decode('utf-8'))

20
src/pangp.py Normal file
View File

@@ -0,0 +1,20 @@
import json
import urllib.request
from bs4 import BeautifulSoup
from html.parser import HTMLParser
URL = "https://www.paloaltonetworks.com/services/support/end-of-life-announcements/end-of-life-summary"
list = {}
with urllib.request.urlopen(URL, data=None, timeout=5) as response:
soup = BeautifulSoup(response, features="html5lib")
table = soup.find(id='globalprotect')
for tr in table.findAll('tr')[3:]:
td_list = tr.findAll('td')
version = td_list[0].get_text()
month,date,year = td_list[1].get_text().split('/')
abs_date = f"{year}-{month:0>2}-{date:0>2}"
list[version] = abs_date
with open('releases/pangp.json', 'w') as f:
f.write(json.dumps(list, indent=2))