Skip to content

A simple command line tool in Rust to extract magnet links from Aria2c control files (.aria2).

License

Notifications You must be signed in to change notification settings

lyz1990/aria2-magnet-extract

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aria2 Magnet Extract

This is a simple command line tool for extracting the magnet link from an Aria2 control file. Use it to recover magnet links when aria2c download was interrupted, but the original link was lost. It is written for educational purposes and to demonstrate the usage of Rust programming language.

Usage

aria2_magnet_extract <path-to-aria2-file>

Output

magnet:?xt=urn:btih:<hash>

Build and Run

You can use cargo run -- <path-to-aria2-file> to build and run the project.

Note

  • This tool only works with files that have a '.aria2' file extension.
  • This project is for educational purpose, and similar functionality can be achieved by using the Linux command
    url=$(echo "magnet:?xt=urn:btih:$(xxd -p -seek 10 -l 20 'test.aria2')")
    aria2c -c $url
  • For more detailed information about the '.aria2' file format, please refer to the official documentation at https://aria2.github.io/manual/en/html/technical-notes.html

About

A simple command line tool in Rust to extract magnet links from Aria2c control files (.aria2).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages