test
This commit is contained in:
11
scan.yml
11
scan.yml
@@ -20,7 +20,7 @@
|
|||||||
# 163.172.0.0/24
|
# 163.172.0.0/24
|
||||||
# 163.172.80.0/28
|
# 163.172.80.0/28
|
||||||
target_network: 163.172.91.0/24
|
target_network: 163.172.91.0/24
|
||||||
target_port: "443"
|
target_port: 443
|
||||||
# 163.172.0.0/20
|
# 163.172.0.0/20
|
||||||
# 163.172.16.0/20
|
# 163.172.16.0/20
|
||||||
# 163.172.31.0/20
|
# 163.172.31.0/20
|
||||||
@@ -64,6 +64,7 @@
|
|||||||
cmd: "masscan {{ target_network }} -p{{ target_port }}"
|
cmd: "masscan {{ target_network }} -p{{ target_port }}"
|
||||||
become: true
|
become: true
|
||||||
register: scan_output
|
register: scan_output
|
||||||
|
# when: target_port is not list
|
||||||
# pause
|
# pause
|
||||||
|
|
||||||
- debug:
|
- debug:
|
||||||
@@ -117,9 +118,13 @@
|
|||||||
insertbefore: BOF
|
insertbefore: BOF
|
||||||
create: yes
|
create: yes
|
||||||
loop: "{{ cert.results }}"
|
loop: "{{ cert.results }}"
|
||||||
|
loop_control:
|
||||||
|
index_var: my_idx
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
run_once: true
|
#run_once: true
|
||||||
when: item.invocation is defined
|
when:
|
||||||
|
- item.invocation is defined
|
||||||
|
- cert.results[my_idx].invocation.module_args.host.split('.')[2] != cert.results[my_idx+1].invocation.module_args.host.split('.')[2]
|
||||||
|
|
||||||
- ansible.builtin.lineinfile:
|
- ansible.builtin.lineinfile:
|
||||||
path: "{{ playbook_dir }}/scan/https/{{ item.invocation.module_args.host.split('.')[0] }}/{{ item.invocation.module_args.host.split('.')[1] }}/{{ item.invocation.module_args.host.split('.')[2] }}.csv"
|
path: "{{ playbook_dir }}/scan/https/{{ item.invocation.module_args.host.split('.')[0] }}/{{ item.invocation.module_args.host.split('.')[1] }}/{{ item.invocation.module_args.host.split('.')[2] }}.csv"
|
||||||
|
|||||||
Reference in New Issue
Block a user