lanet 0.1.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +39 -21
- data/Gemfile.lock +1 -1
- data/README.md +86 -2
- data/index.html +424 -223
- data/lib/lanet/cli.rb +110 -62
- data/lib/lanet/encryptor.rb +94 -16
- data/lib/lanet/scanner.rb +101 -135
- data/lib/lanet/signer.rb +47 -0
- data/lib/lanet/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: aaec61e714b22eea7e3e40e66b6250672b93d15539f6645bc2ded8ea4c282458
|
|
4
|
+
data.tar.gz: 8f906d539e9878b418b156f7e735898dc04e9d05924ade44bcee23729474907d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d33ad462b0f69392f3f4fe4ce44ef405d2a734acf26f6ce892b3b1545f0dacf99cb545bbbc39ce7d2697ec89989ff1ec843e47f74943178faf66b4a284e51888
|
|
7
|
+
data.tar.gz: 73a1f2985e2592931ff80588358b5e83e10d99da077e7001e6ec12b614d37f30af0c7a2f2546f83382133a61c6b2e5d4ec1961edb02fa4d8803b359efd48e9a0
|
data/CHANGELOG.md
CHANGED
|
@@ -1,25 +1,43 @@
|
|
|
1
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.2.1] - 2025-03-07
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- Fixed thread handling in Scanner class to properly handle thread termination
|
|
12
|
+
- Improved test coverage for thread management in scanner specs
|
|
13
|
+
- Resolved issue with ARP updater thread cleanup
|
|
14
|
+
|
|
15
|
+
## [0.2.0] - 2025-03-07
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
- Digital signature support for message authentication and integrity
|
|
19
|
+
- New `Signer` class for creating and verifying digital signatures
|
|
20
|
+
- RSA-based key pair generation for signing and verification
|
|
21
|
+
- CLI command for generating key pairs (`keygen`)
|
|
22
|
+
- Support for signed-encrypted and signed-plaintext message formats
|
|
23
|
+
- Signature verification in message processing
|
|
24
|
+
- Updated documentation with signature examples
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
- Enhanced `Encryptor.prepare_message` to accept a private key for signing
|
|
28
|
+
- Modified `Encryptor.process_message` to verify signatures with public keys
|
|
29
|
+
- Extended message formats to include signature information
|
|
30
|
+
- CLI commands updated to support digital signature options
|
|
31
|
+
- Return values from message processing now include verification status
|
|
32
|
+
|
|
33
|
+
### Fixed
|
|
34
|
+
- Improved error handling for encryption and signature operations
|
|
2
35
|
|
|
3
36
|
## [0.1.0] - 2025-03-06
|
|
4
37
|
|
|
5
38
|
### Added
|
|
6
|
-
- Initial release of Lanet
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
- Multiple host ping support with continuous mode
|
|
12
|
-
- Messaging capabilities:
|
|
13
|
-
- Direct messaging to specific IP addresses
|
|
14
|
-
- Broadcast messaging to all network devices
|
|
15
|
-
- Message listening service
|
|
16
|
-
- Security features:
|
|
17
|
-
- Built-in encryption and decryption for secure messaging
|
|
18
|
-
- Command-line interface:
|
|
19
|
-
- `scan` command for network discovery
|
|
20
|
-
- `send` command for direct messaging
|
|
21
|
-
- `broadcast` command for network-wide announcements
|
|
22
|
-
- `listen` command to receive incoming messages
|
|
23
|
-
- `ping` command for host availability checking
|
|
24
|
-
- Ruby API for programmatic usage
|
|
25
|
-
- Complete documentation with usage examples
|
|
39
|
+
- Initial release of Lanet
|
|
40
|
+
- Basic UDP-based message sending and receiving
|
|
41
|
+
- Support for encrypted and plaintext messages
|
|
42
|
+
- Broadcasting capability
|
|
43
|
+
- Simple CLI interface
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# Lanet
|
|
2
2
|
|
|
3
|
-
[](https://rubygems.org/gems/lanet)
|
|
4
|
+
[](https://rubygems.org/gems/lanet)
|
|
4
5
|
[](https://opensource.org/licenses/MIT)
|
|
5
6
|
|
|
6
|
-
A lightweight, powerful LAN communication tool
|
|
7
|
+
A lightweight, powerful LAN communication tool that enables secure message exchange between devices on the same network. Lanet makes peer-to-peer networking simple with built-in encryption, network discovery, and both targeted and broadcast messaging capabilities.
|
|
7
8
|
|
|
8
9
|
## Features
|
|
9
10
|
|
|
@@ -16,7 +17,20 @@ A lightweight, powerful LAN communication tool for Ruby that enables secure mess
|
|
|
16
17
|
- 🖥️ **Command-line interface** - Perform common network operations directly from your terminal.
|
|
17
18
|
- 🧩 **Extensible** - Easily build custom tools and integrations using the Lanet API.
|
|
18
19
|
- ⚙️ **Configurable:** Adjust port settings, encryption keys, and network scan ranges.
|
|
20
|
+
- **Digital Signatures**: Ensure message authenticity and integrity
|
|
19
21
|
|
|
22
|
+
## Security Features
|
|
23
|
+
|
|
24
|
+
### Encryption
|
|
25
|
+
|
|
26
|
+
Lanet uses AES-256-CBC encryption to protect the content of messages. This ensures confidentiality during transmission.
|
|
27
|
+
|
|
28
|
+
### Digital Signatures
|
|
29
|
+
|
|
30
|
+
Digital signatures provide:
|
|
31
|
+
- **Authentication**: Verify the identity of the message sender
|
|
32
|
+
- **Data Integrity**: Ensure the message hasn't been tampered with during transit
|
|
33
|
+
- **Non-repudiation**: Senders cannot deny sending a message they signed
|
|
20
34
|
|
|
21
35
|
## Installation
|
|
22
36
|
|
|
@@ -44,6 +58,76 @@ gem install lanet
|
|
|
44
58
|
|
|
45
59
|
Lanet provides a powerful CLI for common network operations:
|
|
46
60
|
|
|
61
|
+
#### Generating Signature Keys
|
|
62
|
+
|
|
63
|
+
Generate a key pair for digital signatures:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
lanet keygen
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Generate a key pair with specific options:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
lanet keygen --bits 4096 --output ~/.lanet_keys
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
The command will generate two files:
|
|
76
|
+
- `lanet_private.key`: Keep this secure and don't share it
|
|
77
|
+
- `lanet_public.key`: Share this with others who need to verify your messages
|
|
78
|
+
|
|
79
|
+
#### Sending Signed Messages
|
|
80
|
+
|
|
81
|
+
Send a digitally signed message (without encryption):
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
lanet send --target 192.168.1.5 --message "Signed message" --private-key-file lanet_private.key
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Send an encrypted and signed message:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
lanet send --target 192.168.1.5 --message "Secure signed message" --key "my_secret_key" --private-key-file lanet_private.key
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Broadcast a signed message to all devices:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
lanet broadcast --message "Important announcement" --private-key-file lanet_private.key
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
#### Receiving and Verifying Signed Messages
|
|
100
|
+
|
|
101
|
+
Listen for messages and verify signatures:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
lanet listen --public-key-file lanet_public.key
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Listen for encrypted and signed messages:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
lanet listen --encryption-key "my_secret_key" --public-key-file lanet_public.key
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
When a signed message is received, the output will show verification status:
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
Message from 192.168.1.5:
|
|
117
|
+
Content: Hello, this is a signed message
|
|
118
|
+
Signature: VERIFIED
|
|
119
|
+
----------------------------------------
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
If signature verification fails:
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
Message from 192.168.1.5:
|
|
126
|
+
Content: Hello, this message was tampered with
|
|
127
|
+
Signature: NOT VERIFIED: Signature verification failed
|
|
128
|
+
----------------------------------------
|
|
129
|
+
```
|
|
130
|
+
|
|
47
131
|
#### Scanning the network
|
|
48
132
|
|
|
49
133
|
```bash
|