Ttlinks

Latest version: v0.3.9

Safety actively analyzes 723217 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.3.1

Documentation
1. The documentation has been rewritten for `ipservice` to include more frequent use cases in the README.

New Features
N/A

Bug Fixes
N/A

Enhancements
1. The modules in `ip_service` have been restructured. Instead of using the `Binary` class for conversions, TTLinks now uses `bytes` as an intermediate step, resulting in more efficient calculations.
2. Test cases of ipservice are updated.

0.2.10

New feature
1. Add IPv4 Header, IPv4 Header's builder and director to build IPv4 header instance
2. Add `ipv4_builder.py` to builder IPv4 header
3. Add NetTools under `common\tools`. Methods includes get_outgoing_interface_ip, get_unused_port, get_tcp_sequence_number, and get_ipv4_id
4. Add `IPRawSocketBuilder` to protocol_socket.py
5. Add `tcp_builder.py` to build TCP header
6. Add `tcp_options.py` to build TCP options which can be used while building TCP header
7. Add `tcp_parsers.py` which is used to parser TCP packets
8. Add `tcp_units.py` to instantiate tcp params and convert to tcp unit objects
9. Add `TCPFlags` to represent TCP flag field
10. Add `tcp.py` under `\protocol_stack\ip_packets` to let user build their own TCP packets with IP headers
11. add test cases for new modules

Bug Fix
1. Fixed a bug where pinging a potential broadcast address on Linux caused asyncio to return an incorrect value.
2. Fixed a bug requiring int.from_bytes to explicitly specify the 'big' byte order parameter.
3. Ensured that sockets created during each asynchronous ping are properly closed after use.

0.2.2

0.2.1a

**1. New Features**
- **Checksum Calculation**: Added an Internet Checksum calculation function with a checksum abstract class, allowing for future extensions and different checksum types.
- **Numeral Conversion**: Introduced the `bytes_to_decimal` method in the `NumeralConverter` for easy conversion of bytes to decimal numbers.

**2. Parsing Capabilities**
- **Ethernet Frame Parsing**: Added parsers to handle Ethernet frames (both Ethernet II and IEEE 802.3 formats).
- **IPv4 Header Parsing**: Added parsers to extract and parse IPv4 header information.
- **ICMP Message Parsing**: Introduced ICMP parsers to decode ICMP messages.

**3. Design and Scalability Enhancements**
- **Design Patterns**: Applied various design patterns to ensure future development remains scalable and flexible.
- **ProtocolUnit Class**: Created the `ProtocolUnit` abstract class to encapsulate the different header formats across various network layers.
- **Chain of Responsibility (CoR)**: Introduced a route parsing pattern using the CoR pattern, chaining parsers to process from lower-level to higher-level protocols.

**4. Frame and Packet Building**
- **Custom Frame/Packet Builders**: Implemented builder classes to construct customized frames and packets for sending over Python sockets. ICMP is currently supported, and future protocols will be added.
- **Default Packet Building**: Added a feature for building default packets in just a few lines of code, making packet creation quick and easy.

**5. Packet Flow Management**
- **Abstract Sender/Receiver Classes**: Created abstract classes for packet senders and receivers, which cooperate with parsers to handle a complete packet flow (e.g., ICMP Echo and Echo Reply). This architecture allows for future extension to support more complex protocols.
- **Ping Manager Module**: Developed a Ping Manager module supporting asynchronous ping to multiple clients. This advanced feature can be used for ping scanning or future application development.

**6. Network Config Updates**
- **IPv4 and IPv6 SubnetConfig**: Modified `.get_hosts()` method to support `/32` subnets, providing more precise host range calculations for these edge cases.

0.1.25

1. **New `mac_factory.py` Module**:
Introduced a new module, `mac_factory.py`, to streamline the creation and management of MAC-related objects, improving modularity and efficiency.

2. **Batch MAC Address Creation Optimization**:
Optimized the performance of batch `MACAddress` creation by re-initializing the `OUI_DATABASE` in the `__init__.py` file of `macservice\oui_db`. This change reduces runtime overhead during large-scale MAC address operations.

3. **Enhancements to `LocalOUIDatabase`**:
- Added a `set_strategy` method, allowing users to modify the search strategy dynamically.
- Introduced a `strategy` property to enable reading the current strategy used for OUI lookups.

4. **New `address` Property in `MACAddr` Class**:
The `MACAddr` class now includes an `address` property, providing direct access to the MAC address in a standardized format.

5. **New Decimal MAC Converter**:
Added the `DecimalMAC48ConverterHandler` to support conversion of decimal representations of MAC addresses into the standard 48-bit format.

0.1.24

TTLinks continues to improve with version 0.1.24, bringing enhanced functionality for IP and MAC services. This release focuses on performance optimizations, new IP conversion capabilities, and more flexible wildcard handling.

Key Updates:

IP Services:
1. **New IP Converters**:
- Added IP converters to directly convert decimal values to IP addresses, enhancing performance by leveraging bitwise operations instead of checking each bit individually.

2. **IP Binary to Decimal Conversion**:
- A new property method has been added to the `IPAddr` class to facilitate the conversion of IP addresses from binary to decimal format.

3. **`ip_factory.py` Module**:
- **Host Creation**: Generate IP host objects (both IPv4 and IPv6).
- **Subnet Creation**: Easily create subnet objects.
- **Wildcard Creation**: Create wildcard configurations.
- **Batch Processing**: Create multiple host or subnet objects using `batch_hosts` and `batch_subnets`.
- **Random Host Generation**: Generate random host configurations based on IP type (public, private, etc.).
- **Random Subnet Generation**: Create random subnet configurations.
- **Batch Random Host/Subnet Creation**: Generate multiple random hosts or subnets in batches.

4. **Wildcard Mask Update**:
- Renamed "netmask" for wildcard configurations to "mask" to better differentiate between wildcard masks and netmasks, reflecting their distinct purposes.


Network
Key Features:

IP Services:
- **IPv4 and IPv6 Subnet Calculations**: Compute subnets, CIDR blocks, and broadcast addresses with ease.
- **IP Address Classification**: Quickly identify if an IP is public, private, multicast, loopback, or other types of addresses.
- **Detect IPv4 or IPv6**: Automatically detect whether an IP is IPv4 or IPv6.
- **Netmask Expansion**: Generate all possible combinations of IP addresses by expanding netmask bits.
- **IP Address Conversion**: Easily convert between different IP address notations (e.g., dotted decimal, binary, hexadecimal) for both IPv4 and IPv6.
- **Minimum Wildcard Finder**: Given subnets, find the minimum wildcard, ideal for creating efficient ACLs.
- **Subnet Host Generator**: Generate all hosts within a subnet using a generator.
- **IP within Subnet or Wildcard Check**: Check if an IP address falls within a specified subnet or wildcard.
- **IPv4 Broadcast and Network ID Check**: Verify the broadcast and network IDs of IPv4 subnets.
- **Subnet Host Count**: Calculate the number of hosts in a given subnet.
- **Show Subnet Range**: Display the full range of IP addresses within a subnet.
- **Subnet Division and Merging**: Divide subnets into smaller subnets or merge them into larger networks.
- **IPv6 Type Check**: Identify the type of an IPv6 address.

MAC Services:
- **MAC Address Conversion**: Convert MAC addresses between formats such as octet, dashed-hex, and dot-hex formats.
- **OUI Lookup**: Identify device manufacturers by performing fast lookups in the OUI (Organizationally Unique Identifier) database.
- **Automatic OUI Check**: Automatically check the OUI when creating a MAC address instance.
- **Binary Conversion**: Translate MAC addresses into binary format for further analysis.
- **MAC to EUI-64 Conversion**: Convert MAC addresses to EUI-64 format for use in IPv6 networking.
- **Tri Algorithm for OUI Search**: Use an efficient Tri algorithm for searching OUI data.
- **Custom OUI Updates**: Customize and update OUI documents, with the ability to revert to the default state of the current version.
- **MAC Address Classification**: Classify MAC addresses as broadcast, unicast, or multicast.

Links

Releases

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.