Created
April 20, 2020 12:11
-
-
Save aeharvlee/0196a2d529fe382bdb9c6eeb5c8ebe1d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 각 공격목적에 해당하는 리스트를 생성합니다. | |
vulnerability_scan_vector = list() | |
falsifying_websites_vector = list() | |
# ... | |
# 위에서 생성한 공격 목적별 리스트에 다음과 같이 값을 삽입해줍니다. | |
# 공격 목적이 없는것에 대해서는 0을 추가해준다. | |
for idx in range(len(ipv4_list)): | |
ipv4 = ipv4_list[idx] | |
for attack_purpose, detected_cnt in grp_attack_purpose[ipv4].items(): | |
if attack_purpose == 'Vulnerability Scan': | |
vulnerability_scan_vector.append(int(detected_cnt)) | |
if len(vulnerability_scan_vector) <= idx: | |
vulnerability_scan_vector.append(0) | |
if attack_purpose == 'Falsifying Websites': | |
falsifying_websites_vector.append(int(detected_cnt)) | |
if len(falsifying_websites_vector) <= idx: | |
falsifying_websites_vector.append(0) | |
# ... | |
# 완성된 리스트들을 각각 데이터프레임에 삽입해줍니다. | |
stat_pd['vulnerability_scan'] = vulnerability_scan_vector | |
stat_pd['falsifying_websites'] = falsifying_websites_vector | |
# ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment