← Home ← Back to /g/

Thread 106269255

33 posts 12 images /g/
Anonymous No.106269255 >>106269265 >>106270829 >>106270946 >>106270980 >>106271180 >>106274586 >>106274694 >>106274712
Reminder to re-encode your 4chan images to wipe any embedded data.
Anonymous No.106269265 >>106269623 >>106269650
>>106269255 (OP)
how do you see the embedded data?
Anonymous No.106269272 >>106274483
you already posted this
Anonymous No.106269284
i convert everything to pdf
Anonymous No.106269623 >>106269650
>>106269265
I second this.
Anonymous No.106269650 >>106270946 >>106270960 >>106270980
>>106269265
>>106269623
To see them while they're on 4chan, you need a userscript. To see any embedded data on saved files on your computer, there is no reliable way. It's easier to just bulk re encode all pngs and jpgs to lower quality jpgs.
Anonymous No.106270829
>>106269255 (OP)
wait is someone using my steganography software to embed shit? someone wrote a userscript for it?
neat
I would like to see that
Anonymous No.106270946 >>106271108
>>106269255 (OP)
>>106269650
Why not preserve the file format? anyway, how can I bulk re encode all my maymays? I use Arch btw
Anonymous No.106270960 >>106271108
>>106269650
they are on your computer regardless because you see them, and browser has to store them somewhere
Anonymous No.106270980 >>106274412
>>106269255 (OP)
>>106269650
my embedding technique stores the LSB of each color channel such that the rgb values add up to 1 byte, rrrggbbb it requires a lossless format to work properly, why would you want to destroy the embedded data though? it's a way to share files undetectable, I'm working on a new version that will be much faster and once encrypted and compressed will be able to store about 3 times as much data, whole megabytes shoved into a photo of a tree without anyone being able to spot it
Anonymous No.106271108 >>106271403 >>106275824
>>106270960
If you have cache and swap disabled the data will stay in memory and not be written to disk.

>>106270946
I think png might preserve some of the data so jpg is a safer bet. Not sure though. You can turn them back into pngs after. On Linux you can do this with imagemagick

for img in *.jpg *.png; do
magick "$img" -strip -quality 85 "${img%.*}.jpg"
done
Anonymous No.106271180 >>106271268 >>106275824
>>106269255 (OP)
Is there loli hentai stored in the pepes? Am I missing something?
Anonymous No.106271268 >>106271286 >>106275824
>>106271180
people use filenames to link to catbox but janjan and mods dont like that
Anonymous No.106271286 >>106271295 >>106272494
>>106271268
Like this?
Anonymous No.106271295
>>106271286
something like that
Anonymous No.106271403
>>106271108
i am being ignored, ya'll are some government bots trying to scare people into not sharing data
fucking government crackdown is coming and you wont be able to have no no thoughts
Anonymous No.106272438 >>106273304
Anonymous No.106272494
>>106271286
Are knees the new hands?
Anonymous No.106273304
>>106272438
I'll never understand the fixation with embedded monkey torture.
Anonymous No.106274412
>>106270980
ive seen some git project that uses 16bpc/64bpp png for steganography. that would mean you can wrap 2 full quality 8bpc/32bpp png inside a 16bpc/64bpp png.

but does 4chan supports 16bpc png?
Anonymous No.106274483
>>106269272
Bro this is 4chan we do the same thing every single day forever
Anonymous No.106274586 >>106275884
>>106269255 (OP)
is this embedded data harmful? am I in danger?
Anonymous No.106274620
I've nothing to hide.
Anonymous No.106274694 >>106275662
>>106269255 (OP)
Has anyone ever embedded a Youtube Poop to an image?
Anonymous No.106274712 >>106275824
>>106269255 (OP)
just take a screenshot instead.
even if its steno'd, manually screenshotting makes the image a pixel or so wider or narrower (its never perfect) so unless it fits on one line its ruined.
Anonymous No.106275662 >>106275726 >>106275741
>>106274694
A few years back there were a couple of threads about embedding video (with audio) into images, e.g. >>82552620. It ended up with images drawn using transparency containing video data in the color values. You can use
ffmpeg -i file.png -pix_fmt rgb24 -f rawvideo - | mpv -

to play this video in mpv.
Anonymous No.106275726
>>106275662
Oh, that does remind me, Cloudflare's image optimization, now used by 4chan, can mess with steganography in images with transparency; it erases the color values of entirely transparent pixels, in this case resulting in corruption in the video. You can get the original image without optimization by opening it in a new tab (or copying the URL), then appending any parameter to it.

https://i.4cdn.org/g/1755302913908700.png

gives you the optimized version.
https://i.4cdn.org/g/1755302913908700.png?original=true

gives the exact image I uploaded.
Anonymous No.106275741 >>106275775
>>106275662
give me a tl;dr for how this image was created please, i want to summarize it into a blogpost
Anonymous No.106275775 >>106275856 >>106276057
>>106275741
Convert image to grayscale, resize as needed, use grayscale image for alpha, then just write the data as color values.

import os, sys, math
from PIL import Image, ImageOps

if len(sys.argv) < 4:
print('Example: file2png input image out')
exit()

if not os.path.isfile(sys.argv[1]):
print('I can\'t find ' + sys.argv[1])
exit()

if not os.path.isfile(sys.argv[2]):
print('I can\'t find ' + sys.argv[2])
exit()

# load input
data = bytearray(open(sys.argv[1], 'rb').read())

# load overlay and convery to grayscale
overlayImg = Image.open(sys.argv[2])
overlayImg = ImageOps.grayscale(overlayImg)

# calculate width and height for output image in overlay's aspect ratio
pixelCnt = math.ceil(len(data)/3)
pixelCntRoot = pixelCnt**0.5
aspect = overlayImg.size[0] / overlayImg.size[1]
aspectRoot = aspect**0.5
width = math.ceil(pixelCntRoot * aspectRoot)
height = math.ceil(pixelCntRoot / aspectRoot)

# pad the input
padding = (width*height - pixelCnt)*3 + 3
data.extend([0] * padding)

# create image from data
dataImg = Image.frombytes('RGB', (width, height), bytes(data))

# scale overlay to match image from data
overlayImg = overlayImg.resize((width, height), Image.BICUBIC)

# split image channels
r, g, b = dataImg.split()
a = overlayImg.split()[0]

# change 0 alpha bytes into 1 alpha bytes to prevent optimization from removing rgb values
apixels = a.load()
for i in range(a.size[0]):
for j in range(a.size[1]):
if apixels[i,j] == 0:
apixels[i,j] = 1

# create output image using previously split channels
finalImg = Image.merge('RGBA', (r, g, b, a))

# save image
finalImg.save(sys.argv[3] + '.png')

(I didn't write the script.)
Anonymous No.106275824
>>106271108
>You can turn them back into pngs after.
Don't do that. Saving as JPG reduces quality and introduces artifacts.

>>106271180
They're embedding links to various things, including apparently CP nowadays. The shitposters don't embed the actual data, though it is possible to do so.

>>106271268
They're embedding it in the image itself now (and have been doing so for a long time). Not sure why they're not just putting the IDs in the names instead.

>>106274712
>manually screenshotting makes the image a pixel or so wider or narrower (its never perfect)
What the hell kind of screenshot tool are you using? A proper lossless screenshot of a full-size image should have a 1:1 copy of the image's color values. The only things you're losing are transparency and metadata.
Anonymous No.106275856 >>106276057
>>106275775
i only know C/bash but somewhat understand this, thanks
also, what here opens a fucking area selector, and why?
>manpage?
>stdin
>providing files to it as args?
>usecase unclear.
Anonymous No.106275884
>>106274586
Aside from the usual danger of the poster embedding some pizza, not really
I may be doubting how retarded the autists on here can be, but I doubt someone is gonna waste a RCE through image files on this shit hole.
Anonymous No.106276057
>>106275856
>>106275775
i forgot about the #!/bin/python, fixed this
i also fixed other things and improved it a little
#!/usr/bin/python
import os, sys, math
from PIL import Image, ImageOps

if len(sys.argv) < 4:
print('Example: python ' + sys.argv[0] + ' input.mp4 input.png output.png')
exit()

if not os.path.isfile(sys.argv[1]):
print('I can\'t find ' + sys.argv[1])
exit()

if not os.path.isfile(sys.argv[2]):
print('I can\'t find ' + sys.argv[2])
exit()

# load input
data = bytearray(open(sys.argv[1], 'rb').read())

# load overlay and convert to grayscale
overlayImg = Image.open(sys.argv[2])
overlayImg = ImageOps.grayscale(overlayImg)

# calculate width and height for output image in overlay's aspect ratio
pixelCnt = math.ceil(len(data)/3)
pixelCntRoot = pixelCnt**0.5
aspect = overlayImg.size[0] / overlayImg.size[1]
aspectRoot = aspect**0.5
width = math.ceil(pixelCntRoot * aspectRoot)
height = math.ceil(pixelCntRoot / aspectRoot)

# pad the input
padding = (width*height - pixelCnt)*3 + 3
data.extend([0] * padding)

# create image from data
dataImg = Image.frombytes('RGB', (width, height), bytes(data))

# scale overlay to match image from data
overlayImg = overlayImg.resize((width, height), Image.BICUBIC)

# split image channels
r, g, b = dataImg.split()
a = overlayImg.split()[0]

# change 0 alpha bytes into 1 alpha bytes to prevent optimization from removing rgb values
apixels = a.load()
for i in range(a.size[0]):
for j in range(a.size[1]):
if apixels[i,j] == 0:
apixels[i,j] = 1

# create output image using previously split channels
finalImg = Image.merge('RGBA', (r, g, b, a))

# save image
finalImg.save(sys.argv[3])

# output howto
print('ffmpeg -i ' + sys.argv[3] + ' -pix_fmt rgb24 -f rawvideo - | mpv -')

anyway,
curl -s https://files.catbox.moe/zjgk5n.png -o - | ffmpeg -i - -pix_fmt rgb24 -f rawvideo - | mpv -