Skip to main content

Smart cloud security at a glance

Project description

SafeCloud CLI

SafeCloud is a powerful CLI tool for security checks, file encryption, IP analysis, and AI-based log analysis. It integrates advanced features such as port scanning, S3 bucket auditing, DNSBL checks, and local AI log scanning without requiring API keys.


Features

  • S3 Bucket Check: Detect if an AWS S3 bucket is publicly accessible.
  • Port Scan: Scan for open ports on a target IP.
  • IP Check: Validate IP/hostname, reverse DNS lookup, optional banner grabbing, port scanning, and DNSBL blacklist check.
  • Key Generation: Generate encryption keys.
  • Encrypt/Decrypt Files: AES-based encryption/decryption using generated keys.
  • AI Log Analysis: Analyze logs locally for security threats using GPT4All (no API key required).

Installation

  1. Clone the repository:
git clone https://github.com/eknvarli/safecloud.git
cd safecloud
  1. Install dependencies:
pip install -r requirements.txt
  1. (Optional) Make CLI globally accessible:
python setup.py install

Usage

1. S3 Bucket Check

safecloud s3check <bucket_name>

Checks if the specified bucket is public or private.

2. Port Scan

safecloud portscan <ip>

Scans the target IP for common open ports.

3. IP Check

safecloud ipcheck <target> --ports 22,80,443 --banner --blacklist

Performs reverse DNS lookup, port scan, optional banner grabbing, and DNSBL blacklist checks.

4. Key Generation

safecloud keygen --out ~/.safecloud/mykey.key

Generates an encryption key to the specified path.

5. Encrypt a File

safecloud encrypt myfile.txt --out myfile.txt.enc --keyfile ~/.safecloud/mykey.key

Encrypts a file using the specified key.

6. Decrypt a File

safecloud decrypt myfile.txt.enc --out myfile_decrypted.txt --keyfile ~/.safecloud/mykey.key

Decrypts a previously encrypted file.

7. AI Log Analysis

safecloud logai sample.log

Uses a local GPT4All model to analyze logs for potential threats and anomalies.


AI Model Setup

SafeCloud uses the GPT4All model locally. The CLI automatically downloads the model to ~/.safecloud/models/ if not found.

Supported AI model:

  • gpt4all-lora-quantized.bin

Note: Ensure you have a stable internet connection for the initial download.


Example Commands

safecloud s3check my-test-bucket
safecloud portscan 8.8.8.8
safecloud ipcheck 8.8.8.8 --ports 22,80,443 --banner --blacklist
safecloud keygen --out ~/.safecloud/mykey.key
safecloud encrypt test.txt --keyfile ~/.safecloud/mykey.key
safecloud decrypt test.txt.enc --keyfile ~/.safecloud/mykey.key
safecloud logai sample.log

License

GPLv3.0 License

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

safecloud-1.0.0.tar.gz (19.9 kB view details)

Uploaded Source

Built Distribution

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

safecloud-1.0.0-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

Details for the file safecloud-1.0.0.tar.gz.

File metadata

  • Download URL: safecloud-1.0.0.tar.gz
  • Upload date:
  • Size: 19.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for safecloud-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a79363f8c4a876663b9af338abeb110a27121666b69c5f63f1b32d6b990dded8
MD5 08361460b1ab9e234b602d8f4b6e9ede
BLAKE2b-256 f5a93e22452115fe6372f82ac42689b588c6d7fa82ec3b20199e218d6157f4e9

See more details on using hashes here.

File details

Details for the file safecloud-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: safecloud-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 20.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for safecloud-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d4481a87d4e83402f8110e56a78075bc99816fae8f4ed7338bcfa15297058d75
MD5 ba1c0e9c043d98d51ebe1d7ce2bee19b
BLAKE2b-256 6179d8a930c25423e873cfe3f10a106144327937a320600ae9a2c248ba3a40e8

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