Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "List devices",
"script_path": "./scripts/network/list_devices.py",
"description": "List the devices connected to the network we also are connected (you choose the network interface)",
"group": "\ud83d\udcf6Wifi Management",
"allowed_users": [
"rudloff"
],
"parameters": [
{
"name": "interface",
"type": "list",
"required": true,
"param": "INTERFACE",
"env_var": "INTERFACE",
"description": "List of network interfaces to scan",
"values": { "script": "ls /sys/class/net | egrep -v '^br|^veth|^lo|^docker|^tun'", "shell": true }
}
]
}
4 changes: 4 additions & 0 deletions servers/script-server/scripts/network/list_devices.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

INTERFACE_IP=$(/sbin/ifconfig $INTERFACE | egrep -o '([0-9]+[.]){3}[0-9]+' | head -n 1)
nmap -sn $INTERFACE_IP/24