A simple telnet server that allows clients to browse files and directories in a secure, sandboxed environment.
- Python 3.6 or higher
-
Basic usage (current directory as root):
python3 telnet_file.py
When prompted, press Enter to use the current directory, or specify a path.
-
Specify root directory as command line argument:
python3 telnet_file.py /path/to/your/directory
-
Example:
python3 telnet_file.py /home/user/Documents
Once the server is running, you can connect using any telnet client:
telnet localhost 2323ls [path]- List directory contentscd [path]- Change directorycat <file>- Display file contentspwd- Show current directoryhelp- Show help messagequitorexit- Disconnect from server
Press Ctrl+C in the terminal where the server is running.
The server only allows access to files within the specified root directory. Clients cannot access files outside this sandboxed environment.