pftp 2.0.0__py3-none-any.whl → 2.0.1__py3-none-any.whl

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.
pftp/__init__.py CHANGED
@@ -3,5 +3,5 @@
3
3
  A CLI tool for managing file transfer servers during penetration testing.
4
4
  """
5
5
 
6
- __version__ = "2.0.0"
6
+ __version__ = "2.0.1"
7
7
  __author__ = "Ahmad Alawneh"
pftp/cli.py CHANGED
@@ -104,9 +104,15 @@ def cli():
104
104
  @click.option('--ftp-port', type=int, help='FTP server port')
105
105
  @click.option('--enable-ftp/--disable-ftp', default=None, help='Enable/disable FTP')
106
106
  @click.option('--enable-smb/--disable-smb', default=None, help='Enable/disable SMB')
107
+ @click.option('--auth/--no-auth', default=None, help='Enable/disable authentication')
108
+ @click.option('--auth-username', help='Authentication username')
109
+ @click.option('--auth-password', help='Authentication password')
110
+ @click.option('--restart-policy', type=click.Choice(['no', 'always', 'unless-stopped', 'on-failure']),
111
+ help='Docker restart policy')
107
112
  @click.option('--skip-pull', is_flag=True, help='Skip pulling Docker image')
108
113
  def install(yes, data_dir, tools_dir, uploads_dir, http_port, ftp_port,
109
- enable_ftp, enable_smb, skip_pull):
114
+ enable_ftp, enable_smb, auth, auth_username, auth_password,
115
+ restart_policy, skip_pull):
110
116
  """Install and configure pftp"""
111
117
 
112
118
  click.echo(click.style("=== PFTP Installation ===\n", fg='cyan', bold=True))
@@ -151,6 +157,29 @@ def install(yes, data_dir, tools_dir, uploads_dir, http_port, ftp_port,
151
157
  if uploads_dir is None:
152
158
  if click.confirm('Use custom uploads directory', default=False):
153
159
  uploads_dir = click.prompt('Uploads directory path', type=click.Path())
160
+
161
+ # Authentication configuration
162
+ click.echo(f"\n{click.style('Authentication Configuration:', fg='yellow', bold=True)}")
163
+ if auth is None:
164
+ auth = click.confirm('Enable authentication', default=False)
165
+ if auth:
166
+ if auth_username is None:
167
+ auth_username = click.prompt('Username', default='admin')
168
+ if auth_password is None:
169
+ auth_password = click.prompt('Password', hide_input=True)
170
+
171
+ # Docker configuration
172
+ click.echo(f"\n{click.style('Docker Configuration:', fg='yellow', bold=True)}")
173
+ if restart_policy is None:
174
+ if click.confirm('Configure restart policy', default=False):
175
+ click.echo(" Options:")
176
+ click.echo(" no - Never restart automatically")
177
+ click.echo(" always - Always restart (even after reboot)")
178
+ click.echo(" unless-stopped - Restart unless manually stopped (default)")
179
+ click.echo(" on-failure - Restart only if container exits with error")
180
+ restart_policy = click.prompt('Restart policy',
181
+ type=click.Choice(['no', 'always', 'unless-stopped', 'on-failure']),
182
+ default='unless-stopped')
154
183
  else:
155
184
  # Use defaults for --yes mode
156
185
  if http_port is None:
@@ -200,6 +229,16 @@ def install(yes, data_dir, tools_dir, uploads_dir, http_port, ftp_port,
200
229
  config.protocols['ftp']['port'] = ftp_port if ftp_port else FTP_PORT
201
230
  config.protocols['smb']['enabled'] = enable_smb
202
231
 
232
+ # Authentication
233
+ if auth:
234
+ config.auth_enabled = True
235
+ config.auth_username = auth_username or 'admin'
236
+ config.auth_password_hash = hash_password(auth_password) if auth_password else ''
237
+
238
+ # Restart policy
239
+ if restart_policy:
240
+ config.restart_policy = restart_policy
241
+
203
242
  config_path = get_config_path(data_dir)
204
243
  config.save(config_path)
205
244
  click.echo(f"✓ Configuration saved to {config_path}")
@@ -0,0 +1,103 @@
1
+ Metadata-Version: 2.4
2
+ Name: pftp
3
+ Version: 2.0.1
4
+ Summary: PFTP - Pentest File Transfer Protocols - CLI Tool
5
+ Author-email: Ahmad Alawneh <a.3alawneh@gmail.com>
6
+ License: MIT
7
+ Keywords: pentest,file-transfer,security,hacking,ctf,ftp,CTF
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Intended Audience :: Information Technology
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.8
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Topic :: Security
17
+ Requires-Python: >=3.8
18
+ Description-Content-Type: text/markdown
19
+ Requires-Dist: click>=8.0
20
+ Requires-Dist: docker>=6.0
21
+ Requires-Dist: pyyaml>=6.0
22
+ Provides-Extra: dev
23
+ Requires-Dist: build; extra == "dev"
24
+ Requires-Dist: twine; extra == "dev"
25
+
26
+ # PFTP CLI
27
+
28
+ CLI tool for managing the PFTP (Pentest File Transfer Protocols) server.
29
+
30
+ A lightweight, multi-protocol file transfer hub for penetration testers, ethical hackers, and CTF players. Supports HTTP, FTP, and SMB simultaneously.
31
+
32
+ **Docker Image**: [ahmadalawneh3/pftp](https://hub.docker.com/r/ahmadalawneh3/pftp)
33
+
34
+ ## Installation
35
+
36
+ ```bash
37
+ pipx install pftp
38
+ ```
39
+
40
+ Or with pip:
41
+
42
+ ```bash
43
+ pip install pftp
44
+ ```
45
+
46
+ ## Quick Start
47
+
48
+ ```bash
49
+ # Install and configure (interactive wizard)
50
+ pftp install
51
+
52
+ # Start the server
53
+ pftp start
54
+
55
+ # Check status
56
+ pftp status
57
+
58
+ # Add tools
59
+ pftp add-tool /path/to/linpeas.sh
60
+ pftp add-tool /path/to/windows/ --recursive --category windows
61
+
62
+ # View logs
63
+ pftp logs
64
+
65
+ # Stop the server
66
+ pftp stop
67
+ ```
68
+
69
+ ## Commands
70
+
71
+ | Command | Description |
72
+ |---------|-------------|
73
+ | `pftp install` | Install and configure (interactive wizard) |
74
+ | `pftp configure` | Reconfigure settings (interactive or flags) |
75
+ | `pftp start` | Start the server |
76
+ | `pftp stop` | Stop the server |
77
+ | `pftp restart` | Restart the server |
78
+ | `pftp status` | Show status and configuration |
79
+ | `pftp logs` | View server logs |
80
+ | `pftp update` | Update to latest Docker image |
81
+ | `pftp remove` | Uninstall pftp |
82
+ | `pftp add-tool` | Add files to tools directory |
83
+ | `pftp version` | Show version |
84
+
85
+ ## Features
86
+
87
+ - Multi-protocol: HTTP, FTP, and SMB running simultaneously
88
+ - Interactive setup wizard with `pftp install`
89
+ - Optional authentication across all protocols
90
+ - Configurable Docker restart policy
91
+ - Auto-detects network interfaces (prioritizes VPN/tun0)
92
+ - Web UI with download command generation (PowerShell, wget, curl, bitsadmin, base64)
93
+ - File upload/exfiltration support
94
+ - Live activity logs via SSE
95
+
96
+ ## Requirements
97
+
98
+ - Python 3.8+
99
+ - Docker
100
+
101
+ ## License
102
+
103
+ MIT
@@ -0,0 +1,11 @@
1
+ pftp/__init__.py,sha256=BekRsZ1e9dYS5EwZ-GNTRFQswoM3-ZLiUHKKt8avY0w,173
2
+ pftp/__main__.py,sha256=OgFKe0aksr0dwPtmMSbvtSRrRaPrhWrtLmLhjIWdLGA,108
3
+ pftp/cli.py,sha256=-lSPBBRZb-6aLZx_27oPLZleRQuk9BI6YPmSadqsn9M,33491
4
+ pftp/config.py,sha256=9NBYpcd2xL021JHAymi_FANvodJfgOf8QEMZixEYfRE,5642
5
+ pftp/constants.py,sha256=X9F7MdIP0FKVAY1GkKrAWOz08KxDr1i4KBtFRHGd7Sk,758
6
+ pftp/docker_manager.py,sha256=q6L5wd52g3EbtlvC40ThsNb0zkgkCpO2W9fjVtU7u00,11812
7
+ pftp-2.0.1.dist-info/METADATA,sha256=dnoQZKrCYTC3kY6V51Pd4TVGn7FBFGfg6TyIK3g_m-w,2654
8
+ pftp-2.0.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
9
+ pftp-2.0.1.dist-info/entry_points.txt,sha256=Hp7IlQLGb30u4zTq3huSYls15Ecy9vw8tAxu5qf-79U,38
10
+ pftp-2.0.1.dist-info/top_level.txt,sha256=Dn7MXqEDhB-cK4jiVjMlh0Xu1pq1yuO3_BTNwyd7TSk,5
11
+ pftp-2.0.1.dist-info/RECORD,,
@@ -1,86 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: pftp
3
- Version: 2.0.0
4
- Summary: PFTP - Pentest File Transfer Protocols - CLI Tool
5
- Author-email: Ahmad Alawneh <a.3alawneh@gmail.com>
6
- License: MIT
7
- Keywords: pentest,file-transfer,security,hacking,ctf,ftp,CTF
8
- Classifier: Development Status :: 4 - Beta
9
- Classifier: Intended Audience :: Information Technology
10
- Classifier: License :: OSI Approved :: MIT License
11
- Classifier: Programming Language :: Python :: 3
12
- Classifier: Programming Language :: Python :: 3.8
13
- Classifier: Programming Language :: Python :: 3.9
14
- Classifier: Programming Language :: Python :: 3.10
15
- Classifier: Programming Language :: Python :: 3.11
16
- Classifier: Topic :: Security
17
- Requires-Python: >=3.8
18
- Description-Content-Type: text/markdown
19
- Requires-Dist: click>=8.0
20
- Requires-Dist: docker>=6.0
21
- Requires-Dist: pyyaml>=6.0
22
- Provides-Extra: dev
23
- Requires-Dist: build; extra == "dev"
24
- Requires-Dist: twine; extra == "dev"
25
-
26
- # PFTP CLI
27
-
28
- CLI tool for managing the PFTP (Pentest File Transfer Protocols) server.
29
-
30
- ## Installation
31
-
32
- ```bash
33
- pipx install pftp
34
- ```
35
-
36
- Or from source:
37
-
38
- ```bash
39
- cd cli
40
- pipx install .
41
- ```
42
-
43
- ## Quick Start
44
-
45
- ```bash
46
- # Install and configure
47
- pftp install
48
-
49
- # Start the server
50
- pftp start
51
-
52
- # Check status
53
- pftp status
54
-
55
- # Add tools
56
- pftp add-tool /path/to/linpeas.sh
57
-
58
- # View logs
59
- pftp logs
60
-
61
- # Stop the server
62
- pftp stop
63
- ```
64
-
65
- ## Commands
66
-
67
- - `pftp install` - Install and configure pftp
68
- - `pftp configure` - Reconfigure settings
69
- - `pftp start` - Start the server
70
- - `pftp stop` - Stop the server
71
- - `pftp restart` - Restart the server
72
- - `pftp status` - Show status and configuration
73
- - `pftp logs` - View server logs
74
- - `pftp update` - Update to latest Docker image
75
- - `pftp remove` - Uninstall pftp
76
- - `pftp add-tool` - Add files to tools directory
77
- - `pftp version` - Show version
78
-
79
- ## Requirements
80
-
81
- - Python 3.8+
82
- - Docker
83
-
84
- ## License
85
-
86
- MIT
@@ -1,11 +0,0 @@
1
- pftp/__init__.py,sha256=V9qkxhFeWzkx2PC5yjNuNREk-LwtdRWT0DDbKoOp6TQ,173
2
- pftp/__main__.py,sha256=OgFKe0aksr0dwPtmMSbvtSRrRaPrhWrtLmLhjIWdLGA,108
3
- pftp/cli.py,sha256=EjaOnWCERNMkKj3shEHI2DVBYxuJOGEsizL51Djrn5M,31422
4
- pftp/config.py,sha256=9NBYpcd2xL021JHAymi_FANvodJfgOf8QEMZixEYfRE,5642
5
- pftp/constants.py,sha256=X9F7MdIP0FKVAY1GkKrAWOz08KxDr1i4KBtFRHGd7Sk,758
6
- pftp/docker_manager.py,sha256=q6L5wd52g3EbtlvC40ThsNb0zkgkCpO2W9fjVtU7u00,11812
7
- pftp-2.0.0.dist-info/METADATA,sha256=RYlrFffAcq7KgBN2CU4G8k_XuC0kJh2tebGdGxSLojc,1816
8
- pftp-2.0.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
9
- pftp-2.0.0.dist-info/entry_points.txt,sha256=Hp7IlQLGb30u4zTq3huSYls15Ecy9vw8tAxu5qf-79U,38
10
- pftp-2.0.0.dist-info/top_level.txt,sha256=Dn7MXqEDhB-cK4jiVjMlh0Xu1pq1yuO3_BTNwyd7TSk,5
11
- pftp-2.0.0.dist-info/RECORD,,
File without changes