Giter VIP home page Giter VIP logo

windows_link_reader's Introduction

Version C Version Version

██╗     ███╗   ██╗██╗  ██╗    ██████╗ ███████╗ █████╗ ██████╗ ███████╗██████╗ 
██║     ████╗  ██║██║ ██╔╝    ██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔════╝██╔══██╗
██║     ██╔██╗ ██║█████╔╝     ██████╔╝█████╗  ███████║██║  ██║█████╗  ██████╔╝
██║     ██║╚██╗██║██╔═██╗     ██╔══██╗██╔══╝  ██╔══██║██║  ██║██╔══╝  ██╔══██╗
███████╗██║ ╚████║██║  ██╗    ██║  ██║███████╗██║  ██║██████╔╝███████╗██║  ██║
╚══════╝╚═╝  ╚═══╝╚═╝  ╚═╝    ╚═╝  ╚═╝╚══════╝╚═╝  ╚═╝╚═════╝ ╚══════╝╚═╝  ╚═╝
                                                                              

LNK reader 🖥️

This program is designed to extract and open a file path from a Windows .lnk shortcut file on non-Windows systems. The program reads the binary content of the .lnk file, converts it into ASCII, attempts to find the longest valid path, and finally, tries to open the path using the system's default program.

Note: Older compilers may encounter issues with the use of the // style comments present in this code. If you're facing compilation issues, you might want to replace these comments with the traditional /* ... */ style. Alternatively, consider upgrading to a modern compiler version, such as GCC.

Capture.video.du.24-09-2023.01.32.40.webm

Note: In this video, it might seem slow because I was waiting for you to read the titles. This program opens .lnk links almost instantly, faster than Windows.




📋 Table of Contents

  1. Features
  2. Prerequisites
  3. Usage
  4. Recommendations
  5. Installation
  6. License
  7. Support & Questions

🌟 Features

  1. Binary to ASCII Conversion:

    • The program can convert binary data to its ASCII representation. This is especially handy for extracting textual information from binary data.
  2. RegEx-based Path Extraction:

    • Uses regular expressions to extract the longest valid file path from the ASCII representation of the .lnk file.
  3. OS Notification System:

    • Detects the underlying operating system (Linux or MacOS) and notifies the user using an appropriate notification mechanism if there are any errors or issues.
  4. Path Normalization:

    • Transforms any Windows-style backslashes in paths (\) to UNIX-style forward slashes (/), ensuring compatibility with non-Windows systems.
  5. Mounted Path Detection:

    • If the direct path extracted from the .lnk file doesn't exist on the file system, the program will attempt to find a corresponding mounted path (useful for systems with mounted Windows filesystems).
  6. Default System Program Path Opening:

    • Once a valid path is identified, the program attempts to open it using the default program of the OS. If the path is not directly accessible, it will try to open its parent directory.
  7. Fast install :

    • You can install it faster with the script setup.sh

🔍 Prerequisites

Before you begin, ensure you have the following installed:

  • GCC (GNU Compiler Collection) to compile the source code.
  • Linux or macOS (other Unix-like systems may work but are not officially supported).

💎 Recommendations

In your quest for more tools to enhance your desktop productivity, these additional repositories are worth a look:

  • File organizer : A versatile tool for sorting and organizing files efficiently, ideal for managing recovered data.

Looking for more? Discover user-friendly, GUI-free script here:

If you're a 3D animator, consider:

📥 Installation

LINUX Systems:

  1. Simply run setup.sh in same directory where is lnkReader.c
    chmod +x setup.sh
    then right click, execute or
    ./setup.sh

But if you prefere a manual installation you can follow steps behind :

  1. Clone the repository:

    git clone https://github.com/SECRET-GUEST/windows_link_reader.git
  2. Navigate to the project folder:

    cd REPOSITORY
  3. Compile the program:

    gcc lnkReader.c -o open_lnk
  4. Try the program:

    ./open_lnk YOUR_FILE.lnk

Debian Systems - Creating a .desktop Application to run lnk by simple click

  1. Create a new .desktop file:
    vim ~/.local/share/applications/open_lnk.desktop

Note: use vim nano or whatever else txt editor

  1. Add the following content to the file, adjusting paths as necessary:

    [Desktop Entry]
    Version=1.0
    Name=Open LNK
    Comment=Open a Windows .lnk file
    Exec=/path_to_compiled_program/open_lnk %U
    Terminal=true
    Type=Application
    Categories=Utility;
    
  2. Make the .desktop file executable:

    chmod +x ~/.local/share/applications/open_lnk.desktop
  3. Now, you just have to use the program by default for .lnk files, by "open with" or in the properties.

MacOS Systems:

I don't know why am I doing this tutorial but let's go ;
  1. Ensure you have the Xcode command line tools installed. This provides you with the necessary compilers:

    xcode-select --install
  2. Compile the program as indicated in the General Setup.

  3. To run the program, you can use the Terminal as in the General Setup or create a simple script or Automator application for easier access.

📜 License

This repository is released under the MIT License. Please see the LICENSE file for more information.

❓ Support & Questions

If you have any questions or need support, please feel free to open an issue, a new discussion, or join my twitter.

     _ ._  _ , _ ._            _ ._  _ , _ ._    _ ._  _ , _ ._      _ ._  _ , _ .__  _ , _ ._   ._  _ , _ ._   _ , _ ._   .---.  _ ._   _ , _ .__  _ , _ ._   ._  _ , _ ._      _ ._  _ , _ .__  _ , _ . .---<__. \ _
   (_ ' ( `  )_  .__)        (_ ' ( `  )_  .__ (_ ' ( `  )_  .__)  (_ '    ___   ._( `  )_  .__)  ( `  )_  .__)   )_  .__)/     \(_ ' (    )_  ._( `  )_  .__)  ( `  )_  .__)  (_ ' ( `  )_  ._( `` )_  . `---._  \ \ \
 ( (  (    )   `)  ) _)    ( (  (    )   `)  ) (  (    )   `)  ) _ (  (   (o o) )     )   `)  ) _    )   `)  ) _    `)  ) \.@-@./(  (    )   `)     )   `)  ) _    )   `)  ) _ (  (    )   `)         `) ` ),----`- `.))  
(__ (_   (_ . _) _) ,__)  (__ (_   (_ . _) _) _ (_   (_ . _) _) ,__ (_   (  V  ) _) (_ . _) _) ,_  (_ . _) _) ,_ . _) _) ,/`\_/`\ (_   (  . _) _) (_ . _) _) ,_  (_ . _) _) ,__ (_   (_ . _) _) (__. _) _)/ ,--.   )  |
    `~~`\ ' . /`~~`           `~~`\ ' . /`~~`   `~~`\ ' . /`~~`     `~~`/--m-m- ~~`\ ' . /`~~`   `\ ' . /`~~`  `\ ' . /  //  _  \\ ``\ '  . /`~~`\ ' . /`~~`   `\ ' . /`~~`     `~~`\ ' . /`~~`\ ' . /`~~/_/    >     |
         ;   ;                     ;   ;             ;   ;               ;   ;      ;   ;          ;   ;         ;   ;  | \     )|_   ;    ;      ;   ;          ;   ;               ;   ;      ;   ;    |,\__-'      |
         /   \                     /   \             /   \               /   \      /   \          /   \         /   \ /`\_`>  <_/ \  /    \      /   \          /   \               /   \      /   \     \__         \
________/_ __ \___________________/_ __ \___________/_ __ \______ __ ___/_ __ \____/_ __ \________/_ __ \_______/_ __ \\__/'---'\__/_/_  __ \____/_ __ \________/_ __ \_____ _______/_ __ \____/_ __ \____ __\___      )

windows_link_reader's People

Contributors

secret-guest avatar

Watchers

 avatar

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.