Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/28/2012 in all areas

  1. I scored a Commodore 64 in the early 80's (to replace my Heathkit computer) and recall a game that came with this optical prism thingy. Each time you launched the game it would display 2 scrambled characters on the monitor. Just a bunch of line fragments and dots, but, magically, when you placed the prism over the dots they would transform into 2 letters. Different letters each time you launched the game. Type those 2 characters on the keyboard and the game would finish loading. I recall thinking: "Wow! They went to a lot of effort!". In my teenage boredom one night I decided to try and crack it. I used a monitor program to step through 6502 assembly instructions for about 20 minutes and after a couple of bad attempts finally flipped the correct byte from a BE (branch equal) instruction to a BNE (branch not equal). From then on, the game started if you typed in the wrong 2 characters, and would only lock you out if you happened to type in the 2 correct characters. All that effort by the manufacturer was overcome in an hour. I can't count how many Branch, or Jump, or Call instructions got flipped or replaced with a string of 90's (NOP's) back in my "troublesome" teenage years. So the moral of the story, and what all the above posters are alluding to, and what all 250 posts they refer to will say, is: What one person can do, someone else, given enough time, can undo. And what can be more disheartening, sometimes they can undo your efforts in one-tenth the time you took to put them in place.
    2 points
  2. I agree with EVERY single one of you! I'm not discouraging some level of protection. Basic protection is effective in keeping the average user from committing piracy and is worthwhile. But I also think that going to extreme measures will never stop someone determined to crack your software. I think the dongle route definitely falls into the category of "hardcore security" and is likely more effort than it is worth. Somewhere in your code is going to be a test saying "Is the dongle present?". So, someone doesn't have to assault your security head-on to defeat it, they'll just bypass or reverse the logic of the test and step right around your elaborate protection.
    1 point
  3. Not to mention, I don't see anyone "flaming the topic". I believe we have endeavored to help the OP, by pointing out the inherent issues with believing you can completely protect any Intellectual Property, let alone an AutoIt script. We've also directed him to use the forum as the resource that it is, inviting him to go over some of the many posts and the pitfalls therein. I don't disagree that security, to the degree you can reasonably attain, is a good thing. I just don't see where anyone has done anything but attempt to assist the OP.
    1 point
  4. Skitty

    Making smaller EXEs?

    Assembly. Learn it. Use it. Die a spartan in the programming world.
    1 point
  5. Remember that you only need 1 interpreter, if your package consists of multiple scripts, then compile 1 to exe and everything else to a3x and you'll save quite a bit.
    1 point
  6. There has been som great improvements to these tools lately: A new console app to decode records for individual files has been introduced.Compressed and sparse files are now fully working with extraction.Extraction for extremely fragmented files are also now supported, as $ATTRIBUTE_LIST is resolved and implemented.Full extraction of all ADS's tied to a file.Source: http://code.google.com/p/mft2csv/downloads/list
    1 point
  7. Look at the _WinAPI_UniqueHardwareID() function from WinAPIEx UDF.
    1 point
  8. Please take that back, I'm really furious and upset.
    1 point
  9. wolf9228

    connect Two program

    connectTwoprogram.zip ProgramA.au3 #Include <WinAPI.au3> #Include <SendMessage.au3> #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global $ConnectOK = 99999 , $iGuiHwnd = 0 , $ConnectHWnd , $ConnectMsg $GuiHwnd = GUICreate("ProgramA", 199, 147, 88, 177) $Button1 = GUICtrlCreateButton("GetConnectHWnd", 16, 16, 169, 33, $WS_GROUP) $Button2 = GUICtrlCreateButton("SendMessage", 13, 69, 169, 33, $WS_GROUP) $ConnectMsg = RegisterConnectMsg("ConnectMsg","Password") $DataTransferMsg = RegisterMsg("DataTransferMsg","DataTransferMsgProc") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $ConnectHWnd = GetConnectHWnd($GuiHwnd) if ($ConnectHWnd) Then MsgBox(0,"MSG","Ok") Case $Button2 if ($ConnectHWnd) Then _ Send_Message($ConnectHWnd,$DataTransferMsg,1,2,3,4) EndSwitch WEnd Func DataTransferMsgProc($hWnd,$Msg,$wParam,$lParam) $WParamLoWord = _WinAPI_LoWord($wParam) $WParamHiWord = _WinAPI_HiWord($wParam) $LParamLoWord = _WinAPI_LoWord($lParam) $LParamHiWord = _WinAPI_HiWord($lParam) $Text = _ "From ProgramB To ProgramA" & @CRLF & _ "$hWnd ==> " & $hWnd & @CRLF & _ "$WParamLoWord ==> " & $WParamLoWord & @CRLF & _ "$WParamHiWord ==> " & $WParamHiWord & @CRLF & _ "$LParamLoWord ==> " & $LParamLoWord & @CRLF & _ "$LParamHiWord ==> " & $LParamHiWord MsgBox(0,"DataTransferMsg",$Text) Return 1 EndFunc Func RegisterConnectMsg($NewStrMsgConnect,$EncryptPassword) $NewMsgId = RegisterWindowMessage(String($EncryptPassword & $NewStrMsgConnect)) if @error Then Return SetError(2,0,0) GUIRegisterMsg($NewMsgId,"ConnectProc") if @error Then Return SetError(3,0,0) Return SetError(0,0,$NewMsgId) EndFunc Func GetConnectHWnd($GuiHwnd,$TimeOut = 10000) if Not IsHWnd($GuiHwnd) Then Return SetError(1,0,0) Local $RT = 0 , $HWND = 0 , $begin = TimerInit() While 1 $HWND = FindWindowEx(0,$HWND,0,0) if ($GuiHwnd = $HWND) Then ContinueLoop $RT = _SendMessage($HWND,$ConnectMsg,0,0) if ($RT = $ConnectOK) Or TimerDiff($begin) >= $TimeOut Then ExitLoop WEnd if ($RT <> $ConnectOK) Then Return SetError(4,0,0) Return SetError(0,0,$HWND) EndFunc Func ConnectProc($hWnd,$Msg,$wParam,$lParam) Return $ConnectOK EndFunc Func Send_Message($ConnectHWnd,$MsgId,$WParamLoWord,$WParamHiWord,$LParamLoWord,$LParamHiWord) $WParam = _WinAPI_MakeLong($WParamLoWord,$WParamHiWord) $LParam = _WinAPI_MakeLong($LParamLoWord,$LParamHiWord) Return _SendMessage($ConnectHWnd,$MsgId,$WParam,$LParam) EndFunc Func RegisterMsg($NewStrMsgName,$MsgFunction) $NewMsgId = RegisterWindowMessage($NewStrMsgName) if @error Then Return SetError(1,0,0) GUIRegisterMsg($NewMsgId,$MsgFunction) if @error Then Return SetError(2,0,0) Return SetError(0,0,$NewMsgId) EndFunc Func FindWindowEx($hwndParent,$hwndChildAfter,$lpszClass,$lpszWindow) Local $DataTypeA = "int" , $DataTypeB = "int" if IsString($lpszClass) Then $DataTypeA = "WSTR" if IsString($lpszWindow) Then $DataTypeB = "WSTR" $RT = DllCall("User32.dll","HWND","FindWindowExW","HWND",$hwndParent,"HWND",$hwndChildAfter, _ $DataTypeA,$lpszClass,$DataTypeB,$lpszWindow) if @error Or $RT[0] = 0 Then Return SetError(1,0,0) Return SetError(0,0,$RT[0]) EndFunc Func RegisterWindowMessage($lpString) $RT = DllCall("User32.dll","int","RegisterWindowMessageW","WSTR",$lpString) if @error Or $RT[0] = 0 Then Return SetError(1,0,0) Return SetError(0,0,$RT[0]) EndFunc ProgramB.au3 #Include <WinAPI.au3> #Include <SendMessage.au3> #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global $ConnectOK = 99999 , $iGuiHwnd = 0 , $ConnectHWnd , $ConnectMsg $GuiHwnd = GUICreate("ProgramB", 199, 147, 88, 177) $Button1 = GUICtrlCreateButton("GetConnectHWnd", 16, 16, 169, 33, $WS_GROUP) $Button2 = GUICtrlCreateButton("SendMessage", 13, 69, 169, 33, $WS_GROUP) $ConnectMsg = RegisterConnectMsg("ConnectMsg","Password") $DataTransferMsg = RegisterMsg("DataTransferMsg","DataTransferMsgProc") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $ConnectHWnd = GetConnectHWnd($GuiHwnd) if ($ConnectHWnd) Then MsgBox(0,"MSG","Ok") Case $Button2 if ($ConnectHWnd) Then _ Send_Message($ConnectHWnd,$DataTransferMsg,5,6,7,8) EndSwitch WEnd Func DataTransferMsgProc($hWnd,$Msg,$wParam,$lParam) $WParamLoWord = _WinAPI_LoWord($wParam) $WParamHiWord = _WinAPI_HiWord($wParam) $LParamLoWord = _WinAPI_LoWord($lParam) $LParamHiWord = _WinAPI_HiWord($lParam) $Text = _ "From ProgramA To ProgramB" & @CRLF & _ "$hWnd ==> " & $hWnd & @CRLF & _ "$WParamLoWord ==> " & $WParamLoWord & @CRLF & _ "$WParamHiWord ==> " & $WParamHiWord & @CRLF & _ "$LParamLoWord ==> " & $LParamLoWord & @CRLF & _ "$LParamHiWord ==> " & $LParamHiWord MsgBox(0,"DataTransferMsg",$Text) Return 1 EndFunc Func RegisterConnectMsg($NewStrMsgConnect,$EncryptPassword) $NewMsgId = RegisterWindowMessage(String($EncryptPassword & $NewStrMsgConnect)) if @error Then Return SetError(2,0,0) GUIRegisterMsg($NewMsgId,"ConnectProc") if @error Then Return SetError(3,0,0) Return SetError(0,0,$NewMsgId) EndFunc Func GetConnectHWnd($GuiHwnd,$TimeOut = 10000) if Not IsHWnd($GuiHwnd) Then Return SetError(1,0,0) Local $RT = 0 , $HWND = 0 , $begin = TimerInit() While 1 $HWND = FindWindowEx(0,$HWND,0,0) if ($GuiHwnd = $HWND) Then ContinueLoop $RT = _SendMessage($HWND,$ConnectMsg,0,0) if ($RT = $ConnectOK) Or TimerDiff($begin) >= $TimeOut Then ExitLoop WEnd if ($RT <> $ConnectOK) Then Return SetError(4,0,0) Return SetError(0,0,$HWND) EndFunc Func ConnectProc($hWnd,$Msg,$wParam,$lParam) Return $ConnectOK EndFunc Func Send_Message($ConnectHWnd,$MsgId,$WParamLoWord,$WParamHiWord,$LParamLoWord,$LParamHiWord) $WParam = _WinAPI_MakeLong($WParamLoWord,$WParamHiWord) $LParam = _WinAPI_MakeLong($LParamLoWord,$LParamHiWord) Return _SendMessage($ConnectHWnd,$MsgId,$WParam,$LParam) EndFunc Func RegisterMsg($NewStrMsgName,$MsgFunction) $NewMsgId = RegisterWindowMessage($NewStrMsgName) if @error Then Return SetError(1,0,0) GUIRegisterMsg($NewMsgId,$MsgFunction) if @error Then Return SetError(2,0,0) Return SetError(0,0,$NewMsgId) EndFunc Func FindWindowEx($hwndParent,$hwndChildAfter,$lpszClass,$lpszWindow) Local $DataTypeA = "int" , $DataTypeB = "int" if IsString($lpszClass) Then $DataTypeA = "WSTR" if IsString($lpszWindow) Then $DataTypeB = "WSTR" $RT = DllCall("User32.dll","HWND","FindWindowExW","HWND",$hwndParent,"HWND",$hwndChildAfter, _ $DataTypeA,$lpszClass,$DataTypeB,$lpszWindow) if @error Or $RT[0] = 0 Then Return SetError(1,0,0) Return SetError(0,0,$RT[0]) EndFunc Func RegisterWindowMessage($lpString) $RT = DllCall("User32.dll","int","RegisterWindowMessageW","WSTR",$lpString) if @error Or $RT[0] = 0 Then Return SetError(1,0,0) Return SetError(0,0,$RT[0]) EndFunc
    1 point
  10. wolf9228

    connect Two program

    I do not think that it is possible to manipulate objects and structures Directly Through the function send message but can transfer stored in the point and then re- Configured again objects can be through windows functions stored in the structures Such functions HBITMAP Obj GetDIBits SetDIBits HPEN Obj ExtCreatePen CreatePenIndirect
    1 point
  11. wolf9228

    connect Two program

    Yes, you can send a Struct Pointer .. See this example ProgramA.au3 #Include <WinAPI.au3> #Include <SendMessage.au3> #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global $ConnectOK = 99999 , $iGuiHwnd = 0 , $ConnectHWnd , $ConnectMsg $GuiHwnd = GUICreate("ProgramA", 199, 147, 88, 177) $Button1 = GUICtrlCreateButton("GetConnectHWnd", 16, 16, 169, 33, $WS_GROUP) $Button2 = GUICtrlCreateButton("SendMessage", 13, 69, 169, 33, $WS_GROUP) $ConnectMsg = RegisterConnectMsg("ConnectMsg","Password") $DataTransferMsg = RegisterMsg("DataTransferMsg","DataTransferMsgProc") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $ConnectHWnd = GetConnectHWnd($GuiHwnd) if ($ConnectHWnd) Then MsgBox(0,"MSG","Ok") Case $Button2 if ($ConnectHWnd) Then $StructTag = "int var1;ubyte var2;uint var3;char var4[128]" $Struct = DllStructCreate($StructTag) DllStructSetData($Struct,"var1",-1) DllStructSetData($Struct,"var2",255) DllStructSetData($Struct,"var3",-1) DllStructSetData($Struct,"var4","Hello") DllStructSetData($Struct,"var4",Asc("h"),1) $StructPtr = DllStructGetPtr($Struct) _SendMessage($ConnectHWnd,$DataTransferMsg,_WinAPI_GetCurrentProcessID(),$StructPtr) EndIf EndSwitch WEnd Func DataTransferMsgProc($hWnd,$Msg,$ProcessID,$Pointer) $StructTag = "int var1;ubyte var2;uint var3;char var4[128]" $Struct = Read_Pointer_FromProcessMemory($ProcessID,$Pointer,$StructTag) MsgBox(0,"DllStruct From ProgramB TO ProgramA", _ "Struct Size: " & DllStructGetSize($Struct) & @CRLF & _ "Struct pointer: " & DllStructGetPtr($Struct) & @CRLF & _ "Data:" & @CRLF & _ DllStructGetData($Struct,1) & @CRLF & _ DllStructGetData($Struct,2) & @CRLF & _ DllStructGetData($Struct,3) & @CRLF & _ DllStructGetData($Struct,4)) Return 1 EndFunc Func Read_Pointer_FromProcessMemory($ProcessID,$Pointer,$StructTag) Local $iSYNCHRONIZE = (0x00100000),$iSTANDARD_RIGHTS_REQUIRED = (0x000F0000) Local $iPROCESS_ALL_ACCESS = ($iSTANDARD_RIGHTS_REQUIRED + $iSYNCHRONIZE + 0xFFF) Local $hProcess , $Struct , $StructPtr , $StructSize , $iRead $hProcess = _WinAPI_OpenProcess($iPROCESS_ALL_ACCESS,False,$ProcessID) if @error Then Return SetError(@error,1,$Struct) $Struct = DllStructCreate($StructTag) $StructSize = DllStructGetSize($Struct) $StructPtr = DllStructGetPtr($Struct) _WinAPI_ReadProcessMemory($hProcess,$Pointer,$StructPtr,$StructSize,$iRead) Return SetError(@error,2,$Struct) EndFunc Func RegisterConnectMsg($NewStrMsgConnect,$EncryptPassword) $NewMsgId = RegisterWindowMessage(String($EncryptPassword & $NewStrMsgConnect)) if @error Then Return SetError(2,0,0) GUIRegisterMsg($NewMsgId,"ConnectProc") if @error Then Return SetError(3,0,0) Return SetError(0,0,$NewMsgId) EndFunc Func GetConnectHWnd($GuiHwnd,$TimeOut = 10000) if Not IsHWnd($GuiHwnd) Then Return SetError(1,0,0) Local $RT = 0 , $HWND = 0 , $begin = TimerInit() While 1 $HWND = FindWindowEx(0,$HWND,0,0) if ($GuiHwnd = $HWND) Then ContinueLoop $RT = _SendMessage($HWND,$ConnectMsg,0,0) if ($RT = $ConnectOK) Or TimerDiff($begin) >= $TimeOut Then ExitLoop WEnd if ($RT <> $ConnectOK) Then Return SetError(4,0,0) Return SetError(0,0,$HWND) EndFunc Func ConnectProc($hWnd,$Msg,$wParam,$lParam) Return $ConnectOK EndFunc Func RegisterMsg($NewStrMsgName,$MsgFunction) $NewMsgId = RegisterWindowMessage($NewStrMsgName) if @error Then Return SetError(1,0,0) GUIRegisterMsg($NewMsgId,$MsgFunction) if @error Then Return SetError(2,0,0) Return SetError(0,0,$NewMsgId) EndFunc Func FindWindowEx($hwndParent,$hwndChildAfter,$lpszClass,$lpszWindow) Local $DataTypeA = "int" , $DataTypeB = "int" if IsString($lpszClass) Then $DataTypeA = "WSTR" if IsString($lpszWindow) Then $DataTypeB = "WSTR" $RT = DllCall("User32.dll","HWND","FindWindowExW","HWND",$hwndParent,"HWND",$hwndChildAfter, _ $DataTypeA,$lpszClass,$DataTypeB,$lpszWindow) if @error Or $RT[0] = 0 Then Return SetError(1,0,0) Return SetError(0,0,$RT[0]) EndFunc Func RegisterWindowMessage($lpString) $RT = DllCall("User32.dll","int","RegisterWindowMessageW","WSTR",$lpString) if @error Or $RT[0] = 0 Then Return SetError(1,0,0) Return SetError(0,0,$RT[0]) EndFunc ProgramB.au3 #Include <WinAPI.au3> #Include <SendMessage.au3> #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global $ConnectOK = 99999 , $iGuiHwnd = 0 , $ConnectHWnd , $ConnectMsg $GuiHwnd = GUICreate("ProgramB", 199, 147, 88, 177) $Button1 = GUICtrlCreateButton("GetConnectHWnd", 16, 16, 169, 33, $WS_GROUP) $Button2 = GUICtrlCreateButton("SendMessage", 13, 69, 169, 33, $WS_GROUP) $ConnectMsg = RegisterConnectMsg("ConnectMsg","Password") $DataTransferMsg = RegisterMsg("DataTransferMsg","DataTransferMsgProc") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $ConnectHWnd = GetConnectHWnd($GuiHwnd) if ($ConnectHWnd) Then MsgBox(0,"MSG","Ok") Case $Button2 if ($ConnectHWnd) Then $StructTag = "int var1;ubyte var2;uint var3;char var4[128]" $Struct = DllStructCreate($StructTag) DllStructSetData($Struct,"var1",-2) DllStructSetData($Struct,"var2",555) DllStructSetData($Struct,"var3",-2) DllStructSetData($Struct,"var4","Autoit") DllStructSetData($Struct,"var4",Asc("A"),1) $StructPtr = DllStructGetPtr($Struct) _SendMessage($ConnectHWnd,$DataTransferMsg,_WinAPI_GetCurrentProcessID(),$StructPtr) EndIf EndSwitch WEnd Func DataTransferMsgProc($hWnd,$Msg,$ProcessID,$Pointer) $StructTag = "int var1;ubyte var2;uint var3;char var4[128]" $Struct = Read_Pointer_FromProcessMemory($ProcessID,$Pointer,$StructTag) MsgBox(0,"DllStruct From ProgramA TO ProgramB", _ "Struct Size: " & DllStructGetSize($Struct) & @CRLF & _ "Struct pointer: " & DllStructGetPtr($Struct) & @CRLF & _ "Data:" & @CRLF & _ DllStructGetData($Struct,1) & @CRLF & _ DllStructGetData($Struct,2) & @CRLF & _ DllStructGetData($Struct,3) & @CRLF & _ DllStructGetData($Struct,4)) Return 1 EndFunc Func Read_Pointer_FromProcessMemory($ProcessID,$Pointer,$StructTag) Local $iSYNCHRONIZE = (0x00100000),$iSTANDARD_RIGHTS_REQUIRED = (0x000F0000) Local $iPROCESS_ALL_ACCESS = ($iSTANDARD_RIGHTS_REQUIRED + $iSYNCHRONIZE + 0xFFF) Local $hProcess , $Struct , $StructPtr , $StructSize , $iRead $hProcess = _WinAPI_OpenProcess($iPROCESS_ALL_ACCESS,False,$ProcessID) if @error Then Return SetError(@error,1,$Struct) $Struct = DllStructCreate($StructTag) $StructSize = DllStructGetSize($Struct) $StructPtr = DllStructGetPtr($Struct) _WinAPI_ReadProcessMemory($hProcess,$Pointer,$StructPtr,$StructSize,$iRead) Return SetError(@error,2,$Struct) EndFunc Func RegisterConnectMsg($NewStrMsgConnect,$EncryptPassword) $NewMsgId = RegisterWindowMessage(String($EncryptPassword & $NewStrMsgConnect)) if @error Then Return SetError(2,0,0) GUIRegisterMsg($NewMsgId,"ConnectProc") if @error Then Return SetError(3,0,0) Return SetError(0,0,$NewMsgId) EndFunc Func GetConnectHWnd($GuiHwnd,$TimeOut = 10000) if Not IsHWnd($GuiHwnd) Then Return SetError(1,0,0) Local $RT = 0 , $HWND = 0 , $begin = TimerInit() While 1 $HWND = FindWindowEx(0,$HWND,0,0) if ($GuiHwnd = $HWND) Then ContinueLoop $RT = _SendMessage($HWND,$ConnectMsg,0,0) if ($RT = $ConnectOK) Or TimerDiff($begin) >= $TimeOut Then ExitLoop WEnd if ($RT <> $ConnectOK) Then Return SetError(4,0,0) Return SetError(0,0,$HWND) EndFunc Func ConnectProc($hWnd,$Msg,$wParam,$lParam) Return $ConnectOK EndFunc Func RegisterMsg($NewStrMsgName,$MsgFunction) $NewMsgId = RegisterWindowMessage($NewStrMsgName) if @error Then Return SetError(1,0,0) GUIRegisterMsg($NewMsgId,$MsgFunction) if @error Then Return SetError(2,0,0) Return SetError(0,0,$NewMsgId) EndFunc Func FindWindowEx($hwndParent,$hwndChildAfter,$lpszClass,$lpszWindow) Local $DataTypeA = "int" , $DataTypeB = "int" if IsString($lpszClass) Then $DataTypeA = "WSTR" if IsString($lpszWindow) Then $DataTypeB = "WSTR" $RT = DllCall("User32.dll","HWND","FindWindowExW","HWND",$hwndParent,"HWND",$hwndChildAfter, _ $DataTypeA,$lpszClass,$DataTypeB,$lpszWindow) if @error Or $RT[0] = 0 Then Return SetError(1,0,0) Return SetError(0,0,$RT[0]) EndFunc Func RegisterWindowMessage($lpString) $RT = DllCall("User32.dll","int","RegisterWindowMessageW","WSTR",$lpString) if @error Or $RT[0] = 0 Then Return SetError(1,0,0) Return SetError(0,0,$RT[0]) EndFunc
    1 point
×
×
  • Create New...