Install aria2

!apt-get install -y aria2
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libaria2-0 libc-ares2
The following NEW packages will be installed:
  aria2 libaria2-0 libc-ares2
0 upgraded, 3 newly installed, 0 to remove and 35 not upgraded.
Need to get 1,513 kB of archives.
After this operation, 5,441 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libc-ares2 amd64 1.18.1-1ubuntu0.22.04.3 [45.1 kB]
Get:2 http://archive.ubuntu.com/ubuntu jammy/universe amd64 libaria2-0 amd64 1.36.0-1 [1,086 kB]
Get:3 http://archive.ubuntu.com/ubuntu jammy/universe amd64 aria2 amd64 1.36.0-1 [381 kB]
Fetched 1,513 kB in 2s (779 kB/s)
Selecting previously unselected package libc-ares2:amd64.
(Reading database ... 126109 files and directories currently installed.)
Preparing to unpack .../libc-ares2_1.18.1-1ubuntu0.22.04.3_amd64.deb ...
Unpacking libc-ares2:amd64 (1.18.1-1ubuntu0.22.04.3) ...
Selecting previously unselected package libaria2-0:amd64.
Preparing to unpack .../libaria2-0_1.36.0-1_amd64.deb ...
Unpacking libaria2-0:amd64 (1.36.0-1) ...
Selecting previously unselected package aria2.
Preparing to unpack .../aria2_1.36.0-1_amd64.deb ...
Unpacking aria2 (1.36.0-1) ...
Setting up libc-ares2:amd64 (1.18.1-1ubuntu0.22.04.3) ...
Setting up libaria2-0:amd64 (1.36.0-1) ...
Setting up aria2 (1.36.0-1) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.8) ...
/sbin/ldconfig.real: /usr/local/lib/libtbbmalloc_proxy.so.2 is not a symbolic link

/sbin/ldconfig.real: /usr/local/lib/libtcm.so.1 is not a symbolic link

/sbin/ldconfig.real: /usr/local/lib/libtbbmalloc.so.2 is not a symbolic link

/sbin/ldconfig.real: /usr/local/lib/libtbbbind.so.3 is not a symbolic link

/sbin/ldconfig.real: /usr/local/lib/libtcm_debug.so.1 is not a symbolic link

/sbin/ldconfig.real: /usr/local/lib/libumf.so.0 is not a symbolic link

/sbin/ldconfig.real: /usr/local/lib/libur_adapter_level_zero.so.0 is not a symbolic link

/sbin/ldconfig.real: /usr/local/lib/libhwloc.so.15 is not a symbolic link

/sbin/ldconfig.real: /usr/local/lib/libur_loader.so.0 is not a symbolic link

/sbin/ldconfig.real: /usr/local/lib/libur_adapter_opencl.so.0 is not a symbolic link

/sbin/ldconfig.real: /usr/local/lib/libtbbbind_2_0.so.3 is not a symbolic link

/sbin/ldconfig.real: /usr/local/lib/libtbbbind_2_5.so.3 is not a symbolic link

/sbin/ldconfig.real: /usr/local/lib/libtbb.so.12 is not a symbolic link
# Create a download folder
!mkdir -p /content/downloads

# Example magnet link
magnet_uri = "https://cdimage.kali.org/kali-2025.1c/kali-linux-2025.1c-installer-amd64.iso.torrent"

# Start download
!aria2c --dir=/content/downloads --seed-time=0 "{magnet_uri}"

05/31 19:56:42 [NOTICE] Downloading 1 item(s)

05/31 19:56:42 [NOTICE] CUID#7 - Redirecting to https://kali.cs.nycu.edu.tw/kali-images/kali-2025.1c/kali-linux-2025.1c-installer-amd64.iso.torrent

05/31 19:56:42 [NOTICE] Download complete: /content/downloads/kali-linux-2025.1c-installer-amd64.iso.torrent

05/31 19:56:43 [NOTICE] IPv4 DHT: listening on UDP port 6989

05/31 19:56:43 [NOTICE] IPv4 BitTorrent: listening on TCP port 6941

05/31 19:56:43 [ERROR] IPv6 BitTorrent: failed to bind TCP port 6941
Exception: [SocketCore.cc:312] errorCode=1 Failed to bind a socket, cause: Name or service not known

05/31 19:56:43 [NOTICE] CUID#22 - Redirecting to https://kali.cs.nycu.edu.tw/kali-images/kali-2025.1c/kali-linux-2025.1c-installer-amd64.iso

05/31 19:57:29 [NOTICE] Seeding is over.

05/31 19:57:29 [NOTICE] Download complete: /content/downloads/kali-linux-2025.1c-installer-amd64.iso

05/31 19:57:29 [NOTICE] Your share ratio was 0.0, uploaded/downloaded=0B/4.1GiB

Download Results:
gid   |stat|avg speed  |path/URI
======+====+===========+=======================================================
7f9f40|OK  |   8.0MiB/s|/content/downloads/kali-linux-2025.1c-installer-amd64.iso.torrent
298cd1|OK  |    92MiB/s|/content/downloads/kali-linux-2025.1c-installer-amd64.iso

Status Legend:
(OK):download completed.
from google.colab import drive
import shutil

# Mount Google Drive
drive.mount('/content/drive')

# Copy downloaded files to Drive
shutil.copytree('/content/downloads', '/content/drive/MyDrive/TorrentDownloads', dirs_exist_ok=True)
Mounted at /content/drive
'/content/drive/MyDrive/TorrentDownloads'