How to check all Details, encrypt or decrypt any PDF file using command line Android Termux [Also work for non-rooted devices]

in #utopian-io6 years ago (edited)

DISCLAIMER

This Tutorial is made for educational purpose only, I didn't harm anyone everything shown an used in this Tutorial for testing belongs to me such as the computer, smartphone and my website. Every Tutorial on utopian.io is made to teach people how to stay safe and help others for making them safe.
HACKING, CRACKING, STEALING OR ANY SUCH KIND OF ACTIVITY IS A CYBER CRIME WHICH CAN LAND YOU IN JAIL. I DO NOT SUPPORT ANY SUCH KIND OF ACTIVITY

Introduction

peepdf is a Python tool to explore PDF files in order to find out if the file can be harmful or not. With peepdf it's possible to see all the objects in the document showing the suspicious elements, supports the most used filters and encoding, it can use to encode, encrypt or decrypt a PDF file. Some time the Decrypt command give error so i provide a Alternative way to Unlock the Locked PDF.

What Will I Learn?

  • How to check deep details of any PDF File.
  • How to Encrypt PDF with custom Password.
  • How to Decrypt PDF

Requirements

Difficulty

  • Intermediate

How to setup peepdf in Termux

  • 1: Run Termux and execute the command type pkg update && pkg upgrade && pkg install python2 && pkg install git and press Enter.

1.png

  • 2: Now type command cd peepdf and press Enter.

cd pee.png

  • 3: Now type command chmod +x peepdf.py and Press Enter

chmod.png

  • 4: Type command python2 peepdf.py -i and press Enter.
    -i.png
How to check details of a PDF
  • 1: Type commandopen/sdcard/FileName.pdf . Here FileName.pdf is the name of your PDF File with .pdf extension. In my case file name is "name.pdf".

open.png

  • 2: This will open the PDF file and give all its detail.

open detail.png

  • 3: Now you can check more detail by typing the command tree
    tree.png
How to encrypt PDF
  • 1: After open the PDF as describes above, then type command encrypt Yourpassword Here "YourPassword" is Password for PDF file to open. In my case i chose "1234"

encrypt.png

  • 2: Now type command save and press Enter.
    save.png
  • Your PDF file is now password protected
    password protec now.png
How to decrypt
  • 1: First open the file again by command open -f /sdcard/FileName.pdf and press Enter.

-f.png

  • 2: Then type command decrypt YourPassword and press Enter. Password must be the same as set to encrypt the same PDF.

decrypt.png

  • If this decrypting method gives error you can use simple use PDF Unlocker App.(Link in Requirements)
How to unlock with PDF Unlocker
  • 1: Install and Run the app and click on 'OPEN PDF' and select your encrypted file

click on open.png

  • Select the file

  • sdcard.png
    select file.png

    • 2: Type the password to open encrypted PDF and then click on "back-key" once and click on "Unlock". This will save a unlocked PDF file in the same directory
      type pass.png

    • After click the back-key once click on Unlock
      unlock.png

    • And then click on OK
      ok.png

    • 3: Your file is now decrypted and saved in the same directory
      unlock file.png

    unlock file 1.png

    Curriculum

    How to setup and run python and C++ in Android Termux

    Tutorial 1: How to download, Install, Run and Use Fish-shell in Termux [Also work for non-rooted devices]

    Tutorial 2: How to make a call and send SMS using Android Termux

    Tutorial 3: How to install SQLmap in Android Termux [Also work for non-rooted devices]

    Tutorial 4: How to Trace exact IP Location on Android Termux [Also work for non-rooted devices]



    Posted on Utopian.io - Rewarding Open Source Contributors

    Sort:  

    @faisalamin, No matter approved or not, I upvote and support you.

    Thanks Dear. Thanks all !

    Thank you for the contribution. It has been approved.

    You can contact us on Discord.
    [utopian-moderator]

    Hey @faisalamin I am @utopian-io. I have just upvoted you!

    Achievements

    • You have less than 500 followers. Just gave you a gift to help you succeed!
    • Seems like you contribute quite often. AMAZING!

    Suggestions

    • Contribute more often to get higher and higher rewards. I wish to see you often!
    • Work on your followers to increase the votes/rewards. I follow what humans do and my vote is mainly based on that. Good luck!

    Get Noticed!

    • Did you know project owners can manually vote with their own voting power or by voting power delegated to their projects? Ask the project owner to review your contributions!

    Community-Driven Witness!

    I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

    mooncryption-utopian-witness-gif

    Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

    Coin Marketplace

    STEEM 0.20
    TRX 0.12
    JST 0.028
    BTC 64382.51
    ETH 3501.74
    USDT 1.00
    SBD 2.53