-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
378 changed files
with
19,512 additions
and
1,778,441 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Func GetCRC($FileCRC) | ||
Global $CRC32 = 0 | ||
Global $BufferSize = 0x20000 | ||
Global $FileHandle = FileOpen($FileCRC, 16) | ||
For $i = 1 To Ceiling(FileGetSize($FileCRC) / $BufferSize) | ||
$CRC32 = _CRC32(FileRead($FileHandle, $BufferSize), BitNot($CRC32)) | ||
Next | ||
FileClose($FileHandle) | ||
Return Hex($CRC32, 8) | ||
EndFunc ;GetCRC | ||
|
||
Func _CRC32($Data, $CRC32 = -1) | ||
Local $Opcode = '0xC800040053BA2083B8EDB9000100008D41FF516A0859D1E8730231D0E2F85989848DFCFBFFFFE2E78B5D088B4D0C8B451085DB7416E3148A1330C20FB6D2C1E80833849500FCFFFF43E2ECF7D05BC9C21000' | ||
Local $CodeBuffer = DllStructCreate("byte[" & BinaryLen($Opcode) & "]") | ||
DllStructSetData($CodeBuffer, 1, $Opcode) | ||
Local $Input = DllStructCreate("byte[" & BinaryLen($Data) & "]") | ||
DllStructSetData($Input, 1, $Data) | ||
Local $Ret = DllCall("user32.dll", "uint", "CallWindowProc", "ptr", DllStructGetPtr($CodeBuffer), _ | ||
"ptr", DllStructGetPtr($Input), _ | ||
"int", BinaryLen($Data), _ | ||
"uint", $CRC32, _ | ||
"int", 0) | ||
$Input = 0 | ||
$CodeBuffer = 0 | ||
Return $Ret[0] | ||
EndFunc ;_CRC32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#include-once | ||
|
||
;=============================================================================== | ||
; _UnicodeURLEncode() | ||
; Description: : Encodes an unicode string to be URL-friendly | ||
; Parameter(s): : $UnicodeURL - The Unicode String to Encode | ||
; Return Value(s): : The URL encoded string | ||
; Author(s): : Dhilip89 | ||
; Note(s): : - | ||
; | ||
;=============================================================================== | ||
|
||
Func _UnicodeURLEncode($UnicodeURL) | ||
$UnicodeBinary = StringToBinary ($UnicodeURL, 4) | ||
$UnicodeBinary2 = StringReplace($UnicodeBinary, '0x', '', 1) | ||
$UnicodeBinaryLength = StringLen($UnicodeBinary2) | ||
Local $EncodedString | ||
For $i = 1 To $UnicodeBinaryLength Step 2 | ||
$UnicodeBinaryChar = StringMid($UnicodeBinary2, $i, 2) | ||
If StringInStr("$-_.+!*'(),;/?:@=&abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", BinaryToString ('0x' & $UnicodeBinaryChar, 4)) Then | ||
$EncodedString &= BinaryToString ('0x' & $UnicodeBinaryChar) | ||
Else | ||
$EncodedString &= '%' & $UnicodeBinaryChar | ||
EndIf | ||
Next | ||
Return $EncodedString | ||
EndFunc ;==>_UnicodeURLEncode | ||
|
||
|
||
|
||
;=============================================================================== | ||
; _UnicodeURLDecode() | ||
; Description: : Tranlates a URL-friendly string to a normal string | ||
; Parameter(s): : $toDecode - The URL-friendly string to decode | ||
; Return Value(s): : The URL decoded string | ||
; Author(s): : nfwu, Dhilip89 | ||
; Note(s): : Modified from _URLDecode() that's only support non-unicode. | ||
; | ||
;=============================================================================== | ||
Func _UnicodeURLDecode($toDecode) | ||
Local $strChar = "", $iOne, $iTwo | ||
Local $aryHex = StringSplit($toDecode, "") | ||
For $i = 1 To $aryHex[0] | ||
If $aryHex[$i] = "%" Then | ||
$i = $i + 1 | ||
$iOne = $aryHex[$i] | ||
$i = $i + 1 | ||
$iTwo = $aryHex[$i] | ||
$strChar = $strChar & Chr(Dec($iOne & $iTwo)) | ||
Else | ||
$strChar = $strChar & $aryHex[$i] | ||
EndIf | ||
Next | ||
$Process = StringToBinary (StringReplace($strChar, "+", " ")) | ||
$DecodedString = BinaryToString ($Process, 4) | ||
Return $DecodedString | ||
EndFunc ;==>_UnicodeURLDecode | ||
#endregion |
Oops, something went wrong.