Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects, and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
secastles
netscanner
Repository navigation
Code
Issues
Pull requests
Actions
Security and quality
Insights
More
items
Files
Expand file tree
master
Breadcrumbs
netscanner
/
settings_example.py
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
31 lines (27 loc) · 1.39 KB
master
Breadcrumbs
netscanner
/
settings_example.py
Copy path
Top
File metadata and controls
Code
Blame
31 lines (27 loc) · 1.39 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Rename me to settings.py
# Location of the python-nmap module. I needed to add this to the sys.path
# in order to properly run the script with sudo.
# The script must be run with sudo in order for nmap to function correctly.
# However, sudo also needs to carry over the environment variables once the venv is started.
# This works:
# >>> source ./venv/bin/activate
# >>> sudo -E python3 netscanner.py
# This doesn't work:
# >>> sudo python3 netscanner.py
# because it doesn't find the python-nmap module in the sys.path.
# The sys.path modification makes it easier to run with cron (i.e. sudo crontab -e)
NMAP_PATH
=
'venv/lib/python3.7/site-packages/nmap'
# IPs or IP range to scan. See nmap documentation for more details.
NET_ADDR
=
'192.168.1.0/24'
# nmap scan arguments
NMAP_ARGS
=
'-F -sN -PE -PA21,22,23,80,3389'
# Seems to throw errors reading the mac if you don't exclude the scanning device's IP
# Make sure to add the scanning device's IP address which is hopefully static
# Comma separated list of IPs to exclude
EXCLUDE_IPS
=
'<this computer'
's ip address>'
# Path to your nmap installation if you're on Windows (I used this for testing)
WIN_NMAP_PATH
=
'C:
\\
Program Files (x86)
\\
Nmap'
# Notifications configuration; currently only setup for gmail
EMAIL_ADDR
=
"<email address used to send notifications>"
EMAIL_PASS
=
"<gmail app password>"
NOTIFY_EMAIL
=
"<email address that receives notifications>"
You can’t perform that action at this time.