
#include <GUIConstants.au3> #include <STRING.AU3> #include <Process.au3> Global $text, $password, $text2 $Form1_1 = GUICreate("FLEXY", 408, 305, 326, 434) $Group1 = GUICtrlCreateGroup("Encrypt / Decrypt", 16, 8, 377, 121) $Input1 = GUICtrlCreateInput("", 64, 32, 121, 21) $Input2 = GUICtrlCreateInput("", 256, 32, 121, 21) $Label1 = GUICtrlCreateLabel("Text :", 24, 36, 31, 17) $Label2 = GUICtrlCreateLabel("Password :", 192, 36, 56, 17) $Input3 = GUICtrlCreateInput("", 64, 64, 313, 21) $Label3 = GUICtrlCreateLabel("Result :", 24, 68, 40, 17) $Button1 = GUICtrlCreateButton("Encrypt", 24, 96, 65, 25, 0) $Button2 = GUICtrlCreateButton("Decrypt", 88, 96, 65, 25, 0) $Button3 = GUICtrlCreateButton("Copy Result", 152, 96, 73, 25, 0) $Checkbox1 = GUICtrlCreateCheckbox("Remove Text", 296, 100, 89, 17) GUICtrlSetTip(-1, "Remove text after Encrypt/Decrypt") $Button4 = GUICtrlCreateButton("Reset", 224, 96, 57, 25, 0) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group2 = GUICtrlCreateGroup("Embeding compressed file in JPG file", 16, 136, 377, 153) $config = GUICtrlCreateInput("", 96, 160, 281, 21) $configbutton = GUICtrlCreateButton("Picture file :", 24, 160, 65, 21, 0) $comp = GUICtrlCreateInput("", 120, 192, 257, 21) $compbutton = GUICtrlCreateButton("Compressed file :", 24, 192, 89, 21, 0) $output = GUICtrlCreateInput("", 104, 224, 273, 21) $outputbutton = GUICtrlCreateButton("Output JPG :", 24, 224, 75, 21, 0) $ok = GUICtrlCreateButton("Embed in JPG file", 24, 256, 99, 25, 0) $Label4 = GUICtrlCreateLabel("Status : Ready.", 136, 260, 243, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $Button1 beforecrypt() $Cryped = crypt($text, $password, 0) GUICtrlSetData($Input3, $Cryped) If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then GUICtrlSetData($Input1, "") Case $msg = $Button2 beforecrypt() $Decrypt = crypt($text2, $password, 1) GUICtrlSetData($Input3, $Decrypt) If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then GUICtrlSetData($Input1, "") Case $msg = $Button3 $clip = StringFormat(GUICtrlRead($Input3)) ClipPut($clip) Case $msg = $Button4 GUICtrlSetData($Input1, "") GUICtrlSetData($Input2, "") GUICtrlSetData($Input3, "") Case $msg = $configbutton $configfilename = FileOpenDialog('Please choose the Picture file...', '', 'Picture files (*.jpg)|All files (*.*)', 1 + 4) If @error <> 1 Then GUICtrlSetData($config, $configfilename) Case $msg = $compbutton $compfilename = FileOpenDialog('Please choose the Compressed file...', '', 'Compressed files (*.7z;*.rar;*.zip)|All files (*.*)', 1 + 4) GUICtrlSetData($comp, $compfilename) Case $msg = $outputbutton $outfilename = FileSaveDialog('Please choose your output JPG file...', '', 'JPG files (*.jpg)|All files (*.*)', 1 + 4) If $outfilename <> "" Then $outfilename = $outfilename & ".jpg" GUICtrlSetData($output, $outfilename) EndIf Case $msg = $ok If (StringLen(GUICtrlRead($config)) == 0) Then MsgBox(0, "Picture file", "Picture file must be chosen!") ElseIf (StringLen(GUICtrlRead($comp)) == 0) Then MsgBox(0, "Compressed file", "Compressed file must be chosen!") ElseIf (StringLen(GUICtrlRead($output)) == 0) Then MsgBox(0, "Output JPG", "Output JPG must be chosen!") Else $realoutput = GUICtrlRead($output) _RunDOS('copy /b ' & '"' & $configfilename & '"' & ' + ' & '"' & $compfilename & '" ' & '"' & $realoutput & '"') If @error = 0 Then GUICtrlSetData($Label4, "Status : JPEG file created.") Else GUICtrlSetData($Label4, "Status : Error.") EndIf EndIf EndSelect WEnd Func beforecrypt() $text = GUICtrlRead($Input1) $password = GUICtrlRead($Input2) $text2 = $text EndFunc ;==>beforecrypt Func crypt($t, $pw, $type) If $type = 1 Then $t = _HexToString($t) $Terug = "" $pwlen = StringLen($password) $textlen = StringLen($t) Dim $text[$textlen + 1] For $z = 1 To $pwlen For $i = 1 To $textlen $text[$i] = Hex(BitXOR(Asc(StringMid($t, $i, 1)), Asc(StringMid($pw, $z, 1))), 2) Next Next For $i = 1 To UBound($text) - 1 If $type = 1 Then $Terug &= Chr(Dec($text[$i])) If $type <> 1 Then $Terug &= $text[$i] Next Return $Terug EndFunc ;==>cryptoÝ÷ Ù«¢+Ø¥¹±Õ±ÐíU% ½¹ÍÑ ¹Ñ̹ ÔÌÐì()±½ °ÀÌØíQ½Ñ ±¥Í¬°ÀÌØíɥͬ°ÀÌØíAɥͬ°ÀÌØí¥Ḭ́ÀÌØíA½Ìô´ÄÔ°ÀÌØí1 ±lÄÁt°ÀÌØíAɽÉÍÍlÄÁt°ÀÌØí¥ÉÍÐôQÉÕ°ÀÌØí ÕÑѽ¸°ÀÌØí ½Áä°ÀÌØíQ¥µÈ()! ɥͬ ¤()]¡¥±Ä($ÀÌØí ¥¸ôQ¥µÉ%¹¥Ð ¤($ÀÌØí¹5ÍôU%Ñ5Í ¤(%MÝ¥Ñ ÀÌØí¹5Í($% ÍÀÌØíU%}Y9Q} 1=M($$%á¥Ð($% ÍÀÌØí ÕÑѽ¸($$% ±¥ÁAÕÐ ÀÌØí ½Áä¤(%¹MÝ¥Ñ (%}Q¥µÈ ÀÌØí ¥¸°Ô°ÅÕ½Ðí! ɥͬÅÕ½Ðì¤)]¹()Õ¹! ɥͬ ¤($ÀÌØí¥ÍÌôÉ¥ÙÑÉ¥Ù ÅÕ½Ðí¥áÅÕ½Ðì¤(%%ÀÌØí¥ÉÍÐôQÉÕQ¡¸ É Ñ½É´ ÀÌØí¥ÍÍlÁt¤($ÀÌØí ½ÁäôÅÕ½ÐìÅÕ½Ðì($ÀÌØí±±Ñ½Ñ ±¥Í¬ôÅÕ½ÐìÅÕ½Ðì($ÀÌØí±±É¥Í¬ôÅÕ½ÐìÅÕ½Ðì(%½ÈÀÌØí¤ôÄQ¼ÀÌØí¥ÍÍlÁt($% ¡! ɥͬ ÀÌØí¤¤($$ÀÌØí ÑôÀÌØí¥ÍÍlÀÌØí¥t µÀìÅÕ½ÐìÅÕ½Ðì µÀìÀÌØíɥͬ µÀìÅÕ½Ðí¼ÅÕ½Ðì µÀìÀÌØíQ½Ñ ±¥Í¬ µÀìÅÕ½Ðí ÅÕ½Ðì µÀìÀÌØíAɥͬ µÀìÅÕ½Ðì¤ÅÕ½Ðì($%]É¥Ñ ÀÌØí Ѥ($% É ÑÕ¤ ÀÌØí ѰÀÌØí¤¤($$ÀÌØí±±Ñ½Ñ ±¥Í¬¬ôÀÌØíQ½Ñ ±¥Í¬($$ÀÌØí±±É¥Í¬¬ôÀÌØíɥͬ(%9áÐ($ÀÌØíAɥͬôI½Õ¹ ÀÌØí±±É¥Í¬¼ÀÌØí±±Ñ½Ñ ±¥Í¬¤¨ÄÀÀ°È¤($ÀÌØí ÑôÅÕ½ÐíQ½Ñ °ÍÁ èÅÕ½Ðì µÀìÀÌØí±±É¥Í¬ µÀìÅÕ½Ðí¼ÅÕ½Ðì µÀìÀÌØí±±Ñ½Ñ ±¥Í¬ µÀìÅÕ½Ðí ÅÕ½Ðì µÀìÀÌØíAɥͬ µÀìÅÕ½Ðì¤ÅÕ½Ðì(%]É¥Ñ ÀÌØí Ѥ(% É ÑÕ¤ ÀÌØí ѰÀÌØí¥ÍÍlÁt¬Ä¤)¹Õ¹ìôôÐí! ɥͬ()Õ¹ ¡! ɥͬ ÀÌØí¥Í¬¤($ÀÌØíQ½Ñ ±¥Í¬ôI½Õ¹¡É¥ÙMÁ Q½Ñ ° ÀÌØí¥ÍÍlÀÌØí¥Ít¤¼ÄÀÈаȤ($ÀÌØíɥͬôI½Õ¹¡É¥ÙMÁ É ÀÌØí¥ÍÍlÀÌØí¥Ít¤¼ÄÀÈаȤ($ÀÌØíAɥͬôI½Õ¹ ÀÌØíɥͬ¼ÀÌØíQ½Ñ ±¥Í¬¤¨ÄÀÀ°È¤)¹Õ¹ìôôÐí ¡! ɥͬ()Õ¹ É Ñ½É´ ÀÌØíM¥é¤($ÀÌØí½É´ôU% É Ñ ÅÕ½Ðí1adÅÕ½Ðì°ÌÌÀ° ÀÌØíM¥é¨ÔÀ¤¬ÄÀÀ°ÌÐÀ°ÌØÄ¤($ÀÌØí ÕÑѽ¸ôU% Ñɱ É Ñ ÕÑѽ¸ ÅÕ½Ðí ½ÁäѼ±¥Á½ ÉÅÕ½Ðì°à° ÀÌØíM¥é¨ÔÀ¤¬ØÔ°ÄÄ̰ÈÔ°À¤($ÀÌØí¥ÉÍÐô ±Í(%U%MÑMÑ Ñ¡M]}M!=¤)¹Õ¹ìôôÐí É Ñ½É´()Õ¹ É ÑÕ¤ ÀÌØí ѰÀÌØí¤¤(%%U% ÑɱI ÀÌØí1 ±lÀÌØí¥t¤ôÅÕ½ÐìÅÕ½ÐìQ¡¸($$ÀÌØíA½Ì¬ôÈÔ($$ÀÌØí1 ±lÀÌØí¥tôU% Ñɱ É Ñ1 ° ÀÌØí Ѱà°ÀÌØíA½Ì°ÌÄÔ°Äܤ($$ÀÌØíA½Ì¬ôÈÔ($$ÀÌØíAɽÉÍÍlÀÌØí¥tôU% Ñɱ É ÑAɽÉÍÌ à°ÀÌØíA½Ì°ÌÄ̰Äܤ($$ÀÌØíAɥͬôÄÀÀ´ÀÌØíAɥͬ($%U% ÑɱMÑ Ñ ´Ä°ÀÌØíAɥͬ¤(%±Í($%U% Ñɱ±Ñ ÀÌØí1 ±lÀÌØí¥t¤($$ÀÌØíA½Ì¬ôÈÔ($$ÀÌØí1 ±lÀÌØí¥tôU% Ñɱ É Ñ1 ° ÀÌØí Ѱà°ÀÌØíA½Ì°ÌÄÔ°Äܤ($%U% Ñɱ±Ñ ÀÌØíAɽÉÍÍlÀÌØí¥t¤($$ÀÌØíA½Ì¬ôÈÔ($$ÀÌØíAɽÉÍÍlÀÌØí¥tôU% Ñɱ É ÑAɽÉÍÌ à°ÀÌØíA½Ì°ÌÄ̰Äܤ($$ÀÌØíAɥͬôÄÀÀ´ÀÌØíAɥͬ($%U% ÑɱMÑ Ñ ´Ä°ÀÌØíAɥͬ¤(%¹%(%%ÀÌØí¤ÐìÀÌØí¥ÍÍlÁtQ¡¸($$ÀÌØíA½Ìô´ÄÔ(%¹%)¹Õ¹ìôôÐí É ÑÕ¤()Õ¹]É¥Ñ ÀÌØí Ѥ(%%ÀÌØí ½ÁäôÅÕ½ÐìÅÕ½ÐìQ¡¸($$ÀÌØí ½ÁäôÀÌØí Ñ(%±Í($$ÀÌØí ½ÁäôÀÌØí ½Áä µÀì I1 µÀìÀÌØí Ñ(%¹%)¹Õ¹ìôôÐí]É¥Ñ()Õ¹}Q¥µÈ ÀÌØíY ȰÀÌØíM°ÀÌØíÕ¹¤($ÀÌØíQ¥µÉ¥ôQ¥µÉ¥ ÀÌØíY Ȥ($ÀÌØíQ¥µÈ¬ôÀÌØíQ¥µÉ¥¼ÄÀÀÀ(%%ÀÌØíQ¥µÈÐìÀÌØíMQ¡¸($$ÀÌØíQ¥µÈôÀ($% ±° ÀÌØíÕ¹¤(%¹%)¹Õ¹
Edited by Jex, 24 October 2007 - 03:54 PM.






