Lekensteyn

Localized Live CD/USB hack

Jun 8th, 2011
1,895
0
Never
12
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. #!/bin/bash
  2. # http://askubuntu.com/q/47522/6969
  3. remove_other_lang=true
  4. cd "$(dirname "$(readlink -f "$0")")"
  5. bootcfg=
  6. [ -d isolinux ] && bootcfg=isolinux/isolinux.cfg
  7. [ -d syslinux ] && bootcfg=syslinux/syslinux.cfg
  8. if [ $(id -u) = 0 ]; then
  9. echo "** WARNING: you're running this script as root **"
  10. echo "The newly created file localized-init and directory locale-hack will be owned by root"
  11. fi
  12. if [ ! -s "$bootcfg" -o ! -s casper/filesystem.squashfs ]; then
  13. echo "Please copy this file $0 to the root directory of the Live USB / CD"
  14. exit 1
  15. fi
  16. read -p "Locale: " lang
  17. if ! apt-cache search 'language-pack-gnome-*' | grep -q "language-pack-gnome-$lang-base"; then
  18. echo "The language package could not be found"
  19. exit 1
  20. fi
  21. if [ ! -d locale-hack ]; then
  22. chmod u+w .
  23. mkdir locale-hack
  24. chmod u+w locale-hack
  25. fi
  26. echo "Root permissions are required to mount the squashfs"
  27. mountpoint=$(sudo mktemp -d)
  28. sudo mount -o loop casper/filesystem.squashfs $mountpoint
  29. names=$(grep -E "Filename: pool/main/l/[^/]+/(language-pack-gnome-$lang|language-pack-gnome-${lang}-base|language-pack-$lang|language-pack-${lang})" \
  30. $mountpoint/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_natty_main_binary-amd64_Packages \
  31. | cut -d' ' -f2)
  32. sudo umount $mountpoint
  33. sudo rmdir $mountpoint
  34. if [ -n "$names" ]; then
  35. remove_other_lang && rm -f locale-hack/*.deb
  36. mirror=archive.ubuntu.com
  37. host $lang.$mirror >/dev/null && mirror=$lang.$mirror
  38. for item in $names; do
  39. wget http://$mirror/ubuntu/$item -O locale-hack/$(basename $item)
  40. done
  41. printf "#!/bin/sh\ncp /cdrom/locale-hack/*.deb /var/cache/apt/archives && apt-get -y install language-pack-gnome-%s\nexec init\n" $lang > localized-init
  42. chmod u+w $bootcfg
  43. if grep -q 'init=/cdrom/localized-init' $bootcfg; then
  44. sed "s,locale=\S*,locale=$lang," -i $bootcfg
  45. else
  46. sed "s,--,locale=$lang init=/cdrom/localized-init --," -i $bootcfg
  47. fi
  48. else
  49. echo "Language packs not found!"
  50. fi
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • Exohozor
    39 days
    # CSS 0.85 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).
  • User was banned
Add Comment
Please, Sign In to add comment