TehWoas Index du Forum
TehWoas
Site des challenges lobby
 
TehWoas Index du ForumFAQRechercherS’enregistrerConnexion

:: Source Crypter Vb.Net ::

 
Poster un nouveau sujet   Répondre au sujet    TehWoas Index du Forum -> Programmations Codages -> Sources Visual Basic
Sujet précédent :: Sujet suivant  
Auteur Message
TehWoas
Invité





MessagePosté le: Sam 15 Sep - 13:40 (2012)    Sujet du message: Source Crypter Vb.Net Répondre en citant

Une petite compile pour rendre fud vos crypter ! 
Rijndiael :


[quote]Public Shared Function Rijndaelcrypt(ByVal File As String, ByVal Key As String)

Dim oAesProvider As New RijndaelManaged

Dim btClear() As Byte

Dim btSalt() As Byte = New Byte() {1, 2, 3, 4, 5, 6, 7, 8}

Dim oKeyGenerator As New Rfc2898DeriveBytes(Key, btSalt)

oAesProvider.Key = oKeyGenerator.GetBytes(oAesProvider.Key.Length)

oAesProvider.IV = oKeyGenerator.GetBytes(oAesProvider.IV.Length)

Dim ms As New IO.MemoryStream

Dim cs As New CryptoStream(ms, _

oAesProvider.CreateEncryptor(), _

CryptoStreamMode.Write)

btClear = System.Text.Encoding.UTF8.GetBytes(File)

cs.Write(btClear, 0, btClear.Length)

cs.Close()

File = Convert.ToBase64String(ms.ToArray)

Return File

End Function


Public Shared Function RijndaelDecrypt(ByVal UDecryptU As String, ByVal UKeyU As String)

Dim XoAesProviderX As New RijndaelManaged

Dim XbtCipherX() As Byte

Dim XbtSaltX() As Byte = New Byte() {1, 2, 3, 4, 5, 6, 7, 8}

Dim XoKeyGeneratorX As New Rfc2898DeriveBytes(UKeyU, XbtSaltX)

XoAesProviderX.Key = XoKeyGeneratorX.GetBytes(XoAesProviderX.Key.Length)

XoAesProviderX.IV = XoKeyGeneratorX.GetBytes(XoAesProviderX.IV.Length)

Dim XmsX As New IO.MemoryStream

Dim XcsX As New CryptoStream(XmsX, XoAesProviderX.CreateDecryptor(), _

CryptoStreamMode.Write)

Try

XbtCipherX = Convert.FromBase64String(UDecryptU)

XcsX.Write(XbtCipherX, 0, XbtCipherX.Length)

XcsX.Close()

UDecryptU = System.Text.Encoding.UTF8.GetString(XmsX.ToArray)

Catch

End Try

Return UDecryptU


End Function
[/quote]Xor :

[quote]
Citation :Public Function Encrypt(ByVal CodeKey As String, ByVal DataIn As String) As String

Dim lonDataPtr As Long

Dim strDataOut As String

Dim temp As Integer

Dim tempstring As String

Dim intXOrValue1 As Integer

Dim intXOrValue2 As Integer

For lonDataPtr = 1 To Len(DataIn)

intXOrValue1 = Asc(Mid$(DataIn, lonDataPtr, 1))

intXOrValue2 = Asc(Mid$(CodeKey, ((lonDataPtr Mod Len(CodeKey)) + 1), 1))


temp = (intXOrValue1 Xor intXOrValue2)

tempstring = Hex(temp)

If Len(tempstring) = 1 Then tempstring = "0" & tempstring

strDataOut = strDataOut + tempstring

Next lonDataPtr

Return strDataOut

End Function


Public Function Decrypt(ByVal CodeKey As String, ByVal DataIn As String) As String

Dim lonDataPtr As Long

Dim strDataOut As String

Dim intXOrValue1 As Integer

Dim intXOrValue2 As Integer


For lonDataPtr = 1 To (Len(DataIn) / 2)

intXOrValue1 = Val("&H" & (Mid$(DataIn, (2 * lonDataPtr) - 1, 2)))

intXOrValue2 = Asc(Mid$(CodeKey, ((lonDataPtr Mod Len(CodeKey)) + 1), 1))


strDataOut = strDataOut + Chr(intXOrValue1 Xor intXOrValue2)

Next lonDataPtr

Return strDataOut

End Function

stub :




Public Function XOR(ByVal CodeKey As String, ByVal DataIn As String) As String

Dim lonDataPtr As Long

Dim strDataOut As String

Dim intXOrValue1 As Integer

Dim intXOrValue2 As Integer


For lonDataPtr = 1 To (Len(DataIn) / 2)

intXOrValue1 = Val("&H" & (Mid$(DataIn, (2 * lonDataPtr) - 1, 2)))

intXOrValue2 = Asc(Mid$(CodeKey, ((lonDataPtr Mod Len(CodeKey)) + 1), 1))


strDataOut = strDataOut + Chr(intXOrValue1 Xor intXOrValue2)

Next lonDataPtr

xEncryption = strDataOut


End Function
[/quote]Polymorphic stairs :

[quote]
Citation :Imports System.Text



Public Class PolyMorphicStairs
Overloads Shared Function PolyCrypt(ByVal Data As String, ByVal Key As String, Optional ByVal ExtraRounds As UInteger = 0) As String
Dim buff() As Byte = PolyCrypt(Encoding.Default.GetBytes(Data), Encoding.Default.GetBytes(Key), ExtraRounds)
PolyCrypt = Encoding.Default.GetString(buff)
Erase buff
End Function
Overloads Shared Function PolyDeCrypt(ByVal Data As String, ByVal Key As String, Optional ByVal ExtraRounds As UInteger = 0) As String
Dim buff() As Byte = PolyDeCrypt(Encoding.Default.GetBytes(Data), Encoding.Default.GetBytes(Key), ExtraRounds)
PolyDeCrypt = Encoding.Default.GetString(buff)
Erase buff
End Function
Overloads Shared Function PolyCrypt(ByRef Data() As Byte, ByVal Key() As Byte, Optional ByVal ExtraRounds As UInteger = 0) As Byte()
Array.Resize(Data, Data.Length + 1)
Data(Data.Length - 1) = Convert.ToByte(New Random().Next(1, 255))
For i = (Data.Length - 1) * (ExtraRounds + 1) To 0 Step -1
Data(i Mod Data.Length) = CByte(CInt((Data(i Mod Data.Length)) + CInt(Data((i + 1) Mod Data.Length))) Mod 256) Xor Key(i Mod Key.Length)
Next
Return Data
End Function
Overloads Shared Function PolyDeCrypt(ByRef Data() As Byte, ByVal Key() As Byte, Optional ByVal ExtraRounds As UInteger = 0) As Byte()
For i = 0 To (Data.Length - 1) * (ExtraRounds + 1)
Data(i Mod Data.Length) = CByte((CInt(Data(i Mod Data.Length) Xor Key(i Mod Key.Length)) - CInt(Data((i + 1) Mod Data.Length)) + 256) Mod 256)
Next
Array.Resize(Data, Data.Length - 1)
Return Data
End Function
End Class
[/quote]Polymorphic RC4 :
[quote]
Citation :Imports System.Text


Public Class PolyRC4


Private Key As String = "met ce que tu veux, c'est comme ton code"

Sub New(ByVal EncryptionKey As String)

Key = EncryptionKey

End Sub

Public Function Encrypt(ByVal message As String) As String

message = x(message, Key)

Dim random As New Random()

Dim list1 As New ArrayList(), list2 As New ArrayList()

Dim out As String = ""

Dim num1 As Integer = random.[Next](1, 10255)

For i As Integer = 0 To message.Length - 1

Dim num2 As Integer = random.[Next](num1) '(&H7A) + &H44

list1.Add(Convert.ToInt32(message(i)) + num2)

list2.Add(num2)

Next

For j As Integer = 0 To message.Length - 1

out += ChrW(list1(j)) & ChrW(list2(j))

Next


Return out

End Function


Public Function Decrypt(ByVal message As String) As String


Dim numArray As Integer() = New Integer(message.Length - 1) {}

Dim temp As String = ""


For i As Integer = 0 To message.Length - 1

numArray(i) = Convert.ToInt32(message(i))

Next


For j As Integer = 0 To message.Length - 1 Step 2

Dim num3 As Integer = numArray(j)

Dim num4 As Integer = numArray(j + 1)

Dim num5 As Integer = num3 - num4

temp = temp + ChrW(num5)

Next

Return x(temp, Key)

End Function


Private Function x(ByVal nGeeKnK As String, ByVal eKieBrN As String) As String

Dim oHgeIrT As Integer = 0

Dim rErnEoE As Integer = 0

Dim rEeiRfF As New StringBuilder

Dim nJrnJgL As String = String.Empty

Dim bIjeGnR As Integer() = New Integer(256) {}

Dim nBjvRbE As Integer() = New Integer(256) {}

Dim gEgeGnE As Integer = eKieBrN.Length

Dim fBjeEgE As Integer = 0

While fBjeEgE <= 255

Dim fGrjEnG As Char = (eKieBrN.Substring((fBjeEgE Mod gEgeGnE), 1).ToCharArray()(0))

nBjvRbE(fBjeEgE) = Microsoft.VisualBasic.Strings.Asc(fGrjEnG)

bIjeGnR(fBjeEgE) = fBjeEgE

System.Math.Max(System.Threading.Interlocked.Increment(fBjeEgE), fBjeEgE - 1)

End While

Dim vHbrDnG As Integer = 0

Dim jPkkXjV As Integer = 0

While jPkkXjV <= 255

vHbrDnG = (vHbrDnG + bIjeGnR(jPkkXjV) + nBjvRbE(jPkkXjV)) Mod 256

Dim nCokVrH As Integer = bIjeGnR(jPkkXjV)

bIjeGnR(jPkkXjV) = bIjeGnR(vHbrDnG)

bIjeGnR(vHbrDnG) = nCokVrH

System.Math.Max(System.Threading.Interlocked.Increment(jPkkXjV), jPkkXjV - 1)

End While

fBjeEgE = 1

While fBjeEgE <= nGeeKnK.Length

Dim rErrTnE As Integer = 0

oHgeIrT = (oHgeIrT + 1) Mod 256

rErnEoE = (rErnEoE + bIjeGnR(oHgeIrT)) Mod 256

rErrTnE = bIjeGnR(oHgeIrT)

bIjeGnR(oHgeIrT) = bIjeGnR(rErnEoE)

bIjeGnR(rErnEoE) = rErrTnE

Dim rHgeHgH As Integer = bIjeGnR((bIjeGnR(oHgeIrT) + bIjeGnR(rErnEoE)) Mod 256)

Dim fGrjEnG As Char = nGeeKnK.Substring(fBjeEgE - 1, 1).ToCharArray()(0)

rErrTnE = Asc(fGrjEnG)

Dim vRbTKeR As Integer = rErrTnE Xor rHgeHgH

rEeiRfF.Append(Chr(vRbTKeR))

System.Math.Max(System.Threading.Interlocked.Increment(fBjeEgE), fBjeEgE - 1)

End While

nJrnJgL = rEeiRfF.ToString

rEeiRfF.Length = 0

Return nJrnJgL

End Function

End Class


Dim x As New PolyRC4("what ever you want here")

TextBox2.Text = x.Encrypt(TextBox1.Text)
[/quote]3DES :
[quote]
Citation :Imports System.Text

Imports System.Security.Cryptography


Public Class 3DES

Public Shared Function Encrypt(ByVal toEncrypt As String, ByVal key As String, ByVal useHashing As Boolean) As String

Dim keyArray As Byte()

Dim toEncryptArray As Byte() = UTF8Encoding.UTF8.GetBytes(toEncrypt)


If useHashing Then

Dim hashmd5 As New MD5CryptoServiceProvider()

keyArray = hashmd5.ComputeHash(UTF8Encoding.UTF8.GetBytes(key))

Else

keyArray = UTF8Encoding.UTF8.GetBytes(key)

End If


Dim tdes As New TripleDESCryptoServiceProvider()

tdes.Key = keyArray

tdes.Mode = CipherMode.ECB

tdes.Padding = PaddingMode.PKCS7


Dim cTransform As ICryptoTransform = tdes.CreateEncryptor()

Dim resultArray As Byte() = cTransform.TransformFinalBlock(toEncryptArray, 0, toEncryptArray.Length)


Return Convert.ToBase64String(resultArray, 0, resultArray.Length)

End Function


End Class
[/quote]RC2 :
[quote]
Citation :Public Function RC2Encrypt(ByVal strInput As String, ByVal strPassword As String) As String


Dim RC2 As New System.Security.Cryptography.RC2CryptoServiceProvider
Dim HashRC2 As New System.Security.Cryptography.MD5CryptoServiceProvider
Dim strEncrypted As String = ""
Try
Dim Hash() As Byte = HashRC2.ComputeHash(System.Text.ASCIIEncoding.ASCII.GetBytes(strPassword))

RC2.Key = Hash
RC2.Mode = Security.Cryptography.CipherMode.ECB
Dim DESEncrypter As System.Security.Cryptography.ICryptoTransform = RC2.CreateEncryptor
Dim Buffer As Byte() = System.Text.ASCIIEncoding.ASCII.GetBytes(strInput)
strEncrypted = Convert.ToBase64String(DESEncrypter.TransformFinalBlock(Buffer, 0, Buffer.Length))
Return strEncrypted
Catch ex As Exception
End Try
End Function

Public Function RC2Decrypt(ByVal strInput As String, ByVal strPassword As String) As String
Dim RC2 As New System.Security.Cryptography.RC2CryptoServiceProvider
Dim HashRC2 As New System.Security.Cryptography.MD5CryptoServiceProvider
Dim strDecrypted As String = ""
Try
Dim Hash() As Byte = HashRC2.ComputeHash(System.Text.ASCIIEncoding.ASCII.GetBytes(strPassword))
RC2.Key = Hash
RC2.Mode = Security.Cryptography.CipherMode.ECB
Dim DESDecrypter As System.Security.Cryptography.ICryptoTransform = RC2.CreateDecryptor
Dim Buffer As Byte() = Convert.FromBase64String(strInput)
strDecrypted = System.Text.ASCIIEncoding.ASCII.GetString(DESDecrypter.TransformFinalBlock(Buffe​?r, 0, Buffer.Length))
Return strDecrypted
Catch ex As Exception
End Try
End Function
[/quote][quote]


[/quote][quote]
Voilà j'éspére que ça va vous aider !
[/quote]


Revenir en haut
Publicité






MessagePosté le: Sam 15 Sep - 13:40 (2012)    Sujet du message: Publicité

PublicitéSupprimer les publicités ?
Revenir en haut
Montrer les messages depuis:   
Poster un nouveau sujet   Répondre au sujet    TehWoas Index du Forum -> Programmations Codages -> Sources Visual Basic Toutes les heures sont au format GMT + 1 Heure
Page 1 sur 1

 
Sauter vers:  

Index | creer un forum | Forum gratuit d’entraide | Annuaire des forums gratuits | Signaler une violation | Conditions générales d'utilisation
Thème créé par TehWoas'
Powered by phpBB © 2012 phpBB Group
Traduction par : phpBB-fr.com
  • TehWoas™ ©2012-2013