Skip to content

Commit e1c2153

Browse files
authored
Merge pull request #16 from thc202/add-importurls
Add importurls API
2 parents d5e83fe + 0bb830c commit e1c2153

File tree

3 files changed

+39
-3
lines changed

3 files changed

+39
-3
lines changed

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525
)
2626
setup(
2727
name="python-owasp-zap-v2.4",
28-
version="0.0.10",
28+
version="0.0.11",
2929
description="OWASP ZAP 2.6 API client",
3030
long_description="OWASP Zed Attack Proxy 2.6 API python client (the 2.4 package name has been kept to make it easier to upgrade)",
3131
author="ZAP development team",
3232
author_email='',
3333
url="https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project",
34-
download_url="https://github.com/zaproxy/zap-api-python/releases/tag/0.0.10",
34+
download_url="https://github.com/zaproxy/zap-api-python/releases/tag/0.0.11",
3535
platforms=['any'],
3636
license="ASL2.0",
3737
package_dir={

src/zapv2/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"""
2121

2222
__docformat__ = 'restructuredtext'
23-
__version__ = '0.0.10'
23+
__version__ = '0.0.11'
2424

2525
import requests
2626
from requests.packages.urllib3.exceptions import InsecureRequestWarning
@@ -37,6 +37,7 @@
3737
from .forcedUser import forcedUser
3838
from .httpSessions import httpSessions
3939
from .importLogFiles import importLogFiles
40+
from .importurls import importurls
4041
from .params import params
4142
from .pnh import pnh
4243
from .pscan import pscan
@@ -85,6 +86,7 @@ def __init__(self, proxies=None, apikey=None):
8586
self.forcedUser = forcedUser(self)
8687
self.httpsessions = httpSessions(self)
8788
self.importLogFiles = importLogFiles(self)
89+
self.importurls = importurls(self)
8890
self.params = params(self)
8991
self.pnh = pnh(self)
9092
self.pscan = pscan(self)

src/zapv2/importurls.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Zed Attack Proxy (ZAP) and its related class files.
2+
#
3+
# ZAP is an HTTP/HTTPS proxy for assessing web application security.
4+
#
5+
# Copyright 2016 the ZAP development team
6+
#
7+
# Licensed under the Apache License, Version 2.0 (the "License");
8+
# you may not use this file except in compliance with the License.
9+
# You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
"""
19+
This file was automatically generated.
20+
"""
21+
22+
import six
23+
24+
25+
class importurls(object):
26+
27+
def __init__(self, zap):
28+
self.zap = zap
29+
30+
def importurls(self, filepath, apikey=''):
31+
"""
32+
This component is optional and therefore the API will only work if it is installed
33+
"""
34+
return six.next(six.itervalues(self.zap._request(self.zap.base + 'importurls/action/importurls/', {'filePath': filepath, 'apikey': apikey})))

0 commit comments

Comments
 (0)