Aug 02

CyIPList

Posted by Secretss at 3:56 AM in Uncategorized | Add comments

CyIPlist

You will need APT 0.7 Strict, gawk, and grep installed from Cydia. The script installs the latter two items for you. Put the file in /usr/bin and set access permissions to:

Run in Terminal as cyiplist. Output file: /var/mobile/cyiplist.txt

For the absolutely barebones version (v1.0), run
rm -f /var/mobile/cyiplist.txt
echo "$(cat /private/var/lib/dpkg/status | grep "Name:" | awk '{$1=""; print $0}')" >> /var/mobile/cyiplist.txt
sort -f "/var/mobile/cyiplist.txt" -o "/var/mobile/cyiplist.txt"
echo -e "$(cat /var/mobile/cyiplist.txt)\n\n$(cat "/var/mobile/cyiplist.txt" | wc -l) installed packages listed in /var/mobile/cyiplist.txt.\n"
rm -f /var/mobile/cyiplist_tmp

The above snippet works without APT 0.7 Strict, but previously uninstalled packages may get listed and some developer packages without a Name: header will not.

Screenshot:

Changelog:
v1.0.0 – Initial. Did not list developer packages without a name header.
v1.0.1 – Listed all packages. Too many packages.
v1.0.2 – Added cache cleaning and removal of unused packages.
v1.0.2 – Removed gsc.* and cy+* packages from list.
v1.0.2 – Removed uninstalled packages from list.
v1.1.0 – Cleaned the dpkg status file to remove “purge ok not-installed” entries.
v1.1.0 – Fixed empty lines in list and over counting of installed packages.
v1.1.0 – Added option to run apt-get functions from one command (cyiplist apt-get). Bugged.
v1.1.1 – Fixed bug introduced in v1.1.
v1.1.2 – Cleaned the dpkg status file to remove “purge ok not-installed” entries.
v1.1.1 – Fixed empty lines in list and over counting of installed packages.
v1.1.2 – Added option to run apt-get functions from one command (cyiplist apt-get).

Leave a Reply

preload preload preload
Content copyright © 2009 - 2010 Secretss except where otherwise stated. Powered by WordPress.