OppaiCyber

xppaicyber_sinau

Sep 14th, 2020
564
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --------------------------- SET COLORS VARIABLE USE FOR MESSAGES
  2. blue="0x00F21200"
  3. red1="0x000000FF"
  4. red2="0x00995500"
  5. white="0x00FFFFFF"
  6.  
  7. --------------------------- SET COMBO BOX FOR BROWSER SELECTION
  8. al = combobox_getItems(UDF1.CEComboBox1)
  9. strings_clear(al)
  10. strings_add(al, 'Browser list...')
  11. strings_add(al, 'Firefox')
  12. strings_add(al, 'Google Chrome')
  13. strings_add(al, 'Internet Explorer')
  14. strings_add(al, 'Maxthon')
  15. strings_add(al, 'UC Browser')
  16. strings_add(al, 'Firefox Unity Game')
  17. strings_add(al, 'Opera')
  18. strings_add(al, 'Comodo Dragon')
  19. setProperty(UDF1.CEComboBox1 , "ItemIndex", "0")
  20. all_enabled = 0
  21. success = 1
  22.  
  23. -------------------------- LOOK UP FOR PIDS
  24. errorOnLookupFailure(false)
  25. alreadycheckedPIDS={}
  26. openNextProcTimer = createTimer(nil,false)
  27. timer_setInterval(openNextProcTimer, 1000)
  28. timer_onTimer(openNextProcTimer,
  29. function(sender)
  30.    local tempPIDtable = getPids()
  31.    if #tempPIDtable == 0 then return end
  32.    timer_setEnabled(sender,false)
  33.    openProcess(tempPIDtable[1])
  34. end)
  35.  
  36. function checkProcessMajor()
  37.    reinitializeSymbolhandler()
  38.    if getAddress("pepflashplayer.dll")~=0 or getAddress("AdobeCPGetAPI") ~=0 then
  39.       return true
  40.    end
  41.    return false
  42. end
  43.  
  44. function getPids()
  45.    local SL=createStringlist()
  46.    getProcesslist(SL)
  47.    local tempPIDtable={}
  48.    for i=0,strings_getCount(SL)-1 do
  49.       local entry = strings_getString(SL,i)
  50.       local processname = entry:sub(10,255)
  51.       local PID = tonumber('0x'..entry:sub(1,8))
  52.       if processname == "chrome.exe" then
  53.          if alreadycheckedPIDS[PID]~=true then
  54.             table.insert(tempPIDtable,PID)
  55.          end
  56.       end
  57.    end
  58.    object_destroy(SL)
  59.    return tempPIDtable
  60. end
  61.  
  62. function checkProcess(sender)
  63.    timer_setEnabled(sender,false)
  64.    alreadycheckedPIDS[getOpenedProcessID()]=true
  65.    if checkProcessMajor() then
  66.       timer_setEnabled(openNextProcTimer,false)
  67.       alreadycheckedPIDS={}
  68.       enableBrowserPid()
  69.    else
  70.       timer_setEnabled(openNextProcTimer,true)
  71.    end
  72. end
  73.  
  74. checkProcessTimer = createTimer(nil,false)
  75. timer_setInterval(checkProcessTimer, 100)
  76. timer_onTimer(checkProcessTimer, checkProcess)
  77.  
  78. function onOpenProcess()
  79.    if success == 1 then return end
  80.    timer_setEnabled(checkProcessTimer,true)
  81. end
  82.  
  83. ----------------------------------------- BROWSER SELECTOR
  84. function scanBrowser()
  85.    AttachItems = combobox_getItems(UDF1.CEComboBox1)
  86.    AttachIndex = combobox_getItemIndex(UDF1.CEComboBox1)
  87.    local font = getProperty(UDF1.CELabel1 , "Font")
  88.    setProperty(font, "Color", white)
  89.    control_setCaption(UDF1.CELabel1, "Attached to PID: " .. "Scanning Process...")
  90.    processMessages()
  91.    if AttachIndex == -1 then return end
  92.    if AttachIndex == 0 then
  93.       control_setCaption(UDF1.CELabel1, "Attached to PID: " .. "no Browser selected.")
  94.       return
  95.    end
  96.  
  97.    local check = strings_getString(AttachItems,AttachIndex)
  98. --- Google Chrome
  99.    if check == 'Google Chrome' then
  100.       success = 0
  101.       local test = openProcess("chrome.exe")
  102.       if test == nil then
  103.          setProperty(font , "Color", red1)
  104.          control_setCaption(UDF1.CELabel1, "Attached to PID: " .. "Chrome not found.")
  105.          timer_setEnabled(openNextProcTimer,false)
  106.          return
  107.       end
  108.       strings_add(getAutoAttachList(),"chrome.exe")
  109.       timer_setEnabled(openNextProcTimer,true)
  110.       return
  111.    end
  112. --- Firefox and IE
  113.    if check == 'Firefox' or check == 'Internet Explorer' then openProcess("FlashPlayerPlugin") end
  114.       errorOnLookupFailure(false)
  115.       reinitializeSymbolhandler()
  116.       err=getAddress("kernel32.dll")==0
  117.    if err==true then
  118.       setProperty(font , "Color", red1)
  119.       control_setCaption(UDF1.CELabel1, "Attached to PID: " .. "Flash player plugin not found")
  120.    else
  121.       local PID=getOpenedProcessID()
  122.       setProperty(font, "Color", white)
  123.       control_setCaption(UDF1.CELabel1, "Attached to PID: " .. PID .. " - flash player plugin")
  124.    end
  125. --- Maxthon
  126.     local check = strings_getString(AttachItems,AttachIndex)
  127.         if check == 'Maxthon' then
  128.         success = 0
  129.         local test = openProcess("Maxthon.exe")
  130.     if test == nil then
  131.         setProperty(font , "Color", red1)
  132.         control_setCaption(UDF1.CELabel1, "Attached to PID: " .. "Maxthon not found.")
  133.         timer_setEnabled(openNextProcTimer,false)
  134.         return
  135.      end
  136.      strings_add(getAutoAttachList(),"Opera.exe")
  137.      timer_setEnabled(openNextProcTimer,true)
  138.     return
  139. end
  140. --- UC Browser
  141.  
  142. --- Firefox Unity Game
  143.  
  144. --- Opera
  145.    local check = strings_getString(AttachItems,AttachIndex)
  146.         if check == 'Opera' then
  147.         success = 0
  148.         local test = openProcess("Opera.exe")
  149.     if test == nil then
  150.         setProperty(font , "Color", red1)
  151.         control_setCaption(UDF1.CELabel1, "Attached to PID: " .. "Opera not found.")
  152.         timer_setEnabled(openNextProcTimer,false)
  153.         return
  154.      end
  155.      strings_add(getAutoAttachList(),"Maxthon.exe")
  156.      timer_setEnabled(openNextProcTimer,true)
  157.     return
  158. end
  159. --- Comodo Dragon
  160. end
  161.  
  162. ----------------------------------------- SHOW ENABLED BROWSER SELECTED PID
  163. function enableBrowserPid()
  164.    setProperty(getProperty(UDF1.CELabel1 , "Font"), "Color", white)
  165.    local PID=getOpenedProcessID()
  166.    local check = strings_getString(AttachItems,AttachIndex)
  167.    if check == 'Firefox' or check == 'Internet Explorer' then
  168.       control_setCaption(UDF1.CELabel1, "Attached to PID: " .. PID .. " - flash player plugin")
  169.    elseif check == 'Google Chrome' then
  170.       control_setCaption(UDF1.CELabel1, "Attached to PID: " .. PID .. " - chrome.exe")
  171.     elseif check == 'Maxthon' then
  172.         control_setCaption(UDF1.CELabel1, "Attached to PID: " .. PID .. " - maxthon.exe")
  173. --  elseif check == 'UC Browser' then
  174. --      control_setCaption(UDF1.CELabel1, "Attached to PID: " .. PID .. " - UCBrowser.exe")
  175. --  elseif check == 'Firefox Unity Game' then
  176. --      control_setCaption(UDF1.CELabel1, "Attached to PID: " .. PID .. " - ??????.exe")
  177. --  elseif check == 'Opera' then
  178. --      control_setCaption(UDF1.CELabel1, "Attached to PID: " .. PID .. " - opera.exe")
  179. --  elseif check == 'Comodo Dragon' then
  180. --      control_setCaption(UDF1.CELabel1, "Attached to PID: " .. PID .. " - ???????exe")
  181.    end
  182.    success = 1
  183. end
  184.  
  185. ----------------------------------------- SET ON CLICK FUNCTION AND CLOSING
  186. control_onClick(UDF1.CEButton1, scanBrowser)
  187. form_onClose(UDF1, CloseTrainer)
  188. form_show(UDF1)
RAW Paste Data