Stéganographie

Résolu
vautour32 Messages postés 38 Date d'inscription jeudi 20 septembre 2007 Statut Membre Dernière intervention 9 décembre 2008 - 29 oct. 2007 à 18:49
vautour32 Messages postés 38 Date d'inscription jeudi 20 septembre 2007 Statut Membre Dernière intervention 9 décembre 2008 - 1 nov. 2007 à 12:14
Bonjour,
J'essaie (depuis un bon moment) de faire un programme de stéganographie (cacher du texte dans une image) qui coderait les caractères sur le bit le - significatif.  Le problème, c'est que le texte décrypté contient des erreurs:

END-USER LICENSE AGREEMENT FOR MICROSOFT SOFTWARE



IMPORTANT-READ CAREFULLY: This Microsoft End-User License Agreement (''EULA'') is a legal agreement between you (either an individual or a single entity) and Microsoft Corporation for the Microsoft software product(s) accompanying this EULA, which include(s) computer software and may include "online" or electronic documentation, associated media, and printed materials (''SOFTWARE PRODUCT''). By installing, copying, or otherwise using the SOFTWARE PRODUCT or any UPDATES (as defined below), you agree to be bound by the terms of this EULA. If you do not agree to the terms of this EULA, do not install, copy, or otherwise use the SOFTWARE PRODUCT; you may, however, return it to your place of purchase for a full refund. In addition, by installing, copying, or otherwise using any updates or other components of the SOFTWARE PRODUCT that you receive separately as part of the SOFTWARE PRODUCT (''UPDATES''), you agree to be bound by any additional license terms that accompany such UPDATES. If you do not agree to the additional license terms that accompany such UPDATES, you may not install, copy, or otherwise use such UPDATES.

devient:

"END-USER LICENSE AGREEMENT FOR MICROSOFT SOFTWARE



IMPORTANT-READ CAREFULLY: This Moÿ�2;osoft End-User License Agreement (''EULA'') is a legal agreement between you (either ÿ individual or a single entity) and Microsoft Corporation for the Microsoft software ÿ/duct(s) accompanying this EULA, which include(s) computer software and may include ""oÿ�4;ine"" or electronic documentation, associated media, and printed materials (''SOFTWARERODUCT''). By installing, copying, or otherwise using the SOFTWARE PRODUCT or any UPDOÿ�5;S (as defined below), you agree to be bound by the terms of this EULA. If you do not!ÿ�3;ree to the terms of this EULA, do not install, copy, or otherwise use the SOFTWARE PRÿUCT; you may, however, return it to your place of purchase for a full refund. In addiwÿ�F;n, by installing, copying, or otherwise using any updates or other components of the ÿ�1;FTWARE PRODUCT that you receive separately as part of the SOFTWARE PRODUCT (''UPDATES?ÿ), you agree to be bound by any additional license terms that accompany such UPDATES.#ÿ�6; you do not agree to the additional license terms that accompany such UPDATES, you manot install, copy, or otherwise use such UPDATES.
Est-ce que quelqu'un sait ce qui peut donner ce genre d'erreur
Merci d'avance
Vautour32

4 réponses

cs_Jack Messages postés 14006 Date d'inscription samedi 29 décembre 2001 Statut Modérateur Dernière intervention 28 août 2015 79
29 oct. 2007 à 20:00
Salut
Oui, je sais ce qui donne ce genre de résultat : ton programme.
Il doit y avoir une anomalie.
Vérifie bien :
- les longueurs des données que tu lis,
- que toutes les données lues sont bien traitées, -
- qu'une fin de donnée non traitée soit bien ajouter en tête du paquet suivant

Ce qui me fait penser à ça, et qui ne t'aura pas échappé, c'est que les anomalies de texte apparaissent pratiquement toujours au même endroit, tous les 86 à 90 caractères.

Vala
Jack, MVP VB
NB : Je ne répondrai pas aux messages privés

<hr />Le savoir est la seule matière qui s'accroit quand on la partage (Socrate)
3
jmfmarques Messages postés 7666 Date d'inscription samedi 5 novembre 2005 Statut Membre Dernière intervention 22 août 2014 27
29 oct. 2007 à 19:54
Bonsoir,

ton algo, sûrement...

Comment traites-tu le bit supérieur en cas de dépassement (hors des limites) ?

Tu retrouves au déchiffrement une valeur limitée aux bornes de l'intervalle permis, presque assurément !
0
Kristof_Koder Messages postés 918 Date d'inscription vendredi 3 août 2007 Statut Membre Dernière intervention 27 octobre 2008 10
29 oct. 2007 à 21:15
ET puis les caractères parasites sont du coté obscur de l'UNICODE !! Sans doute un bit qui déborde et fait basculer un code ASCII sur une plage UNICODE
0
vautour32 Messages postés 38 Date d'inscription jeudi 20 septembre 2007 Statut Membre Dernière intervention 9 décembre 2008
1 nov. 2007 à 12:14
Bonjour et merci d'avoir répondu si vite,

"ET puis les caractères parasites sont du coté obscur de l'UNICODE !! Sans doute un bit qui déborde et fait basculer un code ASCII sur une plage UNICODE"
Ca, c'est pas possible: les code de caractères sont codés dans un nombre binaire de 8 bits, ça ne pourra donc jamais dépasser 255.
Voici mon code:

Private Sub Code_image(X As Long)
CX = X



For CY = 0 To Picture1.Height Step Screen.TwipsPerPixelY



            Color = Picture1.Point(CX, CY)
            DecomposeRGB (Color) 'Decompose un code couleur en ses 3 compsantes RGB, dont il assigne les valeurs aux variable publique lRed, LGreen et LBlue
            
            If ctrInByte < 7 Then
            ctrInByte = ctrInByte + 1
            Else
            ctrInByte = 0
            ctrOutByte = ctrOutByte + 1
            End If
            If ctrOutByte < UBound(tPassword) Then lRed = CByte(bitsTOdec(Mid$(DecToBits(CLng(lRed)), 9, 7) & Mid$(tPassword(ctrOutByte), ctrInByte + 1, 1)))
           
            If ctrInByte < 7 Then
            ctrInByte = ctrInByte + 1
            Else
            ctrInByte = 0
            ctrOutByte = ctrOutByte + 1
            End If
            If ctrOutByte < UBound(tPassword) Then lGreen = CByte(bitsTOdec(Mid$(DecToBits(CLng(lGreen)), 9, 7) & Mid$(tPassword(ctrOutByte), ctrInByte + 1, 1)))
           
            If ctrInByte < 7 Then
            ctrInByte = ctrInByte + 1
            Else
            ctrInByte = 0
            ctrOutByte = ctrOutByte + 1
            End If
            If ctrOutByte < UBound(tPassword) Then lBlue = CByte(bitsTOdec(Mid$(DecToBits(CLng(lBlue)), 9, 7) & Mid$(tPassword(ctrOutByte), ctrInByte + 1, 1)))
           
            Color = RGB(lRed, lGreen, lBlue)
            Picture2.PSet (CX, CY), Color



Next CY



End Sub
'****
Public Sub DeCode_image(X As Long)
CX = X
Dim tmp As String
For CY = 0 To Picture1.Height Step Screen.TwipsPerPixelY



            Color = Picture1.Point(CX, CY)
            DecomposeRGB (Color)



            If ctrInByte < 7 Then
            ctrInByte = ctrInByte + 1
            Else
            ctrInByte = 0
            Text1.Text = Text1.Text & Chr$(bitsTOdec(tmp))
            tmp = ""
            ctrOutByte = ctrOutByte + 1
            End If
            If ctrOutByte < UBound(tPassword) Then tmp = tmp & Right$(DecToBits(lRed), 1)
            If ctrInByte < 7 Then
            ctrInByte = ctrInByte + 1
            Else
            ctrInByte = 0
            Text1.Text = Text1.Text & Chr$(bitsTOdec(tmp))
            tmp = ""
            ctrOutByte = ctrOutByte + 1
            End If
            If ctrOutByte < UBound(tPassword) Then tmp = tmp & Right$(DecToBits(lGreen), 1)
            If ctrInByte < 7 Then
            ctrInByte = ctrInByte + 1
            Else
            ctrInByte = 0
            Me.Caption = tmp
            Text1.Text = Text1.Text & Chr$(bitsTOdec(tmp))
            tmp = ""
            ctrOutByte = ctrOutByte + 1
            End If
           
            If ctrOutByte < UBound(tPassword) Then tmp = tmp & Right$(DecToBits(lBlue), 1)
            DoEvents
Next CY



End Sub
Bonne lecture et merci encore.
Vautour32
0
Rejoignez-nous