当前位置:网站首页>Tempest HDMI leak receive 3

Tempest HDMI leak receive 3

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

The first article I was going to use python Write code and use rtlsdr To receive , This not only makes the code simple and easy to understand , And the equipment is also very cheap , Good introduction . But in the second article, I still adopted c++ Language and hackrf. May not be very friendly to beginners , So these two days I continue to do python+rtlsdr Version of . Now it has achieved initial success

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((512,512,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 >= 463):
            x = 0
            y = y + 1
        if (y >= 500):
            y = 0

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

sdr.close()

The above is my code , All together 30 Multiple lines , It's very simple . It can be used python2.7 function .

When rtlsdr stay hdmi When near the cable , The effect is as follows :

  This is the desktop of the leaking computer :

  It can be seen that they are more echoing —— The overall interface is black , There is a white bar on it , Then there is a vertical white rectangle on the left , There is also a small white rectangle on the right .

But there are still two problems

1. The solved image is a little tilted ( This problem can be solved by adjusting the line feed position 463 improve , But because the line feed position must be integer , So the accuracy is limited )

2. Many smaller pictures appear repeatedly in the window , Better enlarge the picture , There is no need to see so many repeated pictures , This is a good solution , Just put 1 A pixel is expanded to several pixels up, down, left and right .

Later I will find time to slowly optimize .

Here are two real photos , You can compare the relationship between two computer screens . My operation is in the white text input interface on the right side of the mobile leak computer screen .

 

原网站

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