Skip to main content

A simple networking and port scanning module.

Project description

LunarScan - Networking Tools Made Simple

LunarScan is a Python module designed to simplify network scanning and IP geolocation tasks. With a few lines of code, you can scan for open ports, resolve IP addresses, and retrieve geolocation information about a target.

Installation

To use LunarScan, simply import the module in your Python project:

import lunarscan

Alternatively, import specific functions:

from lunarscan import scan, geoscan, get_ip

Functions

scan(target, start_port, end_port)

Scans a target IP or hostname for open ports within a specified range.

Arguments:

  • target (str): The IP address or hostname of the target.
  • start_port (int): The starting port number.
  • end_port (int): The ending port number.

Returns:

  • list[int]: A list of open ports.

Example:

open_ports = lunarscan.scan("192.168.1.1", 20, 100)
print(open_ports)

geoscan(target)

Retrieves geolocation information for a given target IP. Prints details such as the continent, country, region, city, and geographical coordinates.

Arguments:

  • target (str): The IP address or hostname to geolocate.

Output:

  • Prints geolocation details to the console.

Example:

lunarscan.geoscan("example.com")

get_ip(target)

Resolves a target domain to its corresponding IP address.

Arguments:

  • target (str): The domain name (e.g., "google.com").

Returns:

  • str | None: The resolved IP address, or None if the resolution fails.

Example:

ip = lunarscan.get_ip("github.com")
print(ip)

Notes

  • The geoscan function uses the ip-api.com service to fetch geolocation data. Ensure you have internet access.
  • Port scanning in the scan function has a timeout of 1 second per port for performance.
  • Future versions may include multithreading, banner grabbing, and CLI support.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lunarscan-0.1.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lunarscan-0.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file lunarscan-0.1.0.tar.gz.

File metadata

  • Download URL: lunarscan-0.1.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for lunarscan-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1c812cf43186b6251e9267d938ece2cd4432a89adb657d143347a1b1bbed98c1
MD5 8fd7be3c9728fda4c35505dfa50e52e5
BLAKE2b-256 63a5fa0c933125d7fdd4995778e74f7f68e63f35973d74e6ebe2f2046fd5199d

See more details on using hashes here.

File details

Details for the file lunarscan-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: lunarscan-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for lunarscan-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 54e34abd3d45d59003d60fccd27d07fcced5709333a830d45da6843afff63e95
MD5 5d06be709b9cc1c22b2a244bc347bf0b
BLAKE2b-256 63dae60b19722e1285463e19c8f7d3929dceda2ecb93e392452165a2f4e12702

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page