def showorbotqr(self):
fd = open('./hidden_service/hostname')
line = fd.readline()
oniondom =line.split()[0]
cookie = line.split()[1]
fd.close()
jsonstring = '{'+'"auth_cookie_value": "{}", "domain":"{}"'.format(cookie, oniondom)+'}'
img = qrcode.make(jsonstring)
img.save('qrcode.png', 'PNG')
qrc = QPixmap('qrcode.png')
os.remove('qrcode.png')
self.onionlabelname.setText(jsonstring)
self.onionlabelname.show()
self.onionlabel.setPixmap(qrc.scaled(self.onionlabel.size(), Qt.KeepAspectRatio))
self.onionlabel.show()
评论列表
文章目录