Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MITIK-MGMT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Wireless Passive Measurements
Collection management
MITIK-MGMT
Commits
92eb3ba5
Commit
92eb3ba5
authored
6 months ago
by
autodistries
Browse files
Options
Downloads
Patches
Plain Diff
run multiple sniffer.py at once on a single node device
parent
93f44ce6
No related branches found
No related tags found
1 merge request
!1
Refactoring, new features
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ansible/tasks/playbook_scapy-sniffer_GPS.yml
+23
-14
23 additions, 14 deletions
ansible/tasks/playbook_scapy-sniffer_GPS.yml
config/test.yml
+67
-3
67 additions, 3 deletions
config/test.yml
with
90 additions
and
17 deletions
ansible/tasks/playbook_scapy-sniffer_GPS.yml
+
23
−
14
View file @
92eb3ba5
-
hosts
:
sniffers
user
:
gta
#become: yes
#become_user: root
vars_prompt
:
# - name: _file
# prompt: Enter the folder name to save traces in the sniffer
# private: no
-
name
:
_workdir
prompt
:
Enter the folder name to save traces in the sniffer
default
:
"
/home/tribe/mitik-sens-mod/"
private
:
no
# This will always be the mitik-sens-mod folder
# - name: _location
...
...
@@ -57,19 +57,28 @@
-
set_fact
:
_interfaces
:
"
{{
_interfaces_csv.split(',')
}}"
_channels
:
"
{{
_channels_csv.split(',')
}}"
delegate_to
:
127.0.0.1
run_once
:
True
-
name
:
Create Folder
file
:
path
:
"
{{
_file
}}"
owner
:
gta
group
:
gta
#mode: 0755
state
:
directory
-
name
:
Double-check input variables
assert
:
that
:
"
{{
_interfaces|length
}}
==
_channels"
delegate_to
:
127.0.0.1
run_once
:
True
-
name
:
start scapy-sniffer
# - name: Create Folder
# file:
# path: "{{ _workdir }}"
# owner: tribe
# group: tribe
# #mode: 0755
# state: directory
-
name
:
start scapy-sniffer
cron
:
name
:
"
ansible_scapy-sniffer
{{
_hour
}}
{{
_minute
}}
{{
_channel
}}"
name
:
"
ansible_scapy-sniffer
{{
_hour
}}
{{
_minute
}}
{{
item
}}"
minute
:
"
{{
_minute
}}"
hour
:
"
{{
_hour
}}"
job
:
"
sudo
python3
/home/gta/sniffers/scapy-sniffer/sniffer_GPS.py
-F
{{
_file
}}
-L
{{
_location
}}
-i
{{
_interface
}}
-c
{{
_channel
}}
-f
{{
_filter
}}
-e
{{
_hash_function}}
-p
{{
_hash_pattern
}}
-t
{{
_timeout
}}"
job
:
"
cd
{{_workdir}};
sudo
python
./sniffer.py
-s
{{_timeout}}
-i
{{item}}
-c
{{}}
-sf
{{_filter}}
-p
{{_hash_pattern}}
-e
{{_hash_function}}"
loop
:
"
{{_interfaces}}"
This diff is collapsed.
Click to expand it.
config/test.yml
+
67
−
3
View file @
92eb3ba5
# /etc/ansible/broadcast.yml
---
-
name
:
Echoed stuff
hosts
:
all
hosts
:
ss1
vars_prompt
:
# - name: _file
# prompt: Enter the folder name to save traces in the sniffer
# private: no
# This will always be the mitik-sens-mod folder
# - name: _location
# prompt: Enter the location of the experiments
# private: no
# I don't know what this parameter is (was) for
# - name: _hour
# prompt: Enter an hour to start the experiment
# default: 17
# private: no
#
# - name: _minute
# prompt: Enter minutes to start the experiment
# private: no
-
name
:
_interfaces_csv
prompt
:
Please specify the interface(s) separated by commas (e.g. wlan0,wlan7). For default just press enter
default
:
'
wlan5,wlan6'
private
:
no
-
name
:
_channels_csv
prompt
:
Please specify the starting channels (integer between 1-11 separated by commas, default=system). For default just press enter
default
:
"
1,8"
private
:
no
tasks
:
-
name
:
say things to tty1
ansible.builtin.shell
:
"
cd
~;eval
$(ssh-agent
-s);
ssh-add
.ssh/gitlab_rsa
;
git
clone
git@gitlab.inria.fr:gfarhiri/mitik-sens-mod.git"
-
set_fact
:
_interfaces
:
"
{{
_interfaces_csv.split(',')
}}"
_channels
:
"
{{
_channels_csv.split(',')
}}"
delegate_to
:
127.0.0.1
run_once
:
True
-
name
:
Double-check input variables
assert
:
that
:
"
{{
_interfaces|length
}}
==
{{
_channels|length
}}"
delegate_to
:
127.0.0.1
run_once
:
True
-
debug
:
msg
:
"
{{
item
}}"
loop
:
"
{{_interfaces}}"
delegate_to
:
127.0.0.1
run_once
:
True
-
debug
:
msg
:
"
{{
item
}}"
loop
:
"
{{_channels}}"
delegate_to
:
127.0.0.1
run_once
:
True
-
shell
:
"
echo
{{
item
}}
{{_channels[lp_idx]}}
!!
|
sudo
tee
/dev/tty1
"
loop
:
"
{{_interfaces}}"
loop_control
:
index_var
:
lp_idx
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment