pyExploitDb 0.2.6__py3-none-any.whl → 0.2.16__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
pyExploitDb/__init__.py CHANGED
@@ -22,13 +22,20 @@ class PyExploitDb:
22
22
  def openFile(self, exploitMap = "cveToEdbid.json", encoding="utf-8"):
23
23
  if not os.path.isdir(self.exploitDbPath):
24
24
  print("Cloning exploit-database repository")
25
- git.Repo.clone_from("https://github.com/offensive-security/exploit-database.git", self.exploitDbPath)
25
+ git.Repo.clone_from("https://gitlab.com/exploit-database/exploitdb.git", self.exploitDbPath)
26
26
  print("Updating db...")
27
27
  self.updateDb()
28
28
  else:
29
29
  if self.autoUpdate == True:
30
- print("Pulling exploit-database updates...")
31
- git.Git(self.exploitDbPath).pull('origin', 'master')
30
+ try:
31
+ print("Pulling exploit-database updates...")
32
+ git.Git(self.exploitDbPath).pull('origin', 'main')
33
+ except git.exc.GitCommandError as e:
34
+ print("Broken or obsoleted exploit-database clone found. Deleting and re-cloning...")
35
+ print("Deleting " + self.currentPath + "/exploit-database/...")
36
+ os.system("rm -Rf " + self.currentPath + "/exploit-database/")
37
+ print("Cloning exploit-database repository")
38
+ git.Repo.clone_from("https://gitlab.com/exploit-database/exploitdb.git", self.exploitDbPath)
32
39
  print("Updating db...")
33
40
  self.updateDb()
34
41
  print("Loading database...")
@@ -46,22 +53,36 @@ class PyExploitDb:
46
53
  result = {}
47
54
  found = False
48
55
  for row in reader:
49
- edb, fileName, description, date, author, platform, exploitType, port = tuple(row)
50
- if edb in self.cveToExploitMap[cveSearch]:
56
+ id, file, description, date, author, type, platform, port, _, date_updated, verified, codes, tags, aliases, _, app_url, src_url = tuple(row)
57
+ if id in self.cveToExploitMap[cveSearch]:
51
58
  found = True
52
- result['edbid'] = edb
53
- result['exploit'] = self.exploitDbPath + "/" + fileName
59
+ result['id'] = id
60
+ result['file'] = file
61
+ result['description'] = description
54
62
  result['date'] = date
55
63
  result['author'] = author
64
+ result['type'] = type
56
65
  result['platform'] = platform
57
- result['type'] = exploitType
66
+ result['port'] = port
67
+ result['date_updated'] = date_updated
68
+ result['verified'] = verified
69
+ result['codes'] = codes
70
+ result['tags'] = tags
71
+ result['aliases'] = aliases
72
+ result['app_url'] = app_url
73
+ result['src_url'] = src_url
74
+
58
75
  if self.debug == True:
59
- print("Exploit DB Id: {0}".format(edb))
60
- print("File: {0}".format(self.exploitDbPath + "/" + fileName))
76
+ print("Exploit DB Id: {0}".format(id))
77
+ print("File: {0}".format(self.exploitDbPath + "/" + file))
61
78
  print("Date: {0}".format(date))
62
79
  print("Author: {0}".format(author))
63
80
  print("Platform: {0}".format(platform))
64
- print("Type: {0}".format(exploitType))
81
+ print("Type: {0}".format(type))
82
+ print("Description: {0}".format(description))
83
+ print("App URL: {0}".format(app_url))
84
+ print("Source URL: {0}".format(src_url))
85
+
65
86
  if port != "0":
66
87
  result['port'] = port
67
88
  if self.debug == True:
@@ -79,7 +100,7 @@ class PyExploitDb:
79
100
  cveSearch = cveSearch.upper()
80
101
  print(cveSearch)
81
102
  if cveSearch in self.cveToExploitMap:
82
- if self.debug == True:
103
+ if self.debug == True:
83
104
  print("Found")
84
105
  cveData = self.getCveDetails(cveSearch)
85
106
  if cveData:
@@ -94,7 +115,7 @@ class PyExploitDb:
94
115
  if not os.path.exists(self.edbidToCveFile):
95
116
  os.system("touch {0}".format(self.edbidToCveFile))
96
117
  data = {}
97
- else:
118
+ else:
98
119
  with open(self.edbidToCveFile, encoding="utf-8") as fileData:
99
120
  try:
100
121
  data = json.load(fileData)
@@ -1768,7 +1768,8 @@
1768
1768
  "CVE-2004-2466": [
1769
1769
  "4289",
1770
1770
  "16772",
1771
- "33326"
1771
+ "33326",
1772
+ "50999"
1772
1773
  ],
1773
1774
  "CVE-2007-4441": [
1774
1775
  "4293",
@@ -75464,7 +75465,8 @@
75464
75465
  "CVE-2020-7246": [
75465
75466
  "47954",
75466
75467
  "48146",
75467
- "50175"
75468
+ "50175",
75469
+ "50944"
75468
75470
  ],
75469
75471
  "CVE-2018-10653": [
75470
75472
  "47951"
@@ -76430,7 +76432,8 @@
76430
76432
  "49174"
76431
76433
  ],
76432
76434
  "CVE-2020-25213": [
76433
- "49178"
76435
+ "49178",
76436
+ "51224"
76434
76437
  ],
76435
76438
  "CVE-2020-29477": [
76436
76439
  "49188"
@@ -77016,7 +77019,8 @@
77016
77019
  "50930"
77017
77020
  ],
77018
77021
  "CVE-2021-46422": [
77019
- "50936"
77022
+ "50936",
77023
+ "50948"
77020
77024
  ],
77021
77025
  "CVE-2022-29303": [
77022
77026
  "50940"
@@ -77668,5 +77672,480 @@
77668
77672
  ],
77669
77673
  "CVE-2022-23626": [
77670
77674
  "50943"
77675
+ ],
77676
+ "CVE-2022-30525": [
77677
+ "50946"
77678
+ ],
77679
+ "CVE-2022-29298": [
77680
+ "50950"
77681
+ ],
77682
+ "CVE-2022-1588": [
77683
+ "50945"
77684
+ ],
77685
+ "CVE-2022-1631": [
77686
+ "50947"
77687
+ ],
77688
+ "CVE-2022-23854": [
77689
+ "51028"
77690
+ ],
77691
+ "CVE-2022-32429": [
77692
+ "51027"
77693
+ ],
77694
+ "CVE-2022-37661": [
77695
+ "51031"
77696
+ ],
77697
+ "CVE-2022-30075": [
77698
+ "50962"
77699
+ ],
77700
+ "CVE-2022-29593": [
77701
+ "50984"
77702
+ ],
77703
+ "CVE-2022-29301": [
77704
+ "50968"
77705
+ ],
77706
+ "CVE-2022-29299": [
77707
+ "50967"
77708
+ ],
77709
+ "CVE-2022-1040": [
77710
+ "51006"
77711
+ ],
77712
+ "CVE-2021-4045": [
77713
+ "51017"
77714
+ ],
77715
+ "CVE-2022-34047": [
77716
+ "50991"
77717
+ ],
77718
+ "CVE-2022-34048": [
77719
+ "50989"
77720
+ ],
77721
+ "CVE-2022-34046": [
77722
+ "50990"
77723
+ ],
77724
+ "CVE-2022-26134": [
77725
+ "50952"
77726
+ ],
77727
+ "CVE-2022-36267": [
77728
+ "51011"
77729
+ ],
77730
+ "CVE-2020-20277": [
77731
+ "51000"
77732
+ ],
77733
+ "CVE-2022-36446": [
77734
+ "50998"
77735
+ ],
77736
+ "CVE-2022-35513": [
77737
+ "51014"
77738
+ ],
77739
+ "CVE-2021-23017": [
77740
+ "50973"
77741
+ ],
77742
+ "CVE-2020-2038": [
77743
+ "51005"
77744
+ ],
77745
+ "CVE-2022-23642": [
77746
+ "50964"
77747
+ ],
77748
+ "CVE-2022-36633": [
77749
+ "51019"
77750
+ ],
77751
+ "CVE-2022-29296": [
77752
+ "50955"
77753
+ ],
77754
+ "CVE-2022-2651": [
77755
+ "51013"
77756
+ ],
77757
+ "CVE-2022-30781": [
77758
+ "51009"
77759
+ ],
77760
+ "CVE-2021-36711": [
77761
+ "50979"
77762
+ ],
77763
+ "CVE-2021-42751": [
77764
+ "51004"
77765
+ ],
77766
+ "CVE-2021-42750": [
77767
+ "51003"
77768
+ ],
77769
+ "CVE-2022-31325": [
77770
+ "50965"
77771
+ ],
77772
+ "CVE-2022-31854": [
77773
+ "50978"
77774
+ ],
77775
+ "CVE-2022-34140": [
77776
+ "51018",
77777
+ "51002"
77778
+ ],
77779
+ "CVE-2022-33098": [
77780
+ "50976"
77781
+ ],
77782
+ "CVE-2022-24637": [
77783
+ "51026"
77784
+ ],
77785
+ "CVE-2020-5844": [
77786
+ "50961"
77787
+ ],
77788
+ "CVE-2022-31814": [
77789
+ "51032"
77790
+ ],
77791
+ "CVE-2022-31101": [
77792
+ "51001"
77793
+ ],
77794
+ "CVE-2022-2551": [
77795
+ "50992"
77796
+ ],
77797
+ "CVE-2022-2552": [
77798
+ "50993"
77799
+ ],
77800
+ "CVE-2022-2941": [
77801
+ "51020"
77802
+ ],
77803
+ "CVE-2022-2840": [
77804
+ "51024"
77805
+ ],
77806
+ "CVE-2022-29548": [
77807
+ "50970"
77808
+ ],
77809
+ "CVE-2022-35411": [
77810
+ "50983"
77811
+ ],
77812
+ "CVE-2022-31188": [
77813
+ "51030"
77814
+ ],
77815
+ "CVE-2022-35899": [
77816
+ "50985"
77817
+ ],
77818
+ "CVE-2022-37197": [
77819
+ "51029"
77820
+ ],
77821
+ "CVE-2022-24562": [
77822
+ "50974"
77823
+ ],
77824
+ "CVE-2022-31886": [
77825
+ "50957"
77826
+ ],
77827
+ "CVE-2022-31885": [
77828
+ "50956"
77829
+ ],
77830
+ "CVE-2021-37589": [
77831
+ "50958"
77832
+ ],
77833
+ "CVE-2022-2591": [
77834
+ "51438"
77835
+ ],
77836
+ "CVE-2022-30076": [
77837
+ "51335"
77838
+ ],
77839
+ "CVE-2022-45297": [
77840
+ "51154"
77841
+ ],
77842
+ "CVE-2022-36664": [
77843
+ "51055"
77844
+ ],
77845
+ "CVE-2022-35583": [
77846
+ "51039"
77847
+ ],
77848
+ "CVE-2022-35543": [
77849
+ "51200"
77850
+ ],
77851
+ "CVE-2022-41441": [
77852
+ "51118"
77853
+ ],
77854
+ "CVE-2022-47076": [
77855
+ "51539"
77856
+ ],
77857
+ "CVE-2022-47075": [
77858
+ "51539"
77859
+ ],
77860
+ "CVE-2022-40319": [
77861
+ "51149"
77862
+ ],
77863
+ "CVE-2022-39195": [
77864
+ "51148"
77865
+ ],
77866
+ "CVE-2020-11798": [
77867
+ "51308"
77868
+ ],
77869
+ "CVE-2023-26692": [
77870
+ "51347"
77871
+ ],
77872
+ "CVE-2024-24747": [
77873
+ "51976"
77874
+ ],
77875
+ "CVE-2023-0744": [
77876
+ "51257"
77877
+ ],
77878
+ "CVE-2023-34927": [
77879
+ "51961"
77880
+ ],
77881
+ "CVE-2024-27620": [
77882
+ "51869"
77883
+ ],
77884
+ "CVE-2022-35919": [
77885
+ "51734"
77886
+ ],
77887
+ "CVE-2023-32751": [
77888
+ "51497"
77889
+ ],
77890
+ "CVE-2023-32750": [
77891
+ "51498"
77892
+ ],
77893
+ "CVE-2023-32749": [
77894
+ "51496"
77895
+ ],
77896
+ "CVE-2022-40946": [
77897
+ "51053"
77898
+ ],
77899
+ "CVE-2022-41333": [
77900
+ "51326"
77901
+ ],
77902
+ "CVE-2023-24709": [
77903
+ "51356"
77904
+ ],
77905
+ "CVE-2022-46770": [
77906
+ "51157"
77907
+ ],
77908
+ "CVE-2023-36355": [
77909
+ "51561"
77910
+ ],
77911
+ "CVE-2023-30350": [
77912
+ "51414"
77913
+ ],
77914
+ "CVE-2023-26609": [
77915
+ "51294"
77916
+ ],
77917
+ "CVE-2022-45701": [
77918
+ "51269"
77919
+ ],
77920
+ "CVE-2022-46552": [
77921
+ "51243"
77922
+ ],
77923
+ "CVE-2020-5330": [
77924
+ "51248"
77925
+ ],
77926
+ "CVE-2019-15993": [
77927
+ "51248"
77928
+ ],
77929
+ "CVE-2023-0830": [
77930
+ "51266"
77931
+ ],
77932
+ "CVE-2024-27356": [
77933
+ "51942"
77934
+ ],
77935
+ "CVE-2022-28171": [
77936
+ "51607"
77937
+ ],
77938
+ "CVE-2023-6538": [
77939
+ "51915"
77940
+ ],
77941
+ "CVE-2023-3710": [
77942
+ "51885"
77943
+ ],
77944
+ "CVE-2022-44149": [
77945
+ "51195"
77946
+ ],
77947
+ "CVE-2023-25187": [
77948
+ "51535"
77949
+ ],
77950
+ "CVE-2023-27823": [
77951
+ "51444"
77952
+ ],
77953
+ "CVE-2023-27100": [
77954
+ "51352"
77955
+ ],
77956
+ "CVE-2023-48974": [
77957
+ "51963"
77958
+ ],
77959
+ "CVE-2023-29849": [
77960
+ "51378"
77961
+ ],
77962
+ "CVE-2023-29848": [
77963
+ "51377"
77964
+ ],
77965
+ "CVE-2023-0943": [
77966
+ "51280"
77967
+ ],
77968
+ "CVE-2023-46022": [
77969
+ "51912"
77970
+ ],
77971
+ "CVE-2023-31698": [
77972
+ "51476"
77973
+ ],
77974
+ "CVE-2023-38836": [
77975
+ "51741"
77976
+ ],
77977
+ "CVE-2022-3552": [
77978
+ "51108"
77979
+ ],
77980
+ "CVE-2023-36163": [
77981
+ "51581"
77982
+ ],
77983
+ "CVE-2022-35155": [
77984
+ "51054"
77985
+ ],
77986
+ "CVE-2023-39362": [
77987
+ "51740"
77988
+ ],
77989
+ "CVE-2022-46169": [
77990
+ "51166"
77991
+ ],
77992
+ "CVE-2022-2846": [
77993
+ "51241"
77994
+ ],
77995
+ "CVE-2023-39115": [
77996
+ "51656"
77997
+ ],
77998
+ "CVE-2023-31714": [
77999
+ "51383"
78000
+ ],
78001
+ "CVE-2023-24787": [
78002
+ "51319"
78003
+ ],
78004
+ "CVE-2023-31699": [
78005
+ "51477"
78006
+ ],
78007
+ "CVE-2023-25440": [
78008
+ "51478"
78009
+ ],
78010
+ "CVE-2022-48110": [
78011
+ "51260"
78012
+ ],
78013
+ "CVE-2023-4708": [
78014
+ "51729"
78015
+ ],
78016
+ "CVE-2023-7137": [
78017
+ "51880"
78018
+ ],
78019
+ "CVE-2023-29809": [
78020
+ "51422"
78021
+ ],
78022
+ "CVE-2023-3244": [
78023
+ "51809"
78024
+ ],
78025
+ "CVE-2023-3244)": [
78026
+ "51809"
78027
+ ],
78028
+ "CVE-2023-29983": [
78029
+ "51417"
78030
+ ],
78031
+ "CVE-2021-46360": [
78032
+ "51060"
78033
+ ],
78034
+ "CVE-2022-44877": [
78035
+ "51250"
78036
+ ],
78037
+ "CVE-2023-4407": [
78038
+ "51701"
78039
+ ],
78040
+ "CVE-2023-37759": [
78041
+ "51688"
78042
+ ],
78043
+ "CVE-2024-24496": [
78044
+ "51954"
78045
+ ],
78046
+ "CVE-2024-24495": [
78047
+ "51953"
78048
+ ],
78049
+ "CVE-2024-24494": [
78050
+ "51952"
78051
+ ],
78052
+ "CVE-2024-25832": [
78053
+ "51868"
78054
+ ],
78055
+ "CVE-2024-25830": [
78056
+ "51868"
78057
+ ],
78058
+ "CVE-2022-24632": [
78059
+ "51145"
78060
+ ],
78061
+ "CVE-2022-24630": [
78062
+ "51145"
78063
+ ],
78064
+ "CVE-2022-24629": [
78065
+ "51145"
78066
+ ],
78067
+ "CVE-2022-24627": [
78068
+ "51145"
78069
+ ],
78070
+ "CVE-2022-28368": [
78071
+ "51270"
78072
+ ],
78073
+ "CVE-2023-37569": [
78074
+ "51673"
78075
+ ],
78076
+ "CVE-2022-3141": [
78077
+ "51043"
78078
+ ],
78079
+ "CVE-2023-30868": [
78080
+ "51507"
78081
+ ],
78082
+ "CVE-2023-0455": [
78083
+ "51492"
78084
+ ],
78085
+ "CVE-2023-39147": [
78086
+ "51639"
78087
+ ],
78088
+ "CVE-2023-39796": [
78089
+ "51985"
78090
+ ],
78091
+ "CVE-2023-30256": [
78092
+ "51465"
78093
+ ],
78094
+ "CVE-2023-34635": [
78095
+ "51610"
78096
+ ],
78097
+ "CVE-2023-37269": [
78098
+ "51591"
78099
+ ],
78100
+ "CVE-2022-4395": [
78101
+ "51959"
78102
+ ],
78103
+ "CVE-2023-2636": [
78104
+ "51632"
78105
+ ],
78106
+ "CVE-2023-3452)": [
78107
+ "51826"
78108
+ ],
78109
+ "CVE-2022-4953": [
78110
+ "51716"
78111
+ ],
78112
+ "CVE-2023-2796": [
78113
+ "51658"
78114
+ ],
78115
+ "CVE-2023-3219": [
78116
+ "51659"
78117
+ ],
78118
+ "CVE-2023-4278": [
78119
+ "51735"
78120
+ ],
78121
+ "CVE-2023-37979": [
78122
+ "51644"
78123
+ ],
78124
+ "CVE-2020-11027": [
78125
+ "51531"
78126
+ ],
78127
+ "CVE-2021-24499": [
78128
+ "51510"
78129
+ ],
78130
+ "CVE-2022-1565": [
78131
+ "51122"
78132
+ ],
78133
+ "CVE-2022-4297": [
78134
+ "51560"
78135
+ ],
78136
+ "CVE-2022-25148": [
78137
+ "51711"
78138
+ ],
78139
+ "CVE-2023-3320": [
78140
+ "51533"
78141
+ ],
78142
+ "CVE-2022-48177": [
78143
+ "51346"
78144
+ ],
78145
+ "CVE-2022-48178": [
78146
+ "51345"
78147
+ ],
78148
+ "CVE-2022-48197": [
78149
+ "51198"
77671
78150
  ]
77672
78151
  }