vautour32
Messages postés38Date d'inscriptionjeudi 20 septembre 2007StatutMembreDernière intervention 9 décembre 2008
-
29 oct. 2007 à 18:49
vautour32
Messages postés38Date d'inscriptionjeudi 20 septembre 2007StatutMembreDerniè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
cs_Jack
Messages postés14006Date d'inscriptionsamedi 29 décembre 2001StatutModérateurDernière intervention28 août 201579 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)
Kristof_Koder
Messages postés918Date d'inscriptionvendredi 3 août 2007StatutMembreDernière intervention27 octobre 200810 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
vautour32
Messages postés38Date d'inscriptionjeudi 20 septembre 2007StatutMembreDerniè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