Skip to content

Commit

Permalink
再次修改banner获取
Browse files Browse the repository at this point in the history
  • Loading branch information
Jing Ling committed Mar 1, 2020
1 parent 71e5c89 commit 6f3cdb6
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions oneforall/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,15 @@ def get_filtered_data(data):


def get_sample_banner(headers):
server = headers.get('Server') or ''
via = headers.get('Via') or ''
power = headers.get('X-Powered-By') or ''
banner = server + via + power
temp_list = []
server = headers.get('Server')
if server:
temp_list.append(server)
via = headers.get('Via')
if via:
temp_list.append(via)
power = headers.get('X-Powered-By')
if power:
temp_list.append(power)
banner = ','.join(temp_list)
return banner

0 comments on commit 6f3cdb6

Please sign in to comment.