|
1 |
| -# Mirrorscript-v2 |
2 |
| -Script to change official Kali repository to mirrors. This helps increase packages update and downloading for some user. Please visit my blog [post](https://www.metahackers.pro/speed-kali-linux-update/). |
| 1 | +# Better Mirror |
3 | 2 |
|
4 |
| -## Requirements |
5 |
| -Kali Linux, |
6 |
| -Python3 |
| 3 | +```text |
| 4 | + ___ _____ _ ____ __ __ _ ___ ___ __ ___ |
| 5 | +| _ )__ / |_| |_|__ /_ _| \/ / | _ \ _ \/ \| _ \ |
| 6 | +| _ \|_ \ _| _||_ \ '_| |\/| | | / / () | / |
| 7 | +|___/___/\__|\__|___/_| |_| |_|_|_|_\_|_\\__/|_|_\ |
| 8 | +``` |
7 | 9 |
|
8 |
| -## Usage |
9 |
| -Run the script in privilege mode, such that `sources.list` could be edited. |
| 10 | +A Linux package that find the fastest mirror and configure apt to use that. |
10 | 11 |
|
11 |
| -## Help |
| 12 | +Just a fork of [IceM4nn/mirrorscript-v2](https://github.com/IceM4nn/mirrorscript-v2) |
| 13 | + |
| 14 | +## Installation |
| 15 | + |
| 16 | +```shell |
| 17 | +$ git clone https://github.com/heinthanth/better-mirror |
| 18 | +$ cd better-mirror |
| 19 | +$ chmod +x build.sh |
| 20 | +$ ./build.sh |
| 21 | +$ sudo dpkg -i better-mirror.deb |
12 | 22 | ```
|
13 |
| -# python3 mirrorscript-v2.py -h |
14 |
| -usage: mirrorscript-v2.py [-h] [-v] [-https] [-src] |
15 | 23 |
|
16 |
| -Kali Mirrorscripts-v2 by IceM4nn automatically select the best kali mirror |
17 |
| -server and apply the configuration |
| 24 | +## Help |
| 25 | + |
| 26 | +```shell |
| 27 | +$ sudo better-mirror -h |
| 28 | + |
| 29 | + ___ _____ _ ____ __ __ _ ___ ___ __ ___ |
| 30 | +| _ )__ / |_| |_|__ /_ _| \/ / | _ \ _ \/ \| _ \ |
| 31 | +| _ \|_ \ _| _||_ \ '_| |\/| | | / / () | / |
| 32 | +|___/___/\__|\__|___/_| |_| |_|_|_|_\_|_\\__/|_|_\ |
| 33 | +
|
| 34 | +better-mirror 1.0.0 - H31iUMx49 |
| 35 | +https://github.com/heinthanth/better-mirror |
18 | 36 |
|
19 |
| -optional arguments: |
20 |
| - -h, --help show this help message and exit |
21 |
| - -v, --verbose enable verbose output |
22 |
| - -https use HTTPS in apt transport (default HTTP) |
23 |
| - -src enable sources packages (default disable) |
| 37 | +
|
| 38 | +usage: better-mirror [option] [mode] |
| 39 | +
|
| 40 | +options: |
| 41 | + -c, --choose : perform mirror choosing |
| 42 | + -h, --help : display help message |
| 43 | + -s, --src : enable source repository |
| 44 | +
|
| 45 | +modes: |
| 46 | + -v, --verbose : enable verbose mode |
24 | 47 | ```
|
25 | 48 |
|
26 |
| -## Sample output: |
| 49 | +## Sample Output |
| 50 | +
|
| 51 | +```shell |
| 52 | +$ sudo better-mirror -v -c |
| 53 | + ___ _____ _ ____ __ __ _ ___ ___ __ ___ |
| 54 | +| _ )__ / |_| |_|__ /_ _| \/ / | _ \ _ \/ \| _ \ |
| 55 | +| _ \|_ \ _| _||_ \ '_| |\/| | | / / () | / |
| 56 | +|___/___/\__|\__|___/_| |_| |_|_|_|_\_|_\\__/|_|_\ |
| 57 | + |
| 58 | +better-mirror 1.0.0 - H31iUMx49 |
| 59 | +https://github.com/heinthanth/better-mirror |
| 60 | + |
| 61 | + |
| 62 | +[*] calculating the mirror latency ... |
| 63 | +[*] pinging kali.download ... latency 23.0 ms |
| 64 | +[*] pinging ftp.jaist.ac.jp ... latency 117.5 ms |
| 65 | +[*] pinging ftp.free.fr ... latency 213.5 ms |
| 66 | +[*] pinging ftp.belnet.be ... latency 222.5 ms |
| 67 | +[*] pinging mirror.neostrada.nl ... latency 223.75 ms |
| 68 | +[*] pinging mirror.serverius.net ... latency 218.25 ms |
| 69 | +[*] pinging ftp2.nluug.nl ... latency 232.75 ms |
| 70 | +[*] pinging mirrors.dotsrc.org ... latency 216.75 ms |
| 71 | +[*] pinging ftp1.nluug.nl ... latency 235.5 ms |
| 72 | +[*] pinging ftp.acc.umu.se ... latency 231.0 ms |
| 73 | +[*] pinging archive.linux.duke.edu ... latency 304.25 ms |
| 74 | +[*] pinging mirror.pwnieexpress.com ... latency 341.25 ms |
| 75 | +[*] pinging mirror-1.truenetwork.ru ... latency 322.5 ms |
| 76 | +[*] pinging mirror.karneval.cz ... latency 336.5 ms |
| 77 | +[*] pinging hlzmel.fsmg.org.nz ... latency 324.5 ms |
| 78 | +[*] pinging wlglam.fsmg.org.nz ... latency 330.75 ms |
| 79 | +[*] pinging archive-4.kali.org ... latency 252.0 ms |
| 80 | +[*] pinging mirrors.ocf.berkeley.edu ... latency 251.0 ms |
| 81 | +[*] pinging ftp.halifax.rwth-aachen.de ... latency 257.25 ms |
| 82 | +[*] pinging ftp.hands.com ... latency 197.0 ms |
| 83 | +[*] finding the best mirror ... |
| 84 | +[*] found! the selected mirror: kali.download ... latency 23.0 ms |
| 85 | +[*] backuping original /etc/apt/sources.list to /etc/apt/sources.list.bak |
| 86 | +[*] updating /etc/apt/sources.list |
| 87 | +[*] performing 'apt-get update' for you |
| 88 | +Hit:1 http://kali.download/kali kali-rolling InRelease |
| 89 | +Ign:2 http://dl.google.com/linux/chrome/deb stable InRelease |
| 90 | +Hit:3 http://dl.google.com/linux/chrome/deb stable Release |
| 91 | +Hit:4 http://packages.microsoft.com/repos/vscode stable InRelease |
| 92 | +Reading package lists... Done |
| 93 | +[*] Done! |
27 | 94 | ```
|
28 |
| -# python3 mirrorscript-v2.py -v -https -src |
29 |
| -
|
30 |
| -# |
31 |
| -# Mirrorscripts-v2 - By Hazmirul Afiq |
32 |
| -# Automatically select the best Kali mirror and apply the configuration |
33 |
| -# https://github.com/IceM4nn/mirrorscript-v2 |
34 |
| -# https://www.metahackers.pro/speed-kali-linux-update/ |
35 |
| -# |
36 |
| -
|
37 |
| -[-] Checking if 'apt-transport-https' package is installed. |
38 |
| - - apt-transport-https is installed |
39 |
| -
|
40 |
| -[+] Getting mirror list ... |
41 |
| -[+] Found a lists of mirrors: |
42 |
| - - https://hlzmel.fsmg.org.nz/kali |
43 |
| - - https://wlglam.fsmg.org.nz/kali |
44 |
| - - https://mirror.karneval.cz/pub/linux/kali |
45 |
| - - https://ftp.acc.umu.se/mirror/kali.org/kali |
46 |
| - - https://mirrors.dotsrc.org/kali |
47 |
| - - https://ftp.halifax.rwth-aachen.de/kali |
48 |
| - - https://ftp2.nluug.nl/os/Linux/distr/kali |
49 |
| - - https://ftp1.nluug.nl/os/Linux/distr/kali |
50 |
| - - https://mirror.neostrada.nl/kali |
51 |
| - - https://kali.download/kali |
52 |
| - - https://mirrors.ocf.berkeley.edu/kali |
53 |
| -
|
54 |
| -[+] Checking mirrors ... This could take some times. |
55 |
| -[+] Finding the best latency |
56 |
| - - hlzmel.fsmg.org.nz : 416.890 |
57 |
| - - wlglam.fsmg.org.nz : 388.998 |
58 |
| - - mirror.karneval.cz : 391.414 |
59 |
| - - ftp.acc.umu.se : 313.722 |
60 |
| - - mirrors.dotsrc.org : 314.235 |
61 |
| - - ftp.halifax.rwth-aachen.de : 291.252 |
62 |
| - - ftp2.nluug.nl : 297.838 |
63 |
| - - ftp1.nluug.nl : 302.336 |
64 |
| - - mirror.neostrada.nl : 294.256 |
65 |
| - - kali.download : 40.478 |
66 |
| - - mirrors.ocf.berkeley.edu : 348.848 |
67 |
| -
|
68 |
| -[+] Fastest mirror: ('kali.download', '040.478') |
69 |
| -[+] Preparing ... |
70 |
| - - Making a backup file /etc/apt/sources.list.bk ... |
71 |
| - - Checking sources.list for older entries ... |
72 |
| - - Commenting older entries ... |
73 |
| - - Done |
74 |
| -
|
75 |
| -[+] Updating sources.list with new entry ... |
76 |
| - - Your new mirror: https://kali.download/kali |
77 |
| -
|
78 |
| -[+] Done! |
79 |
| - - Run 'apt clean; apt update' for the changes to load. |
80 |
| -
|
81 |
| -``` |
|
0 commit comments