text: # -*- coding: utf-8 -*-
  
  # Form implementation generated from reading ui file 'GUI\aparat_hacker.ui'
  #
  # Created by: PyQt5 UI code generator 5.15.4
  #
  # WARNING: Any manual changes made to this file will be lost when pyuic5 is
  # run again.  Do not edit this file unless you know what you are doing.
  
  
  from PyQt5 import QtCore, QtGui, QtWidgets
  import ctypes
  import json
  import requests
  
  # from requests.api import request
  
  
  
  class Ui_MainWindow(object):
          def __init__(self):
              self.version_aparat = "1.0.0"
              self.base_url = "http://aparat0hacker.pythonanywhere.com"
  
          def get_l_version(self):
                  return requests.get(self.base_url+"/version").text.split(" : ")[0]
  
          def ch_update(self):
                  self.show_msg("this version = %s.\nlast version is %s .\nif any new version, plz download the new." % (self.version_aparat, self.get_l_version()),"update info",data="1|2")
  
          def show_msg(self,title,text,data=""):
                  MB_OK = 0x0
                  MB_OKCXL = 0x01
                  MB_YESNOCXL = 0x03
                  MB_YESNO = 0x04
                  MB_HELP = 0x4000
                  ICON_EXLAIM=0x30
                  ICON_INFO = 0x40
                  ICON_STOP = 0x10
  
                  MB = {
                          "1":"MB_OK",
                          "2":"MB_OKCXL",
                          "3":"MB_YESNOCXL",
                          "4":"MB_YESNO",
                          "5":"MB_HELP",
                  }
  
                  ICON = {
                          "1":"ICON_EXLAIM",
                          "2":"ICON_INFO",
                          "3":"ICON_STOP",
                  }
                  if data != "":
                          data = data.split("|")
  
                          data2 = ""
                          for i in data[:-1]:
                                  data2 += MB[i]+" | "
                          
                          data2 += ICON[data[-1]]
                  else:
                          data2 = "2"
  
                  return ctypes.windll.user32.MessageBoxW(0, title, text, eval(data2))
          
          def get_info(self):
                  uuname = self.uuname.text()
                  tuname = self.tuname.text()
                  pwd = self.upw.text()
                  out = requests.post(self.base_url+"/info",data={"uuname":uuname,"tuname":tuname,"pwd":pwd}).json()
                  # print(json.dumps(out,indent=4,ensure_ascii=False))
                  self.show_msg(json.dumps(out,indent=4,ensure_ascii=False),"info details","1|3")
  
          def setupUi(self, MainWindow):
                  MainWindow.setObjectName("MainWindow")
                  MainWindow.resize(640, 178)
                  MainWindow.setStyleSheet("background-color: rgb(0, 0, 0);\n"
          "")
                  self.centralwidget = QtWidgets.QWidget(MainWindow)
                  self.centralwidget.setObjectName("centralwidget")
                  self.label = QtWidgets.QLabel(self.centralwidget)
                  self.label.setGeometry(QtCore.QRect(50, 60, 47, 13))
                  self.label.setObjectName("label")
                  self.label_2 = QtWidgets.QLabel(self.centralwidget)
                  self.label_2.setGeometry(QtCore.QRect(-220, 0, 381, 131))
                  self.label_2.setText("")
                  self.label_2.setPixmap(QtGui.QPixmap("logo--color-white--without_text@128px.png"))
                  self.label_2.setObjectName("label_2")
                  self.label_3 = QtWidgets.QLabel(self.centralwidget)
                  self.label_3.setGeometry(QtCore.QRect(180, 0, 81, 16))
                  self.label_3.setStyleSheet("background-color: rgb(255, 255, 255);")
                  self.label_3.setObjectName("label_3")
                  self.label_4 = QtWidgets.QLabel(self.centralwidget)
                  self.label_4.setGeometry(QtCore.QRect(180, 20, 81, 16))
                  self.label_4.setStyleSheet("background-color: rgb(255, 255, 255);")
                  self.label_4.setObjectName("label_4")
                  self.label_5 = QtWidgets.QLabel(self.centralwidget)
                  self.label_5.setGeometry(QtCore.QRect(180, 50, 121, 16))
                  self.label_5.setStyleSheet("background-color: rgb(255, 255, 255);")
                  self.label_5.setObjectName("label_5")
                  self.uuname = QtWidgets.QLineEdit(self.centralwidget)
                  self.uuname.setGeometry(QtCore.QRect(280, 0, 331, 20))
                  self.uuname.setStyleSheet("background-color: rgb(255, 255, 255);")
                  self.uuname.setObjectName("uuname")
                  self.upw = QtWidgets.QLineEdit(self.centralwidget)
                  self.upw.setGeometry(QtCore.QRect(280, 20, 331, 20))
                  self.upw.setStyleSheet("background-color: rgb(255, 255, 255);")
                  self.upw.setObjectName("upw")
                  self.tuname = QtWidgets.QLineEdit(self.centralwidget)
                  self.tuname.setGeometry(QtCore.QRect(310, 50, 301, 20))
                  self.tuname.setStyleSheet("background-color: rgb(255, 255, 255);")
                  self.tuname.setObjectName("tuname")
                  self.getinfo = QtWidgets.QPushButton(self.centralwidget)
                  self.getinfo.setGeometry(QtCore.QRect(180, 90, 351, 23))
                  self.getinfo.setStyleSheet("background-color: rgb(255, 255, 255);\n"
          "background-color: rgb(43, 83, 41);")
                  self.getinfo.setObjectName("getinfo")
                  self.chupdate = QtWidgets.QPushButton(self.centralwidget)
                  self.chupdate.setGeometry(QtCore.QRect(540, 90, 91, 41))
                  self.chupdate.setStyleSheet("background-color: rgb(255, 0, 0);\n"
          "")
                  self.chupdate.setObjectName("chupdate")
                  MainWindow.setCentralWidget(self.centralwidget)
                  self.menubar = QtWidgets.QMenuBar(MainWindow)
                  self.menubar.setGeometry(QtCore.QRect(0, 0, 640, 21))
                  self.menubar.setObjectName("menubar")
                  MainWindow.setMenuBar(self.menubar)
                  self.statusbar = QtWidgets.QStatusBar(MainWindow)
                  self.statusbar.setObjectName("statusbar")
                  MainWindow.setStatusBar(self.statusbar)
  
                  self.retranslateUi(MainWindow)
                  self.getinfo.clicked.connect(self.get_info)
                  self.chupdate.clicked.connect(self.ch_update)
                  QtCore.QMetaObject.connectSlotsByName(MainWindow)
  
          def retranslateUi(self, MainWindow):
                  _translate = QtCore.QCoreApplication.translate
                  MainWindow.setWindowTitle(_translate("MainWindow", "Aparat Hacker"))
                  self.label.setText(_translate("MainWindow", "TextLabel"))
                  self.label_3.setText(_translate("MainWindow", "You username :"))
                  self.label_4.setText(_translate("MainWindow", "Your password :"))
                  self.label_5.setText(_translate("MainWindow", "The channel username :"))
                  self.getinfo.setText(_translate("MainWindow", "Get, Info... 😈"))
                  self.chupdate.setText(_translate("MainWindow", "chek for update"))
  
  
  if __name__ == "__main__":
                  
          import sys
          app = QtWidgets.QApplication(sys.argv)
          MainWindow = QtWidgets.QMainWindow()
          ui = Ui_MainWindow()
          ui.setupUi(MainWindow)
          MainWindow.show()
          sys.exit(app.exec_())
  