Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a download of a higher version of glibc #20

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 3 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,16 @@ check supported packages. remember to run `update_list` at first.
2.23-0ubuntu10_amd64
2.23-0ubuntu10_i386
2.23-0ubuntu11_amd64
2.23-0ubuntu11_i386
2.23-0ubuntu3_amd64
2.23-0ubuntu3_i386
2.27-3ubuntu1_amd64
2.27-3ubuntu1_i386
2.28-0ubuntu1_amd64
2.28-0ubuntu1_i386
......

➜ glibc-all-in-one cat old_list
2.21-0ubuntu4.3_amd64
2.21-0ubuntu4.3_amd64
2.21-0ubuntu4_amd64
2.21-0ubuntu4_amd64
2.24-3ubuntu1_amd64
2.24-3ubuntu1_amd64
2.24-3ubuntu2.2_amd64
2.24-3ubuntu2.2_amd64
2.24-9ubuntu2.2_amd64
2.24-9ubuntu2.2_amd64
......

➜ glibc-all-in-one chmod 777 ./download_all_glibc
➜ glibc-all-in-one ./download_all_glibc
```

download.
Expand Down
24 changes: 8 additions & 16 deletions extract
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,21 @@ usage() {
}

extract() {
local deb=`readlink -f $1`
local deb=$1
local out=$2
if [ ! -d "$out" ]; then
mkdir $out
fi
local tmp=`mktemp -d`

cd $tmp
ar xv $deb || die "ar failed"
if [ -f "data.tar.zst" ];then
tar -I zstd -xf data.tar.* || die "tar failed"
else
tar xf data.tar.* || die "tar failed"
fi
cd -
dpkg -x $deb $tmp || die "dpkg failed"

cp -rP $tmp/lib/*/* $out 2>/dev/null \
|| cp -rP $tmp/lib32/* $out 2>/dev/null \
|| cp -rP $tmp/usr/lib/debug/lib/*/* $out 2>/dev/null \
|| cp -rP $tmp/usr/lib/debug/lib32/* $out 2>/dev/null \
|| cp -rP $tmp/usr/lib/debug/.build-id $out 2>/dev/null \
|| die "Failed to save. Check it manually $tmp"

|| cp -rP $tmp/lib32/* $out 2>/dev/null \
|| cp -rP $tmp/usr/lib/debug/lib/*/* $out 2>/dev/null \
|| cp -rP $tmp/usr/lib/debug/lib32/* $out 2>/dev/null \
|| cp -rP $tmp/usr/lib/debug/.build-id $out 2>/dev/null \
|| die "Failed to save. Check it manually $tmp"
rm -rf $tmp
}

Expand Down
12 changes: 11 additions & 1 deletion update_list
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ def get_list(url, arch):
content = str(requests.get(url).content)
return re.findall('libc6_(2\.[0-9][0-9]-[0-9]ubuntu[0-9\.]*_{}).deb'.format(arch), content)


common_list = get_list(common_url, 'amd64')
common_list += get_list(common_url, 'i386')

Expand All @@ -21,6 +20,11 @@ with open('list', 'w') as f:

print('[+] Common list has been save to "list"')

with open('download_all_glibc', 'w') as f:
f.write('#!/bin/bash'+'\n')
for l in sorted(set(common_list)):
f.write('./download '+ l + '\n')

old_list = get_list(old_url, 'amd64')
old_list += get_list(old_url, 'i386')

Expand All @@ -29,3 +33,9 @@ with open('old_list', 'w') as f:
f.write(l + '\n')

print('[+] Old-release list has been save to "old_list"')

with open('download_all_glibc', 'a') as f:
for l in sorted(set(common_list)):
f.write('./download_old '+ l + '\n')

print('[+] Download script has been save to "Download_All_glibc"')