Jump to content
phantomas90

[Crypt] Base64 encode/decode

Recommended Posts

Poate vi se pare de gradinita programul dar poate la unii le va fi folositor.

Executabilul: crypt.exe - 355.2 Kb

Compilat in AutoIT v3

Sursa:

#include <GUIConstantsEx.au3>

#include <EditConstants.au3>

#include <WindowsConstants.au3>

#include <Crypt.au3>

#include <WinAPI.au3>

;**************************************************

Func _Base64Encode($sData)

Local $oXml = ObjCreate("Msxml2.DOMDocument")

If Not IsObj($oXml) Then

SetError(1, 1, 0)

EndIf

Local $oElement = $oXml.createElement("b64")

If Not IsObj($oElement) Then

SetError(2, 2, 0)

EndIf

$oElement.dataType = "bin.base64"

$oElement.nodeTypedValue = Binary($sData)

Local $sReturn = $oElement.Text

If StringLen($sReturn) = 0 Then

SetError(3, 3, 0)

EndIf

Return $sReturn

EndFunc

;*************************************************

Func _Base64Decode($sData)

Local $oXml = ObjCreate("Msxml2.DOMDocument")

If Not IsObj($oXml) Then

SetError(1, 1, 0)

EndIf

Local $oElement = $oXml.createElement("b64")

If Not IsObj($oElement) Then

SetError(2, 2, 0)

EndIf

$oElement.dataType = "bin.base64"

$oElement.Text = $sData

Local $sReturn = BinaryToString($oElement.nodeTypedValue, 4)

If StringLen($sReturn) = 0 Then

SetError(3, 3, 0)

EndIf

Return $sReturn

EndFunc

;*******************************************************

GUICreate("Encrypt",200,250,100,100,-1)

GUISetState(@SW_SHOW)

GUICtrlCreateLabel("Text in clar:",10,10,200,20,-1)

GUICtrlCreateLabel("Text criptat:",10,100,200,20,-1)

$text_input=GUICtrlCreateEdit("",10,30,180,50,$ES_AUTOVSCROLL)

$text_output=GUICtrlCreateEdit("",10,120,180,50,$ES_AUTOVSCROLL)

$buton_crypt=GUICtrlCreateButton("Crypt",100,80,90,20,-1)

$buton_decrypt=GUICtrlCreateButton("Decrypt",10,170,90,20,-1)

$buton_close=GUICtrlCreateButton("Close",130,220,60,20,-1)

while 1

$msg=guigetmsg()

if $msg=$buton_crypt Then

$text_clar=GUICtrlRead($text_input)

$text_criptat=_Base64Encode($text_clar)

GUICtrlSetData($text_output,$text_criptat,"")

EndIf

if $msg=$buton_decrypt Then

$text_criptat=GUICtrlRead($text_output)

$text_clar=_Base64Decode($text_criptat)

GUICtrlSetData($text_input,$text_clar,"")

EndIf

if $msg=$buton_close Then ExitLoop

if $msg=$GUI_EVENT_CLOSE Then ExitLoop

WEnd

Definitia functiilor _base64Encode si _base64Decode apartin forumului AutoIT!

Edited by phantomas90
Link to comment
Share on other sites

Cmin

Local $oXml = ObjCreate("Msxml2.DOMDocument")

cred ca la acest MsXML2.DOMDocument se refera eroarea ta.

Gamer l-am facut cand ma plictiseam, chiar nu aveam nici o idee. Si eu le folosesc pe cele online, de obicei au mai multe criptari la un loc.Sa vad cand ma mai plictisesc poate il dezvolt pe asta.

Text in clar
asta e exprimarea in toate cartile de criptografie.
Link to comment
Share on other sites

am incercat si eu acest decriptor dar fara succes,tocmai ce mi-am luat un script si am gasit cateva erori care imi dau dureri de cap,din care cea mai mare problema ar fi footer acolo incepe asa

eval(base64_decode("b2Jfc3RhcnQoKTsgJGNvZGVsb2NrX2R....... are 'nspemii de caractere,orice decryptor de base 64 care l-am incercat nu a reusit sa imi decripteze asta, ma poate ajuta si pe mine cineva daca este nevoie pun aici php-ul

Link to comment
Share on other sites

Primul base64:

http://pastebin.com/sXuDLdPK

Apoi, acel base64 din ce e in link-ul de mai sus e encryptat cu un xor simplu.

Si cred ca dupa aceea se ajunge la sursa originala. In loc de:

eval($codelock_decrypter["c"]);

Pui si tu:

echo $codelock_decrypter["c"];

Si te uiti in sursa paginii rezultate.

Edited by Nytro
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...