By now the check update of Parrot is still apt update. It is annoying because it ask user to check, ask
sudo password, get new data, check if there is any package changes.
I’m a super lazy person. I don’t like clicking
Yes, waiting and then typing password then… wait again at all. And using
sudo mean complex password = high chance you type it wrong.
So let’s make it be simple:
- Every branch of Linux repo has an
Indexfile which has many information like last update date, file checksum, …
apt updatedownload this file to your local disk then check packages are updated by checking checksum
-> Check for update can be done by check if there is any change on repo only instead of whole steps
How can we do it?
- Get the URL and branch from source list. The URL should start by
debfor packages and
deb-srcfor source code of packages
- Generate local path to read from local disk
- Generate URL to check from server
- Compare data (usually Date) -> Parse information from data by checking syntax in file then get the text.
The code: https://nest.parrotsec.org/dmknght/linupdatecheck/
This is demo code. The actual code should do more, like show system’s notification about result and handle if check mirror has any error (switch to main address).