(text:str)
| 31 | |
| 32 | |
| 33 | def select_web_info(text:str) ->str: |
| 34 | web_list = re.findall( |
| 35 | r'WebTitle:?\s*(http.*?)\s+code:(\d+)\s+len:(.*?)\s+title:(.*?)\n', text+'\n' |
| 36 | ) |
| 37 | |
| 38 | if web_list == []: |
| 39 | return 'Web Code|Title 等信息为空' |
| 40 | |
| 41 | finger_list = re.findall(r'InfoScan:?\s*(http.*?)\s+\[(.*?)]', text) |
| 42 | |
| 43 | webinfo = [] |
| 44 | for line in web_list: |
| 45 | finger = 'Null' |
| 46 | for x in finger_list: |
| 47 | if line[0] == x[0]: |
| 48 | finger = x[1] |
| 49 | break |
| 50 | |
| 51 | webinfo.append( |
| 52 | '[{code}] {url} [{length}] [{title}] [Finger: {finger}]'.format( |
| 53 | url=line[0],code=line[1],length=line[2],title=line[3],finger=finger) |
| 54 | ) |
| 55 | |
| 56 | webinfo = '\n'.join(sorted(webinfo)).replace(' 跳转url: ','] [Redirect-> ') |
| 57 | return header + webinfo |
| 58 | |
| 59 | |
| 60 | def select_ip_exp(text:str) -> str: |
no outgoing calls
no test coverage detected