MCPcopy
hub / github.com/Xyntax/POC-T / get_domain

Function get_domain

plugin/urlparser.py:9–20  ·  view source on GitHub ↗

added by cdxy May 8 Sun,2016 Use: get_domain('http://cdxy.me:80/cdsa/cda/aaa.jsp?id=2#') Return: 'http://cdxy.me:80'

(url)

Source from the content-addressed store, hash-verified

7
8
9def get_domain(url):
10 """
11 added by cdxy May 8 Sun,2016
12
13 Use:
14 get_domain('http://cdxy.me:80/cdsa/cda/aaa.jsp?id=2#')
15
16 Return:
17 'http://cdxy.me:80'
18 """
19 p = urlparse.urlparse(url)
20 return urlparse.urlunsplit([p.scheme, p.netloc, '', '', ''])
21
22
23def iterate_path(ori_str):

Callers 9

checkCDNFunction · 0.90
pocFunction · 0.90
pocFunction · 0.90
pocFunction · 0.90
pocFunction · 0.90
pocFunction · 0.90
pocFunction · 0.90
iterate_pathFunction · 0.85
urlparser.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected