Use at your own risk. # dd if=/dev/zero of=T bs=1024 count=10240;mkfs.ext3 -q T;E=$(echo 'read O;mount -o loop,offset=$O F /mnt;'|base64|tr -d '\n'); echo "E=\$(echo $E|base64 -d);eval \$E;exit;">F;cat <(dd if=/dev/zero bs=$(echo 9191-$(stat -c%s F)|bc) count=1) <(cat T;rm T)>>F 10240+0 records in 10240+0 records out 10485760 bytes (10 MB) copied, 0.127043 s, 82.5 MB/s T is not a block special device. Proceed anyway? (y,n) y 1+0 records in 1+0 records out 9104 bytes (9.1 kB) copied, 0.000116352 s, 78.2 MB/s (before executing next, make sure /mnt is empty and has nothing mounted, otherwise you can lose files) # bash F 9191 (I entered 9191, is the password, can be modified in the script) # l /mnt/ drwx------ 2 root root 12K Jan 31 02:33 lost+found/ # df -h Filesystem Size Used Avail Use% Mounted on ... /dev/loop0 9.7M 1.1M 8.1M 12% /mnt # mount ... /root/F on /mnt type ext3 (rw,relatime,data=ordered) # umount /mnt # head -1 F E=$(echo cmVhZCBPO21vdW50IC1vIGxvb3Asb2Zmc2V0PSRPIEYgL21udDsK|base64 -d);eval $E;exit; # E=$(echo cmVhZCBPO21vdW50IC1vIGxvb3Asb2Zmc2V0PSRPIEYgL21udDsK|base64 -d);echo $E (changed eval x echo) read O;mount -o loop,offset=$O F /mnt;
Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?
You must be signed in to comment.
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for:
root@sorry:/home/chris# read O;mount -o loop,offset=$O F /mnt;
mount: invalid offset '' specified