当前位置:网站首页>Tempest HDMI leak reception 4

Tempest HDMI leak reception 4

2022-07-01 11:06:00 Lao Shao's open source world

Next we start to optimize the picture

First of all, I changed the line feed position , It was 463 New line , Almost a line repeats 8 Repeated pictures . I put 463/8 obtain 58.

stay x>=58 Change the line .

from pylab import *
from rtlsdr import *
import cv2

sdr = RtlSdr()
# configure device
sdr.sample_rate = 1.951047e6
sdr.center_freq = 395.991e6
sdr.gain = 60
# init for opencv
x = 0
y = 0
img=np.zeros((600,600,1), np.uint8)

while True:
    samples = sdr.read_samples(1024*100) #type(sample) is numpy.complex128
    
    for sample in samples:
        mag = np.sqrt( sample.imag * sample.imag + sample.real * sample.real)
        value = mag * 255 * 10
        img[y, x] = value

        x = x + 1
        if (x >= 58):
            x = 0
            y = y + 1
        if (y >= 500):
            y = 0

    cv2.imshow("HDMI", img)
    if(cv2.waitKey(10)==27):
        break

sdr.close()

You can see that there is only one picture left , But the width of the picture narrows , It looks deformed .

At this time, I will interpolate the pixels in each row , Repeat to the right for each pixel 10 All over , You can get the following results :

It can be seen that the screen is enlarged , Basically, the display interface corresponds to 1 A screen leak .

The code of line difference is as follows :

from pylab import *
from rtlsdr import *
import cv2

sdr = RtlSdr()
# configure device
sdr.sample_rate = 1.951047e6
sdr.center_freq = 395.991e6
sdr.gain = 60
# init for opencv
x = 0
y = 0
img=np.zeros((600,600,1), np.uint8)

while True:
    samples = sdr.read_samples(1024*100) #type(sample) is numpy.complex128
    
    for sample in samples:
        mag = np.sqrt( sample.imag * sample.imag + sample.real * sample.real)
        value = mag * 255 * 10
        img[y, x] = value
        img[y, x + 1] = value
        img[y, x + 2] = value
        img[y, x + 3] = value
        img[y, x + 4] = value
        img[y, x + 5] = value
        img[y, x + 6] = value
        img[y, x + 7] = value
        img[y, x + 8] = value
        img[y, x + 9] = value



        x = x + 10
        if (x >= 580):
            x = 0
            y = y + 1
        if (y >= 500):
            y = 0

    cv2.imshow("HDMI", img)
    if(cv2.waitKey(10)==27):
        break

sdr.close()

  But it can be seen from the picture , The whole screen is still tilted , Originally, the white rectangle should be vertical on my leak screen , But now it is inclined from the top right to the bottom left .

This problem can also be solved , You need to save the data of each row separately , Then spell the extra data from the previous line to the beginning of the next line , Or take the data from the beginning of the next line and spell it to the end of the previous line .

The leakage picture of this experiment is like this , For reference :

原网站

版权声明
本文为[Lao Shao's open source world]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/182/202207011105095380.html