mirror of
https://github.com/seriousm4x/UpSnap.git
synced 2026-07-23 22:13:53 -04:00
add option for custom nmap args #28
This commit is contained in:
@@ -225,7 +225,8 @@ class WSConsumer(AsyncWebsocketConsumer):
|
||||
day_of_week=dow,
|
||||
day_of_month=dom,
|
||||
month_of_year=month,
|
||||
timezone = pytz.timezone(os.getenv("DJANGO_TIME_ZONE", "UTC"))
|
||||
timezone=pytz.timezone(
|
||||
os.getenv("DJANGO_TIME_ZONE", "UTC"))
|
||||
)
|
||||
PeriodicTask.objects.update_or_create(
|
||||
name=f"{data['name']}-{action}",
|
||||
@@ -297,7 +298,7 @@ class WSConsumer(AsyncWebsocketConsumer):
|
||||
return
|
||||
|
||||
p = subprocess.Popen(
|
||||
["nmap", "-sP", conf.scan_address], stdout=subprocess.PIPE)
|
||||
["nmap", os.getenv("NMAP_ARGS", "-sP"), conf.scan_address], stdout=subprocess.PIPE)
|
||||
out = p.communicate()[0].decode("utf-8")
|
||||
ip_line = "Nmap scan report for"
|
||||
mac_line = "MAC Address:"
|
||||
|
||||
@@ -24,6 +24,7 @@ services:
|
||||
#- DJANGO_DEBUG=True # optional (default: False)
|
||||
#- DJANGO_LANGUAGE_CODE=de # optional (default: en)
|
||||
#- DJANGO_TIME_ZONE=Europe/Berlin # optional (default: UTC)
|
||||
#- NMAP_ARGS=-sP # optional, set this if your devices need special nmap args so they can be found (default: -sP)
|
||||
depends_on:
|
||||
redis:
|
||||
condition: service_healthy
|
||||
|
||||
@@ -24,6 +24,7 @@ services:
|
||||
#- DJANGO_DEBUG=True # optional (default: False)
|
||||
#- DJANGO_LANGUAGE_CODE=de # optional (default: en)
|
||||
#- DJANGO_TIME_ZONE=Europe/Berlin # optional (default: UTC)
|
||||
#- NMAP_ARGS=-sP # optional, set this if your devices need special nmap args so they can be found (default: -sP)
|
||||
depends_on:
|
||||
redis:
|
||||
condition: service_healthy
|
||||
|
||||
@@ -19,6 +19,7 @@ services:
|
||||
#- DJANGO_DEBUG=True # optional (default: False)
|
||||
#- DJANGO_LANGUAGE_CODE=de # optional (default: en)
|
||||
#- DJANGO_TIME_ZONE=Europe/Berlin # optional (default: UTC)
|
||||
#- NMAP_ARGS=-sP # optional, set this if your devices need special nmap args so they can be found (default: -sP)
|
||||
volumes:
|
||||
- ./db/:/app/backend/db/
|
||||
depends_on:
|
||||
|
||||
Reference in New Issue
Block a user