isubing 1.0.0__tar.gz

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.
isubing-1.0.0/LICENSE ADDED
@@ -0,0 +1,176 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
isubing-1.0.0/NOTICE ADDED
@@ -0,0 +1,14 @@
1
+ Isub
2
+ Copyright 2026 Lucas Sogaray
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
isubing-1.0.0/PKG-INFO ADDED
@@ -0,0 +1,156 @@
1
+ Metadata-Version: 2.4
2
+ Name: isubing
3
+ Version: 1.0.0
4
+ Summary: A fast, multithreaded TCP port scanner with service detection and logging.
5
+ Author: Lucas Sogaray
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/lucassogarayDA/isub
8
+ Project-URL: Repository, https://github.com/lucassogarayDA/isub
9
+ Project-URL: Issues, https://github.com/lucassogarayDA/isub/issues
10
+ Keywords: port scanner,network,security,tcp,scanner
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Topic :: Security
14
+ Classifier: Topic :: System :: Networking
15
+ Requires-Python: >=3.8
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ License-File: NOTICE
19
+ Dynamic: license-file
20
+
21
+ # Isub
22
+
23
+ [![PyPI version](https://img.shields.io/pypi/v/isubing.svg)](https://pypi.org/project/isubing/)
24
+ [![Python](https://img.shields.io/badge/python-3.8%2B-blue)](https://www.python.org/)
25
+ [![License](https://img.shields.io/badge/license-Apache--2.0-green)](./LICENSE)
26
+ [![Platform](https://img.shields.io/badge/platform-Linux%20%7C%20macOS%20%7C%20Windows%20%7C%20Termux-lightgrey)]()
27
+
28
+ **Fast, multithreaded TCP port scanner with service detection and logging.**
29
+
30
+ ---
31
+
32
+ ## 🚀 Install
33
+
34
+ ```bash
35
+ pip install isubing
36
+ ```
37
+
38
+ Or install from source:
39
+
40
+ ```bash
41
+ git clone https://github.com/lucassogarayDA/isub.git
42
+ cd isub
43
+ pip install -e .
44
+ ```
45
+
46
+ ---
47
+
48
+ ⚠️ Disclaimer
49
+
50
+ Use Isub only on systems you own or have explicit written authorization to test.
51
+ Unauthorized scanning is illegal in most jurisdictions. The author assumes no responsibility for misuse.
52
+
53
+ ---
54
+
55
+ ⚡ Quick Start
56
+
57
+ Scan the first 1024 ports on localhost:
58
+
59
+ ```bash
60
+ isub -H 127.0.0.1 -p 1-1024
61
+ ```
62
+
63
+ Scan specific ports on a remote host:
64
+
65
+ ```bash
66
+ isub -H example.com -p 22,80,443 --lang en
67
+ ```
68
+
69
+ Full scan with custom threads and timeout:
70
+
71
+ ```bash
72
+ isub -H 192.168.1.1 -p 1-65535 -t 200 --timeout 1.0 -y
73
+ ```
74
+
75
+ ---
76
+
77
+ Features
78
+
79
+ · ⚡ Fast: multithreaded scanning (configurable thread count)
80
+ · 🔍 Service detection: identifies common services (SSH, HTTP, MySQL, etc.)
81
+ · 📡 Banner grabbing: captures the first bytes sent by services to reveal versions
82
+ · 📝 Rotating logs: automatic log rotation to avoid filling your disk
83
+ · 🌐 Bilingual: Spanish and English output (--lang es / --lang en)
84
+ · 📦 Zero dependencies: pure Python standard library
85
+ · 🖥️ Cross-platform: Linux, macOS, Windows, Termux
86
+
87
+ ---
88
+
89
+ Options
90
+
91
+ Flag Description Default
92
+ -H, --host Target host (IP or domain) — required —
93
+ -p, --ports Port range or list (1-1024 or 22,80,443) 1-1024
94
+ -t, --threads Number of concurrent threads 100
95
+ --timeout Timeout per port in seconds 0.5
96
+ --no-banner Skip banner grabbing False
97
+ -l, --log Log file path isub.log
98
+ -y, --yes Skip authorization confirmation False
99
+ --lang Language: es or en es
100
+ -v, --version Show version and exit —
101
+
102
+ ---
103
+
104
+ Example Output
105
+
106
+ ```
107
+ ___ ____ _ _ ____
108
+ |_ _/ ___|| | | | __ )
109
+ | |\___ \| | | | _ \
110
+ | | ___) | |_| | |_) |
111
+ |___|____/ \___/|____/
112
+
113
+ Isub v1.0 - TCP Port Scanner
114
+
115
+ Scanning 127.0.0.1 ...
116
+ [+] 22/SSH OPEN | OpenSSH 8.9
117
+ [+] 80/HTTP OPEN
118
+ [+] 443/HTTPS OPEN
119
+ --------------------------------------------------
120
+ [OK] 3 open ports in 1.24s
121
+ Log saved to isub.log
122
+ ```
123
+
124
+ ---
125
+
126
+ Logging
127
+
128
+ Isub writes all scan results to a rotating log file (isub.log by default). Logs rotate automatically at 5 MB, keeping up to 3 backups, so you never have to worry about disk space.
129
+
130
+ ---
131
+
132
+ Development
133
+
134
+ Run locally without installing:
135
+
136
+ ```bash
137
+ python -m isub -H 127.0.0.1 -p 1-1024
138
+ ```
139
+
140
+ Build the package from source:
141
+
142
+ ```bash
143
+ python -m build
144
+ ```
145
+
146
+ ---
147
+
148
+ License
149
+
150
+ Apache License 2.0 — see LICENSE and NOTICE.
151
+
152
+ ---
153
+
154
+ Author
155
+
156
+ Lucas Sogaray — @lucassogarayDA
@@ -0,0 +1,136 @@
1
+ # Isub
2
+
3
+ [![PyPI version](https://img.shields.io/pypi/v/isubing.svg)](https://pypi.org/project/isubing/)
4
+ [![Python](https://img.shields.io/badge/python-3.8%2B-blue)](https://www.python.org/)
5
+ [![License](https://img.shields.io/badge/license-Apache--2.0-green)](./LICENSE)
6
+ [![Platform](https://img.shields.io/badge/platform-Linux%20%7C%20macOS%20%7C%20Windows%20%7C%20Termux-lightgrey)]()
7
+
8
+ **Fast, multithreaded TCP port scanner with service detection and logging.**
9
+
10
+ ---
11
+
12
+ ## 🚀 Install
13
+
14
+ ```bash
15
+ pip install isubing
16
+ ```
17
+
18
+ Or install from source:
19
+
20
+ ```bash
21
+ git clone https://github.com/lucassogarayDA/isub.git
22
+ cd isub
23
+ pip install -e .
24
+ ```
25
+
26
+ ---
27
+
28
+ ⚠️ Disclaimer
29
+
30
+ Use Isub only on systems you own or have explicit written authorization to test.
31
+ Unauthorized scanning is illegal in most jurisdictions. The author assumes no responsibility for misuse.
32
+
33
+ ---
34
+
35
+ ⚡ Quick Start
36
+
37
+ Scan the first 1024 ports on localhost:
38
+
39
+ ```bash
40
+ isub -H 127.0.0.1 -p 1-1024
41
+ ```
42
+
43
+ Scan specific ports on a remote host:
44
+
45
+ ```bash
46
+ isub -H example.com -p 22,80,443 --lang en
47
+ ```
48
+
49
+ Full scan with custom threads and timeout:
50
+
51
+ ```bash
52
+ isub -H 192.168.1.1 -p 1-65535 -t 200 --timeout 1.0 -y
53
+ ```
54
+
55
+ ---
56
+
57
+ Features
58
+
59
+ · ⚡ Fast: multithreaded scanning (configurable thread count)
60
+ · 🔍 Service detection: identifies common services (SSH, HTTP, MySQL, etc.)
61
+ · 📡 Banner grabbing: captures the first bytes sent by services to reveal versions
62
+ · 📝 Rotating logs: automatic log rotation to avoid filling your disk
63
+ · 🌐 Bilingual: Spanish and English output (--lang es / --lang en)
64
+ · 📦 Zero dependencies: pure Python standard library
65
+ · 🖥️ Cross-platform: Linux, macOS, Windows, Termux
66
+
67
+ ---
68
+
69
+ Options
70
+
71
+ Flag Description Default
72
+ -H, --host Target host (IP or domain) — required —
73
+ -p, --ports Port range or list (1-1024 or 22,80,443) 1-1024
74
+ -t, --threads Number of concurrent threads 100
75
+ --timeout Timeout per port in seconds 0.5
76
+ --no-banner Skip banner grabbing False
77
+ -l, --log Log file path isub.log
78
+ -y, --yes Skip authorization confirmation False
79
+ --lang Language: es or en es
80
+ -v, --version Show version and exit —
81
+
82
+ ---
83
+
84
+ Example Output
85
+
86
+ ```
87
+ ___ ____ _ _ ____
88
+ |_ _/ ___|| | | | __ )
89
+ | |\___ \| | | | _ \
90
+ | | ___) | |_| | |_) |
91
+ |___|____/ \___/|____/
92
+
93
+ Isub v1.0 - TCP Port Scanner
94
+
95
+ Scanning 127.0.0.1 ...
96
+ [+] 22/SSH OPEN | OpenSSH 8.9
97
+ [+] 80/HTTP OPEN
98
+ [+] 443/HTTPS OPEN
99
+ --------------------------------------------------
100
+ [OK] 3 open ports in 1.24s
101
+ Log saved to isub.log
102
+ ```
103
+
104
+ ---
105
+
106
+ Logging
107
+
108
+ Isub writes all scan results to a rotating log file (isub.log by default). Logs rotate automatically at 5 MB, keeping up to 3 backups, so you never have to worry about disk space.
109
+
110
+ ---
111
+
112
+ Development
113
+
114
+ Run locally without installing:
115
+
116
+ ```bash
117
+ python -m isub -H 127.0.0.1 -p 1-1024
118
+ ```
119
+
120
+ Build the package from source:
121
+
122
+ ```bash
123
+ python -m build
124
+ ```
125
+
126
+ ---
127
+
128
+ License
129
+
130
+ Apache License 2.0 — see LICENSE and NOTICE.
131
+
132
+ ---
133
+
134
+ Author
135
+
136
+ Lucas Sogaray — @lucassogarayDA
@@ -0,0 +1,31 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "isubing"
7
+ version = "1.0.0"
8
+ description = "A fast, multithreaded TCP port scanner with service detection and logging."
9
+ readme = "README.md"
10
+ requires-python = ">=3.8"
11
+ license = "Apache-2.0"
12
+ license-files = ["LICENSE", "NOTICE"]
13
+ authors = [
14
+ { name = "Lucas Sogaray" }
15
+ ]
16
+ keywords = ["port scanner", "network", "security", "tcp", "scanner"]
17
+ classifiers = [
18
+ "Programming Language :: Python :: 3",
19
+ "Operating System :: OS Independent",
20
+ "Topic :: Security",
21
+ "Topic :: System :: Networking",
22
+ ]
23
+ dependencies = []
24
+
25
+ [project.urls]
26
+ Homepage = "https://github.com/lucassogarayDA/isub"
27
+ Repository = "https://github.com/lucassogarayDA/isub"
28
+ Issues = "https://github.com/lucassogarayDA/isub/issues"
29
+
30
+ [project.scripts]
31
+ isub = "isub.cli:main"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
File without changes
@@ -0,0 +1,4 @@
1
+ from isub.cli import main
2
+
3
+ if __name__ == "__main__":
4
+ main()
@@ -0,0 +1,34 @@
1
+ """ASCII banner and bilingual strings for Isub."""
2
+
3
+ LOGO = r"""
4
+ ___ ____ _ _ ____
5
+ |_ _/ ___|| | | | __ )
6
+ | |\___ \| | | | _ \
7
+ | | ___) | |_| | |_) |
8
+ |___|____/ \___/|____/
9
+
10
+ Isub v1.0 - TCP Port Scanner
11
+ """
12
+
13
+ STRINGS = {
14
+ "es": {
15
+ "confirm": "¿Confirmas que tienes autorización para escanear el objetivo? [s/N]: ",
16
+ "aborted": "Abortado. Solo debes escanear sistemas autorizados.",
17
+ "scanning": "Escaneando {host} ...",
18
+ "open_port": "[+] {port}/{service} ABIERTO{extra}",
19
+ "done": "[OK] {count} puertos abiertos en {time:.2f}s",
20
+ "log_saved": "Log guardado en {path}",
21
+ "invalid_range": "Rango de puertos inválido.",
22
+ "invalid_host": "Host inválido o no resuelve.",
23
+ },
24
+ "en": {
25
+ "confirm": "Do you confirm you have authorization to scan the target? [y/N]: ",
26
+ "aborted": "Aborted. Only scan systems you are authorized to test.",
27
+ "scanning": "Scanning {host} ...",
28
+ "open_port": "[+] {port}/{service} OPEN{extra}",
29
+ "done": "[OK] {count} open ports in {time:.2f}s",
30
+ "log_saved": "Log saved to {path}",
31
+ "invalid_range": "Invalid port range.",
32
+ "invalid_host": "Invalid host or cannot resolve.",
33
+ },
34
+ }
@@ -0,0 +1,94 @@
1
+ """Command-line interface for Isub."""
2
+
3
+ import argparse
4
+ import sys
5
+ import time
6
+ import socket
7
+ from isub.banner import LOGO, STRINGS
8
+ from isub.scanner import scan
9
+ from isub.logger import setup_logger
10
+
11
+ __version__ = "1.0.0"
12
+
13
+
14
+ def parse_ports(port_str: str):
15
+ ports = []
16
+ for part in port_str.split(","):
17
+ part = part.strip()
18
+ if "-" in part:
19
+ start, end = part.split("-")
20
+ ports.extend(range(int(start), int(end) + 1))
21
+ else:
22
+ ports.append(int(part))
23
+ return sorted(set(ports))
24
+
25
+
26
+ def main():
27
+ parser = argparse.ArgumentParser(
28
+ prog="isub",
29
+ description="Isub - Fast TCP Port Scanner",
30
+ epilog="Use only on systems you own or have written authorization to test.",
31
+ )
32
+ parser.add_argument("-H", "--host", required=True, help="Target host (IP or domain)")
33
+ parser.add_argument("-p", "--ports", default="1-1024", help="Ports: '1-1024' or '22,80,443'")
34
+ parser.add_argument("-t", "--threads", type=int, default=100, help="Concurrent threads (default: 100)")
35
+ parser.add_argument("--timeout", type=float, default=0.5, help="Timeout per port in seconds (default: 0.5)")
36
+ parser.add_argument("--no-banner", action="store_true", help="Skip banner grabbing")
37
+ parser.add_argument("-l", "--log", default="isub.log", help="Log file path (default: isub.log)")
38
+ parser.add_argument("-y", "--yes", action="store_true", help="Skip authorization confirmation")
39
+ parser.add_argument("--lang", choices=["es", "en"], default="es", help="Language (default: es)")
40
+ parser.add_argument("-v", "--version", action="version", version=f"Isub {__version__}")
41
+
42
+ args = parser.parse_args()
43
+ t = STRINGS[args.lang]
44
+
45
+ print(LOGO)
46
+
47
+ if not args.yes:
48
+ answer = input(t["confirm"]).strip().lower()
49
+ if answer not in ("s", "y"):
50
+ print(t["aborted"])
51
+ sys.exit(0)
52
+
53
+ try:
54
+ socket.gethostbyname(args.host)
55
+ except socket.gaierror:
56
+ print(t["invalid_host"])
57
+ sys.exit(1)
58
+
59
+ try:
60
+ ports = parse_ports(args.ports)
61
+ except ValueError:
62
+ print(t["invalid_range"])
63
+ sys.exit(1)
64
+
65
+ logger = setup_logger(args.log)
66
+ logger.info(f"Scan start: host={args.host}, ports={args.ports}, threads={args.threads}")
67
+
68
+ print(t["scanning"].format(host=args.host))
69
+ start_time = time.time()
70
+
71
+ results = scan(
72
+ host=args.host,
73
+ ports=ports,
74
+ threads=args.threads,
75
+ timeout=args.timeout,
76
+ grab_banner=not args.no_banner,
77
+ )
78
+
79
+ elapsed = time.time() - start_time
80
+
81
+ for port, service, banner in results:
82
+ extra = f" | {banner}" if banner else ""
83
+ msg = t["open_port"].format(port=port, service=service, extra=extra)
84
+ print(msg)
85
+ logger.info(msg)
86
+
87
+ print("-" * 50)
88
+ print(t["done"].format(count=len(results), time=elapsed))
89
+ print(t["log_saved"].format(path=args.log))
90
+ logger.info(f"Scan complete: {len(results)} open ports in {elapsed:.2f}s")
91
+
92
+
93
+ if __name__ == "__main__":
94
+ main()
@@ -0,0 +1,21 @@
1
+ """Rotating logger for Isub."""
2
+
3
+ import logging
4
+ from logging.handlers import RotatingFileHandler
5
+
6
+
7
+ def setup_logger(log_path: str = "isub.log") -> logging.Logger:
8
+ logger = logging.getLogger("Isub")
9
+ logger.setLevel(logging.INFO)
10
+
11
+ if logger.handlers:
12
+ return logger
13
+
14
+ handler = RotatingFileHandler(
15
+ log_path, maxBytes=5 * 1024 * 1024, backupCount=3, encoding="utf-8"
16
+ )
17
+ handler.setFormatter(
18
+ logging.Formatter("%(asctime)s - %(levelname)s - %(message)s")
19
+ )
20
+ logger.addHandler(handler)
21
+ return logger
@@ -0,0 +1,43 @@
1
+ """TCP scanning logic for Isub."""
2
+
3
+ import socket
4
+ from concurrent.futures import ThreadPoolExecutor
5
+ from isub.services import SERVICES
6
+
7
+
8
+ def scan_port(host: str, port: int, timeout: float = 0.5, grab_banner: bool = True):
9
+ """Return (port, service, banner) if open, else None."""
10
+ try:
11
+ with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
12
+ sock.settimeout(timeout)
13
+ if sock.connect_ex((host, port)) != 0:
14
+ return None
15
+
16
+ service = SERVICES.get(port, "Unknown")
17
+ banner = ""
18
+ if grab_banner:
19
+ try:
20
+ sock.settimeout(1.0)
21
+ raw = sock.recv(1024)
22
+ banner = raw.decode(errors="ignore").strip()[:80]
23
+ except Exception:
24
+ pass
25
+ return (port, service, banner)
26
+ except Exception:
27
+ return None
28
+
29
+
30
+ def scan(host: str, ports, threads: int = 100, timeout: float = 0.5,
31
+ grab_banner: bool = True):
32
+ """Scan a list of ports and return a sorted list of open results."""
33
+ results = []
34
+ with ThreadPoolExecutor(max_workers=threads) as executor:
35
+ futures = [
36
+ executor.submit(scan_port, host, p, timeout, grab_banner)
37
+ for p in ports
38
+ ]
39
+ for f in futures:
40
+ r = f.result()
41
+ if r:
42
+ results.append(r)
43
+ return sorted(results)
@@ -0,0 +1,10 @@
1
+ """Common TCP services by port number."""
2
+
3
+ SERVICES = {
4
+ 20: "FTP-Data", 21: "FTP", 22: "SSH", 23: "Telnet", 25: "SMTP",
5
+ 53: "DNS", 67: "DHCP", 80: "HTTP", 110: "POP3", 143: "IMAP",
6
+ 161: "SNMP", 443: "HTTPS", 445: "SMB", 465: "SMTPS", 587: "SMTP-Sub",
7
+ 993: "IMAPS", 995: "POP3S", 1433: "MSSQL", 1521: "Oracle",
8
+ 3306: "MySQL", 3389: "RDP", 5432: "PostgreSQL", 5900: "VNC",
9
+ 6379: "Redis", 8080: "HTTP-Alt", 8443: "HTTPS-Alt", 27017: "MongoDB",
10
+ }
@@ -0,0 +1,156 @@
1
+ Metadata-Version: 2.4
2
+ Name: isubing
3
+ Version: 1.0.0
4
+ Summary: A fast, multithreaded TCP port scanner with service detection and logging.
5
+ Author: Lucas Sogaray
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/lucassogarayDA/isub
8
+ Project-URL: Repository, https://github.com/lucassogarayDA/isub
9
+ Project-URL: Issues, https://github.com/lucassogarayDA/isub/issues
10
+ Keywords: port scanner,network,security,tcp,scanner
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Topic :: Security
14
+ Classifier: Topic :: System :: Networking
15
+ Requires-Python: >=3.8
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ License-File: NOTICE
19
+ Dynamic: license-file
20
+
21
+ # Isub
22
+
23
+ [![PyPI version](https://img.shields.io/pypi/v/isubing.svg)](https://pypi.org/project/isubing/)
24
+ [![Python](https://img.shields.io/badge/python-3.8%2B-blue)](https://www.python.org/)
25
+ [![License](https://img.shields.io/badge/license-Apache--2.0-green)](./LICENSE)
26
+ [![Platform](https://img.shields.io/badge/platform-Linux%20%7C%20macOS%20%7C%20Windows%20%7C%20Termux-lightgrey)]()
27
+
28
+ **Fast, multithreaded TCP port scanner with service detection and logging.**
29
+
30
+ ---
31
+
32
+ ## 🚀 Install
33
+
34
+ ```bash
35
+ pip install isubing
36
+ ```
37
+
38
+ Or install from source:
39
+
40
+ ```bash
41
+ git clone https://github.com/lucassogarayDA/isub.git
42
+ cd isub
43
+ pip install -e .
44
+ ```
45
+
46
+ ---
47
+
48
+ ⚠️ Disclaimer
49
+
50
+ Use Isub only on systems you own or have explicit written authorization to test.
51
+ Unauthorized scanning is illegal in most jurisdictions. The author assumes no responsibility for misuse.
52
+
53
+ ---
54
+
55
+ ⚡ Quick Start
56
+
57
+ Scan the first 1024 ports on localhost:
58
+
59
+ ```bash
60
+ isub -H 127.0.0.1 -p 1-1024
61
+ ```
62
+
63
+ Scan specific ports on a remote host:
64
+
65
+ ```bash
66
+ isub -H example.com -p 22,80,443 --lang en
67
+ ```
68
+
69
+ Full scan with custom threads and timeout:
70
+
71
+ ```bash
72
+ isub -H 192.168.1.1 -p 1-65535 -t 200 --timeout 1.0 -y
73
+ ```
74
+
75
+ ---
76
+
77
+ Features
78
+
79
+ · ⚡ Fast: multithreaded scanning (configurable thread count)
80
+ · 🔍 Service detection: identifies common services (SSH, HTTP, MySQL, etc.)
81
+ · 📡 Banner grabbing: captures the first bytes sent by services to reveal versions
82
+ · 📝 Rotating logs: automatic log rotation to avoid filling your disk
83
+ · 🌐 Bilingual: Spanish and English output (--lang es / --lang en)
84
+ · 📦 Zero dependencies: pure Python standard library
85
+ · 🖥️ Cross-platform: Linux, macOS, Windows, Termux
86
+
87
+ ---
88
+
89
+ Options
90
+
91
+ Flag Description Default
92
+ -H, --host Target host (IP or domain) — required —
93
+ -p, --ports Port range or list (1-1024 or 22,80,443) 1-1024
94
+ -t, --threads Number of concurrent threads 100
95
+ --timeout Timeout per port in seconds 0.5
96
+ --no-banner Skip banner grabbing False
97
+ -l, --log Log file path isub.log
98
+ -y, --yes Skip authorization confirmation False
99
+ --lang Language: es or en es
100
+ -v, --version Show version and exit —
101
+
102
+ ---
103
+
104
+ Example Output
105
+
106
+ ```
107
+ ___ ____ _ _ ____
108
+ |_ _/ ___|| | | | __ )
109
+ | |\___ \| | | | _ \
110
+ | | ___) | |_| | |_) |
111
+ |___|____/ \___/|____/
112
+
113
+ Isub v1.0 - TCP Port Scanner
114
+
115
+ Scanning 127.0.0.1 ...
116
+ [+] 22/SSH OPEN | OpenSSH 8.9
117
+ [+] 80/HTTP OPEN
118
+ [+] 443/HTTPS OPEN
119
+ --------------------------------------------------
120
+ [OK] 3 open ports in 1.24s
121
+ Log saved to isub.log
122
+ ```
123
+
124
+ ---
125
+
126
+ Logging
127
+
128
+ Isub writes all scan results to a rotating log file (isub.log by default). Logs rotate automatically at 5 MB, keeping up to 3 backups, so you never have to worry about disk space.
129
+
130
+ ---
131
+
132
+ Development
133
+
134
+ Run locally without installing:
135
+
136
+ ```bash
137
+ python -m isub -H 127.0.0.1 -p 1-1024
138
+ ```
139
+
140
+ Build the package from source:
141
+
142
+ ```bash
143
+ python -m build
144
+ ```
145
+
146
+ ---
147
+
148
+ License
149
+
150
+ Apache License 2.0 — see LICENSE and NOTICE.
151
+
152
+ ---
153
+
154
+ Author
155
+
156
+ Lucas Sogaray — @lucassogarayDA
@@ -0,0 +1,16 @@
1
+ LICENSE
2
+ NOTICE
3
+ README.md
4
+ pyproject.toml
5
+ src/isub/__init__.py
6
+ src/isub/__main__.py
7
+ src/isub/banner.py
8
+ src/isub/cli.py
9
+ src/isub/logger.py
10
+ src/isub/scanner.py
11
+ src/isub/services.py
12
+ src/isubing.egg-info/PKG-INFO
13
+ src/isubing.egg-info/SOURCES.txt
14
+ src/isubing.egg-info/dependency_links.txt
15
+ src/isubing.egg-info/entry_points.txt
16
+ src/isubing.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ isub = isub.cli:main
@@ -0,0 +1 @@
1
+ isub