Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
- #AutoIt3Wrapper_Icon=icon.ico
- #AutoIt3Wrapper_Outfile=SIM32.exe
- #AutoIt3Wrapper_UseUpx=y
- #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
- #include <ButtonConstants.au3>
- #include <EditConstants.au3>
- #include <GUIConstantsEx.au3>
- #include <GUIListBox.au3>
- #include <GUIEdit.au3>
- #include <WindowsConstants.au3>
- #include <Inet.au3>
- #include "P2P.au3"
- #include "DARTIS.au3"
- #include <array.au3>
- #include <misc.au3>
- #include <WindowsConstants.au3>
- #include <Memory.au3>
- #include <GDIPlus.au3>
- #include <MsgBoxConstants.au3>
- #include <IE.au3>
- #include "Toast.au3"
- Global $precision = TimerInit(), $hGUI
- Global $kbp, $gtimer = TimerInit()
- Global $session = "NULL", $username, $recipient, $last
- Dim $conversations[100][3]
- $conversations[0][0] = 0
- _login()
- $oIE = _IECreateEmbedded()
- $Form2 = GUICreate("Secure Interface Module", 612, 476, -1, -1, $WS_SIZEBOX+$WS_MAXIMIZEBOX)
- $List2 = GUICtrlCreateList("", 0, 0, 145, 435)
- GUICtrlSetResizing(-1, 257)
- GUICtrlCreateObj($oIE, 146, 0, 465, 401)
- GUISetBkColor(0xFFFFFF)
- GUICtrlSetResizing(-1, 102)
- _IENavigate($oIE, "https://pdglobal.net")
- ;$Edit2 = GUICtrlCreateEdit("", 146, 0, 465, 401, $WS_VSCROLL + $ES_AUTOVSCROLL)
- GUICtrlSetData(-1, "")
- $Input2 = GUICtrlCreateInput("", 152, 408, 377, 21)
- GUICtrlSetResizing(-1, 582)
- $Button2 = GUICtrlCreateButton("Send", 536, 405, 75, 25, $BS_DEFPUSHBUTTON)
- GUICtrlSetResizing(-1, 512+256+64+4)
- ;_GUICtrlEdit_SetReadOnly($Edit2, True)
- _getcontacts()
- ;~ _P2P_Start_Node($username, 6667, 25, 1, 25, 1, "0.0.0.0")
- ;~ _P2P_Register_Event($P2P_MESSAGE, "recv")
- ;~ _getpeers()
- Local $idcontacts = GUICtrlCreateMenu("&Contacts")
- Local $managecontacts = GUICtrlCreateMenuItem("Manage Contacts", $idcontacts)
- Local $idFilemenu = GUICtrlCreateMenu("&Encryption")
- Local $generatekey = GUICtrlCreateMenuItem("Generate Keyfile", $idFilemenu)
- Local $selectkey = GUICtrlCreateMenuItem("Select KeyFile", $idFilemenu)
- Local $clearkey = GUICtrlCreateMenuItem("Clear KeyFile", $idFilemenu)
- GUISetState(@SW_SHOW)
- GUIDelete($hGUI)
- $peers = TimerInit()
- While 1
- $nMsg = GUIGetMsg()
- Switch $nMsg
- Case $List2
- $current = _GUICtrlListBox_GetText($List2, _GUICtrlListBox_GetCurSel($List2))
- $recipient = $current ;update last to current
- _IEDocWriteHTML($oIE, "")
- $oIE.document.parentwindow.scroll(0, $oIE.document.body.scrollHeight)
- ;_GUICtrlEdit_SetText($Edit2, "")
- For $i = 0 To $conversations[0][0]
- If $conversations[$i][0] = $current Then
- _IEDocWriteHTML($oIE, $conversations[$i][1])
- $oIE.document.parentwindow.scroll(0, $oIE.document.body.scrollHeight)
- ;GUICtrlSetData($Edit2, _Formattext($conversations[$i][1]))
- ExitLoop
- EndIf
- Next
- Case $managecontacts
- ShellExecute("https://pdglobal.net/?pid=settings#settings")
- Case $clearkey
- $current = _GUICtrlListBox_GetText($List2, _GUICtrlListBox_GetCurSel($List2))
- $recipient = $current ;update last to current
- ;_GUICtrlEdit_SetText($Edit2, "")
- For $i = 0 To $conversations[0][0]
- If $conversations[$i][0] = $current Then
- $conversations[$i][2] = "NA"
- ExitLoop
- EndIf
- Next
- IniWrite(@ScriptDir & "\settings.ini", "userkeys", $current, "NA")
- Case $selectkey
- $keyfile = FileOpenDialog("Select KeyFile for this user", @ScriptDir, "*.kbf(*.kbf)")
- $localkey = FileRead($keyfile)
- IniWrite(@ScriptDir & "\settings.ini", "userkeys", $current, $keyfile)
- For $i = 0 To $conversations[0][0]
- If $conversations[$i][0] = $current Then
- $conversations[$i][2] = _bang($localkey)
- ExitLoop
- EndIf
- Next
- Case $generatekey
- $saveas = FileSaveDialog("Generate Keyfile", @ScriptDir, "*.kbf(*.kbf)")
- $key = _generate_keyFile()
- If Not StringLeft($saveas, 3) = "kbf" Then
- $saveas &= "kbf"
- EndIf
- FileWrite($saveas, $key)
- Case $GUI_EVENT_CLOSE
- Local $confirm = MsgBox($MB_OKCANCEL, "Exit now?", "Are you sure you want to exit the Secure Interface Module?") ; MsgBox must be a variable, so we can check the return value
- If $confirm = $IDOK Then Exit ; If they pushed ok, exit.
- Case $Button2
- If StringStripWS(GUICtrlRead($Input2), $STR_STRIPALL) <> "" Then ; Strip all whitespace from the input, and check that it's not "NULL" or "" (empty string)
- $current = _GUICtrlListBox_GetText($List2, _GUICtrlListBox_GetCurSel($List2))
- $recipient = $current ;update last to current
- _IEDocWriteHTML($oIE, "")
- $oIE.document.parentwindow.scroll(0, $oIE.document.body.scrollHeight)
- ;_GUICtrlEdit_SetText($Edit2, "")
- For $i = 0 To $conversations[0][0]
- If $conversations[$i][0] = $current Then
- $conversations[$i][1] &= "<div style='float: right;width: 90%;border: 3px solid #888888;padding: 10px;text-align:right;margin-bottom:10px;' >Me: " & _Formattext(GUICtrlRead($Input2))& "<br/></div><br/>"
- ;GUICtrlSetData($Edit2, _Formattext($conversations[$i][1]))
- _IEDocWriteHTML($oIE, $conversations[$i][1])
- $oIE.document.parentwindow.scroll(0, $oIE.document.body.scrollHeight)
- ExitLoop
- EndIf
- Next
- If UBound($conversations[$i][2]) > 2 Then
- ;~ _p2p_send_message($recipient, _inject($conversations[$i][2], GUICtrlRead($input2)),$username)
- _sendwebmsg($recipient, _inject($conversations[$i][2], GUICtrlRead($Input2)))
- Else
- ;~ _p2p_send_message($recipient, GUICtrlRead($input2),$username)
- _sendwebmsg($recipient, GUICtrlRead($Input2))
- EndIf
- GUICtrlSetData($Input2, "")
- EndIf
- EndSwitch
- If TimerDiff($peers) > 3000 Then
- _getmsg()
- $peers = TimerInit()
- EndIf
- WEnd
- func _Formattext($text)
- $text = StringReplace($text, "<", "<")
- $text = StringReplace($text, ">", ">")
- $text = StringReplace($text, ":|", "<img src='http://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/24/Emotes-face-plain-icon.png' />")
- $text = StringReplace($text, ":(", "<img src='http://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/24/Emotes-face-sad-icon.png' />")
- $text = StringReplace($text, ":)", "<img src='http://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/24/Emotes-face-smile-icon.png' />")
- $text = StringReplace($text, ":D", "<img src='http://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/24/Emotes-face-smile-big-icon.png' />")
- $text = StringReplace($text, "xD", "<img src='http://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/24/Emotes-face-laugh-icon.png' />")
- Return $text
- EndFunc
- Func _sendwebmsg($to, $msg)
- _INetGetSource("https://pdglobal.net/?sid=sendmsg&to=" & $to & "&msg=" & $msg & "&session=" & $session)
- EndFunc ;==>_sendwebmsg
- Func _getmsg()
- $incoming = _INetGetSource("https://pdglobal.net/?sid=getmsgs&session=" & $session)
- $msgs = StringSplit($incoming, "<br/>", 1)
- For $i = 1 To $msgs[0]
- $msgdata = StringSplit($msgs[$i], "~")
- For $i = 0 To $conversations[0][0]
- If UBound($msgdata) > 2 Then
- If StringUpper($conversations[$i][0]) = StringTrimLeft($msgdata[1], 1) Then
- $current = StringTrimLeft($msgdata[1], 1)
- If UBound($conversations[$i][2]) > 2 Then
- $msgdata[2] = _extract($conversations[$i][2], $msgdata[2])
- EndIf
- $conversations[$i][1] &= "<div style='float: left;width: 90%;border: 3px solid #11AAFF;padding: 10px;text-align:left;margin-bottom:10px;' >"&$msgdata[1] & ": " & _Formattext($msgdata[2])& "<br/></div><br/>"
- _IEDocWriteHTML($oIE, $conversations[$i][1])
- $oIE.document.parentwindow.scroll(0, $oIE.document.body.scrollHeight)
- ;GUICtrlSetData($Edit2, _Formattext($conversations[$i][1]))
- if not WinActive($Form2) Then
- Beep(1000, 250)
- $aRet = _Toast_Show(0, $msgdata[1], $msgdata[2], 0)
- WinFlash($Form2)
- _Toast_Hide()
- EndIf
- if stringleft($msgdata[2], 5) = "/ping" Then
- _sendwebmsg(StringTrimLeft($msgdata[1], 1), "*pong*")
- EndIf
- ExitLoop
- EndIf
- EndIf
- Next
- Next
- EndFunc ;==>_getmsg
- Func _getpeers()
- ;~ $peerlist = StringSplit(StringTrimLeft(_INetGetSource("https://pdglobal.net/?sid=peerlist"),1), "|")
- ;~ for $i=1 to $peerlist[0]
- ;~ _P2P_Connect($peerlist[$i])
- ;~ Next
- EndFunc ;==>_getpeers
- Func _getcontacts()
- $clist = StringSplit(StringTrimLeft(_INetGetSource("https://pdglobal.net/?sid=contactslist&session=" & $session), 1), "|")
- $index = 0
- _GUICtrlListBox_ResetContent($List2)
- For $i = 1 To $clist[0]
- If $clist[$i] <> "" Then
- $conversations[0][0] += 1
- $conversations[$i][0] = $clist[$i]
- $conversations[$i][2] = _bang(FileRead(IniRead(@ScriptDir & "\settings.ini", "userkeys", $clist[$i], "NA")))
- _GUICtrlListBox_AddString($List2, $clist[$i])
- $index += 1
- EndIf
- Next
- EndFunc ;==>_getcontacts
- Func recv($Socket, $message, $from, $error)
- ;_extract($message)
- ConsoleWrite($from& "<br/>")
- For $i = 0 To $conversations[0][0]
- If $conversations[$i][0] = $from Then
- If UBound($conversations[$i][2]) > 2 Then
- $message = _extract($conversations[$i][2], $message)
- EndIf
- $conversations[$i][1] &= $from & ": " & _Formattext($message)& "<br/>"
- _IEDocWriteHTML($oIE, $conversations[$i][1])
- $oIE.document.parentwindow.scroll(0, $oIE.document.body.scrollHeight)
- ;GUICtrlSetData($Edit2, _Formattext($conversations[$i][1]))
- ExitLoop
- EndIf
- Next
- EndFunc ;==>recv
- Func _login()
- $Form1 = GUICreate("Secure Interface Module", 280, 331, 192, 124)
- GUISetBkColor(0xFFFFFF)
- $Group1 = GUICtrlCreateGroup("Username", 48, 128, 185, 57)
- $Input1 = GUICtrlCreateInput("", 56, 152, 169, 21)
- GUICtrlCreateGroup("", -99, -99, 1, 1)
- $Group2 = GUICtrlCreateGroup("Password", 48, 195, 185, 57)
- $Input2 = GUICtrlCreateInput("", 56, 219, 169, 21, 0x0020)
- GUICtrlCreateGroup("", -99, -99, 1, 1)
- $Button1 = GUICtrlCreateButton("Sign In", 64, 272, 155, 25, $BS_DEFPUSHBUTTON)
- $Pic1 = GUICtrlCreatePic(@ScriptDir & "\SIM.jpg", 40, 16, 204, 100)
- GUISetState(@SW_SHOW)
- #EndRegion ### END Koda GUI section ###
- While 1
- $nMsg = GUIGetMsg()
- Switch $nMsg
- Case $GUI_EVENT_CLOSE
- Exit
- Case $Button1
- $username = GUICtrlRead($Input1)
- $password = GUICtrlRead($Input2)
- $auth = _INetGetSource("https://pdglobal.net/?sid=login&usr=" & $username & "&pwd=" & $password)
- If StringLeft($auth, 3) = " 0x" Then
- ;logged in
- $session = StringTrimLeft($auth, 3)
- GUISetState(@SW_HIDE, $Form1)
- loading()
- ExitLoop
- Else
- MsgBox(16, "Error", $auth)
- EndIf
- EndSwitch
- WEnd
- EndFunc ;==>_login
- ;coded by UEZ build 2013-05-02, idea taken from http://tympanus.net/codrops/2012/11/14/creative-css-loading-animations/
- ;AutoIt v3.3.9.21 or higher needed!
- Func loading()
- Global Const $hDwmApiDll = DllOpen("dwmapi.dll")
- Global $sChkAero = DllStructCreate("int;")
- DllCall($hDwmApiDll, "int", "DwmIsCompositionEnabled", "ptr", DllStructGetPtr($sChkAero))
- Global $bAero = DllStructGetData($sChkAero, 1)
- Global $fStep = 0.02
- If Not $bAero Then $fStep = 1.5
- _GDIPlus_Startup()
- Global Const $STM_SETIMAGE = 0x0172 ; $IMAGE_BITMAP = 0
- Global $iW = 400, $iH = 250
- Global $hGUI = GUICreate("Loading", $iW, $iH, -1, -1, $WS_POPUPWINDOW, $WS_EX_TOPMOST)
- GUISetBkColor(0xEEEEEE)
- Global Const $iPic = GUICtrlCreatePic("", 0, 0, $iW, $iH)
- GUICtrlSetState(-1, $GUI_DISABLE)
- WinSetTrans($hGUI, "", 0)
- GUISetState()
- Global $hHBmp_BG, $hB, $iSleep = 50
- GUIRegisterMsg($WM_TIMER, "PlayAnim")
- DllCall("user32.dll", "int", "SetTimer", "hwnd", $hGUI, "int", 0, "int", $iSleep, "int", 0)
- Global $z, $iPerc = 0
- For $z = 1 To 255 Step $fStep
- WinSetTrans($hGUI, "", $z)
- Next
- EndFunc ;==>loading
- Func PlayAnim()
- $hHBmp_BG = _GDIPlus_MonochromaticBlinker($iW, $iH, "Loading... Please Wait")
- $hB = GUICtrlSendMsg($iPic, $STM_SETIMAGE, $IMAGE_BITMAP, $hHBmp_BG)
- If $hB Then _WinAPI_DeleteObject($hB)
- _WinAPI_DeleteObject($hHBmp_BG)
- EndFunc ;==>PlayAnim
- Func _GDIPlus_MonochromaticBlinker($iW, $iH, $sString = "Please wait...", $bHBitmap = True)
- Local Const $hBrushBall1 = _GDIPlus_BrushCreateSolid(0xFF123456)
- Local Const $hBrushBall2 = _GDIPlus_BrushCreateSolid(0x80123456)
- Local Const $hBrushRect = _GDIPlus_BrushCreateSolid(0x90FFFFFF)
- Local $hBitmap = _GDIPlus_BitmapCreateFromScan0($iW, $iH)
- Local Const $hCtxt = _GDIPlus_ImageGetGraphicsContext($hBitmap)
- _GDIPlus_GraphicsSetPixelOffsetMode($hCtxt, $GDIP_PIXELOFFSETMODE_HIGHQUALITY)
- _GDIPlus_GraphicsSetSmoothingMode($hCtxt, 2)
- Local Const $hBmp_BG = _GDIPlus_BitmapCreateFromMemory(_Background())
- Local $hBrushTexture = _GDIPlus_TextureCreate($hBmp_BG)
- _GDIPlus_BitmapDispose($hBmp_BG)
- _GDIPlus_GraphicsFillRect($hCtxt, 0, 0, $iW, $iH, $hBrushTexture)
- Local $iRadius, $fCosX, $fSinY, $i, $j = 0, $l = 0
- Local Const $fDeg = ACos(-1) / 180, $iRadius1 = 60, $iRadius2 = $iRadius1 - 16, $iCount = 4, $iW2 = $iW / 2, $iH2 = $iH / 2, $iSizeBall = 32, $iSizeBall2 = $iSizeBall / 2, _
- $fFontSize = 12, $fSpeed = 0.5
- Local $tPoints = DllStructCreate("float[" & $iCount * 2 & "]")
- Local $aColors[15] = [$hBrushBall1, $hBrushBall1, $hBrushBall1, $hBrushBall1, $hBrushBall1, $hBrushBall1, $hBrushBall1, $hBrushBall2, _
- $hBrushBall1, $hBrushBall1, $hBrushBall1, $hBrushBall1, $hBrushBall1, $hBrushBall1, $hBrushBall1]
- Local Static $iAngle = 0, $k
- For $i = 0 To 315 Step 45
- $fCosX = Cos(($i + $iAngle) * $fDeg)
- $fSinY = Sin(($i + $iAngle) * $fDeg)
- If Not Mod($j, 2) Then
- DllStructSetData($tPoints, 1, $iW2 + $fCosX * ($iRadius1 + 3), $l * 2 + 1)
- DllStructSetData($tPoints, 1, $iH2 + $fSinY * ($iRadius1 + 3), $l * 2 + 2)
- $l += 1
- EndIf
- $iRadius = Execute("$iRadius" & 1 + Mod($j, 2))
- _GDIPlus_GraphicsFillEllipse($hCtxt, -$iSizeBall2 + $iW2 + $fCosX * $iRadius, -$iSizeBall2 + $iH2 + $fSinY * $iRadius, $iSizeBall, $iSizeBall, $aColors[Int(7 - $k + $j)])
- $j += 1
- Next
- $k = Mod($k + $fSpeed, 8)
- DllCall($__g_hGDIPDll, "int", "GdipFillPolygon", "handle", $hCtxt, "handle", $hBrushRect, "struct*", $tPoints, "int", $iCount, "int", 0)
- $tPoints = 0
- $iAngle -= 2
- Local Const $hFormat = _GDIPlus_StringFormatCreate()
- Local Const $hFamily = _GDIPlus_FontFamilyCreate("Arial")
- Local Const $hFont = _GDIPlus_FontCreate($hFamily, $fFontSize, 2)
- Local Const $hBrushTxt = _GDIPlus_BrushCreateSolid(0xFF101010)
- Local Const $tLayout = _GDIPlus_RectFCreate(0, 0, 0, 0)
- Local Const $aInfo = _GDIPlus_GraphicsMeasureString($hCtxt, $sString, $hFont, $tLayout, $hFormat)
- DllStructSetData($tLayout, "X", ($iW - DllStructGetData($aInfo[0], "Width")) / 2)
- DllStructSetData($tLayout, "Y", $iH / 2 + $iRadius1 + $iSizeBall)
- _GDIPlus_GraphicsDrawStringEx($hCtxt, $sString, $hFont, $tLayout, $hFormat, $hBrushTxt)
- _GDIPlus_FontDispose($hFont)
- _GDIPlus_FontFamilyDispose($hFamily)
- _GDIPlus_StringFormatDispose($hFormat)
- _GDIPlus_BrushDispose($hBrushTxt)
- _GDIPlus_BrushDispose($hBrushTexture)
- _GDIPlus_GraphicsDispose($hCtxt)
- _GDIPlus_BrushDispose($hBrushBall1)
- _GDIPlus_BrushDispose($hBrushBall2)
- _GDIPlus_BrushDispose($hBrushRect)
- If $bHBitmap Then
- Local $hHBITMAP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap)
- _GDIPlus_BitmapDispose($hBitmap)
- Return $hHBITMAP
- EndIf
- Return $hBitmap
- EndFunc ;==>_GDIPlus_MonochromaticBlinker
- ;Code below was generated by: 'File to Base64 String' Code Generator v1.12 Build 2013-03-27
- Func _Background($bSaveBinary = False, $sSavePath = @ScriptDir)
- Local $Background
- $Background &= 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKBAMAAAB/HNKOAAAAD1BMVEXl5eXp6enu7u7g4ODm5uY5xL5yAAAAJElEQVR4Xk3KMQ0AAAwDoNYKGupf2969hBTNsKiKmVDC+P7/AbJBBh6YaCBlAAAAAElFTkSuQmCC'
- Local $bString = Binary(_Base64Decode($Background))
- If $bSaveBinary Then
- Local $hFile = FileOpen($sSavePath & "\hexabump.png", 18)
- FileWrite($hFile, $bString)
- FileClose($hFile)
- EndIf
- Return $bString
- EndFunc ;==>_Background
- ;~ Func _base64decode($data)
- ;~ Local $opcode = "0xC81000005356578365F800E8500000003EFFFFFF3F3435363738393A3B3C3DFFFFFF00FFFFFF000102030405060708090A0B0C0D0E0F10111213141516171819FFFFFFFFFFFF1A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132338F45F08B7D0C8B5D0831D2E9910000008365FC00837DFC047D548A034384C0750383EA033C3D75094A803B3D75014AB00084C0751A837DFC047D0D8B75FCC64435F400FF45FCEBED6A018F45F8EB1F3C2B72193C7A77150FB6F083EE2B0375F08A068B75FC884435F4FF45FCEBA68D75F4668B06C0E002C0EC0408E08807668B4601C0E004C0EC0208E08847018A4602C0E00624C00A46038847028D7F038D5203837DF8000F8465FFFFFF89D05F5E5BC9C21000"
- ;~ Local $codebuffer = DllStructCreate("byte[" & BinaryLen($opcode) & "]")
- ;~ DllStructSetData($codebuffer, 1, $opcode)
- ;~ Local $ouput = DllStructCreate("byte[" & BinaryLen($data) & "]")
- ;~ Local $ret = DllCall("user32.dll", "int", "CallWindowProc", "ptr", DllStructGetPtr($codebuffer), "str", $data, "ptr", DllStructGetPtr($ouput), "int", 0, "int", 0)
- ;~ Return BinaryMid(DllStructGetData($ouput, 1), 1, $ret[0])
- ;~ EndFunc
- ;~ Func _base64encode($data, $linebreak = 76)
- ;~ Local $opcode = "0x5589E5FF7514535657E8410000004142434445464748494A4B4C4D4E4F505152535455565758595A6162636465666768696A6B6C6D6E6F707172737475767778797A303132333435363738392B2F005A8B5D088B7D108B4D0CE98F0000000FB633C1EE0201D68A06880731C083F901760C0FB6430125F0000000C1E8040FB63383E603C1E60409C601D68A0688470183F90176210FB6430225C0000000C1E8060FB6730183E60FC1E60209C601D68A06884702EB04C647023D83F90276100FB6730283E63F01D68A06884703EB04C647033D8D5B038D7F0483E903836DFC04750C8B45148945FC66B80D0A66AB85C90F8F69FFFFFFC607005F5E5BC9C21000"
- ;~ Local $codebuffer = DllStructCreate("byte[" & BinaryLen($opcode) & "]")
- ;~ DllStructSetData($codebuffer, 1, $opcode)
- ;~ $data = Binary($data)
- ;~ Local $input = DllStructCreate("byte[" & BinaryLen($data) & "]")
- ;~ DllStructSetData($input, 1, $data)
- ;~ $linebreak = Floor($linebreak / 4) * 4
- ;~ Local $oputputsize = Ceiling(BinaryLen($data) * 4 / 3)
- ;~ $oputputsize = $oputputsize + Ceiling($oputputsize / $linebreak) * 2 + 4
- ;~ Local $ouput = DllStructCreate("char[" & $oputputsize & "]")
- ;~ DllCall("user32.dll", "none", "CallWindowProc", "ptr", DllStructGetPtr($codebuffer), "ptr", DllStructGetPtr($input), "int", BinaryLen($data), "ptr", DllStructGetPtr($ouput), "uint", $linebreak)
- ;~ Return DllStructGetData($ouput, 1)
- ;~ EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement