#garfield Logs
Feb 07 2024
#garfield Calendar
06:48 AM rue_mohr: all FF?
07:01 AM rue_mohr: 512 of them I think
07:01 AM rue_mohr: or is it 768
07:01 AM rue_mohr: your removing linux with windows?
09:13 AM polprog: dd if=/dev/zero of=/dev/sdX bs=512 size=1
09:14 AM polprog: that writes zeros but you can just use something else to generate 512 0xFFs into a file and use that as if
09:14 AM polprog: dd if=/dev/zero of=/dev/sdX bs=512 count=1
09:14 AM polprog: my bad ^
09:15 AM polprog: perl -e 'print chr(0xff)x512' | dd of=/dev/sdX bs=512 count=1
09:15 AM polprog: perl the ultimate obfuscated language
09:15 AM polprog: the x operator
09:21 AM aandrew: wow I haven't seen perl in forever
09:21 AM polprog: i wrote a few toy scripts in perl, it seems to have aimed to be what python is but for linux shell
09:22 AM aandrew: I mean I'd have done something like for a in `seq 1 255` ; do echo -ne \xff >> /tmp/512.bin ; done and then dd if=/tmp/512.bin of=/dev/sdX bs=512 count=1 I think
09:22 AM polprog: its the only language where "generate N times a given character" is quite short of a script
09:22 AM aandrew: yeah I was big into perl about 25y ago but got frustrated that if I left it alone for a month I'd forget everything
09:22 AM polprog: hm, i like that idea
09:23 AM polprog: i have the same experience with perl, id have to relearn it from scratch basically
09:23 AM polprog: i know the "print Ax50" trick because some tutorial on stack smashing used it to generate the exploit inputs
09:24 AM aandrew: whoa I just learned bash's printf %=
09:24 AM aandrew: printf '\xff%.0s' {1..100} might work
09:26 AM aandrew: printf '\xff%.0s' {0..255} > /tmp/x
09:26 AM aandrew: that works
09:26 AM aandrew: $ hexdump -C /tmp/x
09:26 AM aandrew: 00000000 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
09:26 AM aandrew: *
09:26 AM aandrew: 00000100
09:32 AM polprog: woah
09:32 AM polprog: that is pretty neat
10:25 PM Tom_L: turns out i didn't need to do tha
10:25 PM Tom_L: t