Giter Site home page Giter Site logo

chunkboi / pnr-status Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 1.0 88 KB

Check the PNR status for Indian Railways using the EaseMyTrip and MakeMyTrip API

License: MIT License

Python 100.00%
api bot irctc irctc-pnr-status pnr-bot pnr-status makemytrip

pnr-status's Introduction

PNR Status Checker

This script allows you to check the status of a Passenger Name Record (PNR) for Indian Railways. It performs the following tasks:

  1. Accepts a 10-digit PNR number from the user.
  2. Encrypts the PNR number using AES CBC encryption with PKCS7 padding.
  3. Sends a POST request to the https://railways.easemytrip.com/Train/PnrchkStatus API endpoint with the encrypted PNR.
  4. Parses the response from the API and prints the formatted PNR status information, including boarding station, destination station, quota, class name, train number, train name, date of journey, and passenger details.
  5. Displays the total time taken to complete the program execution.

Prerequisites

To run this script, you need to have the following:

How to Use

  1. Clone the repository or download the script file (PNR_STATUS.py).
  2. Open a terminal or command prompt.
  3. Navigate to the directory where the script is located.
  4. Run the script using the command: python PNR_STATUS.py.
  5. Follow the prompts to enter the 10-digit PNR number when prompted.

Automatic Package Installation

If the required packages (cryptography and requests) are not already installed on your system, the script will attempt to install them automatically.

Note: This automatic installation requires an internet connection and assumes that pip is available and associated with the correct Python interpreter on your system.

If you encounter any issues with the automatic package installation, you can manually install the required packages using the following commands: pip install cryptography requests

CodeQL OSSAR Codacy Security Scan CodeFactor DeepSource

DISCLAIMER

Author is not responsible for any losses incurrred to any individual, company or property either directly or indirectly as a result of using this script. Also, there is no warranty of any kind with this script.

pnr-status's People

Contributors

chunkboi avatar deepsource-autofix[bot] avatar deepsourcebot avatar harsiddhdave44 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

shivesh96

pnr-status's Issues

Need a Valid PNR

Hello Everyone,

I am gonna need a valid PNR to test out the response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.