Skip to content

Shreshtha03/-Python-Based-Command-Terminal-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python-Based Web Command Terminal

A fully functional, web-based command terminal application built with Python and the Django framework. This project provides a browser-based interface to execute common system commands securely on the server.


Features ✨

  • Web-Based Interface: A clean, responsive terminal interface that runs directly in your browser.
  • Command Execution: Supports a whitelist of common commands for file and directory operations:
    • ls / dir: List directory contents.
    • cd: Change directory.
    • pwd: Print working directory.
    • mkdir: Create a new directory.
  • System Monitoring: Integrated with psutil to provide real-time system stats:
    • cpu: Displays current CPU usage.
    • mem: Displays current memory usage.
  • Dynamic Prompt: The command prompt dynamically updates to show the current working directory, providing an intuitive user experience.
  • Secure & Robust: Uses a command whitelist and Python's os module instead of direct shell execution to prevent security vulnerabilities.
  • Error Handling: Gracefully handles invalid or non-whitelisted commands with clear error messages.

Technology Stack 🛠️

  • Backend: Python, Django
  • System Interaction: os, psutil libraries
  • Frontend: HTML, CSS, JavaScript (Fetch API)
  • Communication: REST API with JSON

Getting Started 🚀

Follow these instructions to get a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • Python 3.8 or higher
  • pip (Python package installer)

Installation & Setup

  1. Install project dependencies:

    pip install django psutil
  2. Apply database migrations: (This sets up the initial database required by Django.)

    python manage.py migrate
  3. Run the development server:

    python manage.py runserver
  4. Open the application: Open your web browser and navigate to http://127.0.0.1:8000/. You should now see the web terminal interface, ready to accept commands.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published