Lad die eine native Dll, binde sie über FileInstall ein und nutz DllCall. Es gibt auch eine UDF im Dols direkt in den RAM zu laden, so hast du kein Tempfiles.
If the function call fails then @error is set to 1. Otherwise an array is returned that contains the function return value and a copy of all the parameters (including parameters that the function may have modified when passed by reference).
$return[0] = function return value
$return[1] = param1
$return[2] = param2
...
$return[n] = paramn
php und autoit sind sich so ähnlich, das eigentlich auch ein par einfache search und replaces ausreichen sollten, um den code in autoit zu konvertieren.
Ich nutze Arraydisplay, was anspringen sollte, sobald die Variable ein Array ist -.-
Quote:
Originally Posted by lolkop
gibts das ganze zb auch in php realisiert.
php und autoit sind sich so ähnlich, das eigentlich auch ein par einfache search und replaces ausreichen sollten, um den code in autoit zu konvertieren.
Danke werds mir anschauen
EDIT:
Habs jetzt damit probiert aber klappt nich
Versteh einfach nich was das Problem ist >_<
If ($iterations == 3) Then
If $encrypt == 1 Then
Local $looping[3] = [0, 32, 2]
Else
Local $looping[3] = [30, -2, -2]
EndIf
Else
If $encrypt == 1 Then
Local $looping[9] = [0, 32, 2, 62, 30, -2, 64, 96, 2]
Else
Local $looping[9] = [94, 62, -2, 32, 64, 2, 30, -2, -2]
EndIf
EndIf
If $encrypt == 1 Then
$fill = 8
If Mod(StringLen($message), 8) <> 0 Then
$fill = 8 - Mod(StringLen($message), 8)
EndIf
For $i = 1 To $fill
$message &= Chr($fill)
Next
EndIf
$len = StringLen($message)
; store the result here
$result = ""
$tempresult = ""
; for Cipher Block Chaining mode, xor the message with the previous result
If $mode == 1 Then
If $encrypt Then
$left = BitXOR($left, $cbcleft)
$right = BitXOR($right, $cbcright)
Else
$cbcleft2 = $cbcleft
$cbcright2 = $cbcright
$cbcleft = $left
$cbcright = $right
EndIf
EndIf
; first each 64 but chunk of the message must be permuted according to IP
$temp = BitAND(BitXOR(BitAND(BitShift($left, 4), $masks[4]), $right), 0x0f0f0f0f)
$right = BitXOR($right, $temp)
$left = BitXOR($left, BitShift($temp, -4))
; do this either 1 or 3 times for each chunk of the message
For $j = 0 To $iterations - 1 Step 3
$endloop = $looping[$j + 1]
$loopinc = $looping[$j + 2]
; now go through and perform the encryption or decryption
$i = $looping[$j]
While $i <> $endloop ; for efficiency
$right1 = BitXOR($right, $keys[$i])
$right2 = BitXOR(BitOR(BitAND(BitShift($right, 4), $masks[4]), BitShift($right, -28)), $keys[$i + 1])
; the result is attained by passing these bytes through the S selection functions
$temp = $left
$left = $right
$right = BitXOR($temp, BitOR($spfunction2[BitAND(BitAND(BitShift($right1, 24), $masks[24]), 0x3f) ], $spfunction4[BitAND(BitAND(BitShift($right1, 16), $masks[16]), 0x3f) ], $spfunction6[BitAND(BitAND(BitShift($right1, 8), $masks[8]), 0x3f) ], $spfunction8[BitAND($right1, 0x3f) ], $spfunction1[BitAND(BitAND(BitShift($right2, 24), $masks[24]), 0x3f) ], $spfunction3[BitAND(BitAND(BitShift($right2, 16), $masks[16]), 0x3f) ], $spfunction5[BitAND(BitAND(BitShift($right2, 8), $masks[8]), 0x3f) ], $spfunction7[BitAND($right2, 0x3f) ]))
$i += $loopinc
WEnd
; unreverse left and right
$temp = $left
$left = $right
$right = $temp
Next ; for either 1 or 3 iterations
; move then each one bit to the right
$left = BitOR(BitAND(BitShift($left, 1), $masks[1]), BitShift($left, -31))
$right = BitOR(BitAND(BitShift($right, 1), $masks[1]), BitShift($right, -31))
; now perform IP-1, which is IP in the opposite direction
$temp = BitAND(BitXOR(BitAND(BitShift($left, 1), $masks[1]), $right), 0x55555555)
$right = BitXOR($right, $temp)
$left = BitXOR($left, BitShift($temp, -1))
; how many iterations (1 for des, 3 for triple des)
If StringLen($key) == 48 Then
Local $iterations = 3
ElseIf StringLen($key) == 16 Then
Local $iterations = 1
Else
SetError(1)
Return 0
EndIf
; stores the return keys
Local $keys[32 * $iterations]
; now define the left shifts which need to be done
Local $shifts[16] = [0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0]
; other variables
Local $lefttemp, $righttemp, $m = 0, $n = 0, $temp
; the right side needs to be shifted and to get the last four bits of the left side
$temp = BitOR(BitShift($left, -8), BitAND(BitAND(BitShift($right, 20), $masks[20]), 0x000000f0))
; left needs to be put upside down
$left = BitOR(BitShift($right, -24), BitAND(BitShift($right, -8), 0xff0000), BitAND(BitAND(BitShift($right, 8), $masks[8]), 0xff00), BitAND(BitAND(BitShift($right, 24), $masks[24]), 0xf0))
$right = $temp
; now go through and perform these shifts on the left and right keys
For $i = 0 To UBound($shifts) - 1
; shift the keys either one or two bits to the left
If $shifts[$i] == 1 Then
$left = BitOR(BitShift($left, -2), BitAND(BitShift($left, 26), $masks[26]))
$right = BitOR(BitShift($right, -2), BitAND(BitShift($right, 26), $masks[26]))
Else
$left = BitOR(BitShift($left, -1), BitAND(BitShift($left, 27), $masks[27]))
$right = BitOR(BitShift($right, -1), BitAND(BitShift($right, 27), $masks[27]))
EndIf
$left = BitAND($left, -0xf)
$right = BitAND($right, -0xf)
; now apply PC-2, in such a way that E is easier when encrypting or decrypting
; this conversion will look like PC-2 except only the last 6 bits of each byte are used
; rather than 48 consecutive bits and the order of lines will be according to
; how the S selection functions will be applied: S2, S4, S6, S8, S1, S3, S5, S7
$lefttemp = BitOR($pc2bytes0[BitAND(BitShift($left, 28), $masks[28]) ], $pc2bytes1[BitAND(BitAND(BitShift($left, 24), $masks[24]), 0xf) ], $pc2bytes2[BitAND(BitAND(BitShift($left, 20), $masks[20]), 0xf) ], $pc2bytes3[BitAND(BitAND(BitShift($left, 16), $masks[16]), 0xf) ], $pc2bytes4[BitAND(BitAND(BitShift($left, 12), $masks[12]), 0xf) ], $pc2bytes5[BitAND(BitAND(BitShift($left, 8), $masks[8]), 0xf) ], $pc2bytes6[BitAND(BitAND(BitShift($left, 4), $masks[4]), 0xf) ])
$righttemp = BitOR($pc2bytes7[BitAND(BitShift($right, 28), $masks[28]) ], $pc2bytes8[BitAND(BitAND(BitShift($right, 24), $masks[24]), 0xf) ], $pc2bytes9[BitAND(BitAND(BitShift($right, 20), $masks[20]), 0xf) ], $pc2bytes10[BitAND(BitAND(BitShift($right, 16), $masks[16]), 0xf) ], $pc2bytes11[BitAND(BitAND(BitShift($right, 12), $masks[12]), 0xf) ], $pc2bytes12[BitAND(BitAND(BitShift($right, 8), $masks[8]), 0xf) ], $pc2bytes13[BitAND(BitAND(BitShift($right, 4), $masks[4]), 0xf) ])
$temp = BitAND(BitXOR(BitAND(BitShift($righttemp, 16), $masks[16]), $lefttemp), 0x0000ffff)
$keys[$n] = BitXOR($lefttemp, $temp)
$keys[$n + 1] = BitXOR($righttemp, BitShift($temp, -16))
$n += 2
Next
Next ; for each iterations
; return the keys we've created
Return $keys
EndFunc ;==>des_createKeys
Func stringToHex($s)
Dim $result = "0x"
Dim $temp = StringSplit($s, "")
For $i = 1 To $temp[0]
$result &= Hex(Asc($temp[$i]), 2)
Next
Return $result
EndFunc ;==>stringToHex
Verschlüsseln? 01/14/2012 - Metin2 Private Server - 2 Replies Hab ne frage wie verschlüsselt mann Pack datein epk und eix datein ?
Verschlüsseln 04/17/2011 - Metin2 Private Server - 0 Replies Guten Abend,
lassen sich Metin2 P Server Dateien mit MD5 Verschlüsseln oder nur mit dem Verschlüsseler von Tim?
Es wäre gut, wenn ich heute schon alles verschlüsselt hätte.
Danke im voraus.
MfG netterwurm8
*.txt verschlüsseln 03/20/2011 - Main - 7 Replies hey com,
ich habe mal eine frage,
kann ich *.txt, also editor dateien irgendwie verschlüsseln?
also ncih nicht verschlüsseln, sondern so machen, das man sie öffnet,
alles sieht, aber trotzdem nichts ändern kann??
weil habe keine lust davon eine PDF zumachen!
naja, wenns nich anders geht, mach ich es hald,
aber hof auf ne antwort :)
epk eix verschlüsseln? 11/25/2010 - Metin2 Private Server - 6 Replies hey com,ist es möglich die epk und eix so zu verschlüsseln das der 2010er client sie lesen kann aber mir keiner in meinen datein rumpfuschen kann? also sie nicht entpacken kann?
verschlüsseln 05/12/2008 - Kal Online - 0 Replies also ich hab das pw von unity v2 herausgefunden und will jetzt die jobsystem-e datei wechseln also lösch ich die eine und tuh die neue rein muss jetzt noch die neue verschlüseln aber das klappt nicht ich hab schon viele sachenn gedownloaded und probiert die verschlüsseln alle aber das klappt trotztdem nie.deswegen wollt ich fragen wie ich es verschlüsseln soll.mit winrar verschlüsselt das garnet wen ich probiere.hab das jobsystem-e von zogga benutz der hat hier ma ein tut geschrieben.
und das...