Browse Source

Bugfix in warning message

Yann Weber 6 years ago
parent
commit
09f48de79f
1 changed files with 8 additions and 3 deletions
  1. 8
    3
      steg.py

+ 8
- 3
steg.py View File

@@ -59,9 +59,14 @@ def hide(html, payload):
59 59
         res += c
60 60
     if not end:
61 61
         if len(payload) > 0:
62
-            warnings.warn(
63
-                'Unable to hide all payload. %d bytes not hidden : "%s"' % (
64
-                    len(payload), repr(payload)))
62
+	    if len(payload) > 100:
63
+                warnings.warn(
64
+                    'Unable to hide all payload. %d bytes not hidden' % (
65
+                        len(payload)))
66
+            else:
67
+                warnings.warn(
68
+                    'Unable to hide all payload. %d bytes not hidden : "%s"' % (
69
+                        len(payload), repr(payload)))
65 70
         if cur_shift != 8:
66 71
             warnings.warn(
67 72
                 'last byte not complete. %d bits missing' % (8 - cur_shift))

Loading…
Cancel
Save