Advertisement
ImDeepWithWindows

HideEncryptedMessageInImageFile.cmd

Oct 16th, 2017
449
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.09 KB | None | 0 0
  1. @goto :batch
  2. <html><!--
  3. :batch
  4. @echo off
  5. if /I "%1"=="{AddText}" goto :addtext
  6. if /I "%1"=="{GetText}" goto :gettext
  7. if /I "%1"=="{StripChars}" goto :StripChars
  8. mode con: cols=31 lines=5
  9. title [%~n0]
  10. color 0a
  11. echo.
  12. echo.
  13. echo. loading ...
  14. reg add HKCU\Software\Classes\%~x0 /d "htafile" /f >nul
  15. start "" mshta.exe "%~dpnx0"
  16. exit
  17. :addtext
  18. for /f "tokens=*" %%A in ('echo.%2') do set "filedir=%%~dpA" & set "filename=%%~nxA"
  19. copy /y %2 "%filedir%\[WithMessage] %filename%" >nul
  20. echo.>>"%filedir%\[WithMessage] %filename%"
  21. echo.>>"%filedir%\[WithMessage] %filename%"
  22. set "txt=%3"
  23. set "txt=%txt:~1%"
  24. set "txt=%txt:~0,-1%"
  25. echo.:#%txt%>>"%filedir%\[WithMessage] %filename%"
  26. echo.[WithMessage] %filename%
  27. exit
  28. :gettext
  29. set /a "linenum=0+0"
  30. for /f "tokens=*" %%A in ('echo.%2') do for /f "tokens=*" %%B in ('type "%%~dpnxA"') do set "msgline=%%B"
  31. for /f "tokens=1,2 delims=#" %%A in ('echo.%msgline%') do (
  32. if "%%A"==":" (
  33. echo.%%B
  34. ) else (
  35. echo.{nomsg}
  36. )
  37. )
  38. exit
  39. :StripChars
  40. set "txt=%2"
  41. set "txt=%txt:~1%"
  42. echo."%txt:~0,-3%"
  43. exit
  44. -->
  45. <head>
  46. <title>Encrypt Messages Into Image-Files</title>
  47. <HTA:APPLICATION ID="ThisApp"
  48. APPLICATIONNAME="Encrypt Messages Into Image-Files"
  49. scroll="no"
  50. icon=""
  51. showintaskbar="no"
  52. sysmenu="yes"
  53. caption="yes"
  54. maximizebutton="no"
  55. minamizebutton="no"
  56. >
  57. </head>
  58. <script language="VBScript">
  59. sub Window_OnLoad
  60. Ext = split(split(ThisApp.commandline,chr(34))(1),".")(ubound(split(split(ThisApp.commandline,chr(34))(1),".")))
  61. createobject("wscript.shell").run "reg add HKCU\Software\Classes\."&Ext&" /d "&chr(34)&Ext&"file"&chr(34)&" /f",0,true
  62. window.resizeto 670,600
  63. end sub
  64. sub addtxt()
  65. buildtxt = ""
  66. for c = 1 to len(document.all.txtmessage.value)
  67. buildtxt = buildtxt& chr(asc(mid(document.all.txtmessage.value,c,1))+4)
  68. next
  69. buildnewfileandgetname = CommandLine("@call "&chr(34)&split(ThisApp.commandline,chr(34))(1)&chr(34) _
  70. &" {AddText} "&chr(34)&document.all.addmsgto.value&chr(34)&" "&chr(34)&buildtxt&chr(34))
  71. msgbox "The JPG-File was copied and the message was injected into the copy. The copy is in the same folder."
  72. end sub
  73. sub readtxt()
  74. rawtxt = CommandLine("@call "&chr(34)&split(ThisApp.commandline,chr(34))(1)&chr(34) _
  75. &" {GetText} "&chr(34)&document.all.getmsgfrom.value&chr(34))
  76. if NOT rawtxt = "{nomsg}" then
  77. decryptmsg = ""
  78. for c = 1 to len(rawtxt)
  79. decryptmsg = decryptmsg& chr(asc(mid(rawtxt,c,1))-4)
  80. next
  81. decryptmsg = CommandLine("@call "&chr(34)&split(ThisApp.commandline,chr(34))(1)&chr(34) _
  82. &" {StripChars} "&chr(34)&decryptmsg&chr(34))
  83. else
  84. decryptmsg = "no message in this file"
  85. end if
  86. msgbox "Hidden Message: "&decryptmsg,0,"Viewing Hidden Message"
  87. end sub
  88. function CommandLine(cmmd)
  89. set clipboard = createobject("htmlfile")
  90. cliptext = clipboard.ParentWindow.ClipboardData.GetData("text")
  91. createobject("wscript.shell").run chr(34)&"%comspec%"&chr(34)&" /d /c "&cmmd&"|clip",0,true
  92. CommandLine = clipboard.ParentWindow.ClipboardData.GetData("text")
  93. if NOT isnull(cliptext) then clipboard.ParentWindow.ClipboardData.SetData "text",cliptext
  94. end function
  95. </script>
  96. <body bgcolor=black style=border:0px;padding:0px;margin:0px;color:black;font-size:0;font-family:arial ><br/><font color=cyan size=2><center><br/>
  97. <font size=4 face=terminal>
  98. <a style=color:red;text-decoration:none target=_blank href=https://hackforums.net/member.php?action=profile&uid=3089494 >by <u>ImDeepWithWindows</u></a>
  99. </font><br/><br/><hr noshade=noshade style=color:purple;border-color:purple;border-style:solid;padding:0px;margin:0px />
  100. <div align=left>encrypt messages inside JPG image-files</div>
  101. <hr noshade=noshade style=color:purple;border-color:purple;border-style:solid;padding:0px;margin:0px /><center><br/><br/>
  102. <fieldset style=width:60%;border-style:solid;border-color:grey;margin:0px;padding:0px;border-width:4px>
  103. <legend style=color:yellow;margin:0px;padding:0px;border-style:solid;border-color:grey;border-width:4px ><b>Hide Message In JPG File</b></legend>
  104. <br/><br/><br/>Browse For JPG-File:
  105. <input type=file value="Select Image File" name=addmsgto style=display:inline-block;border-color:purple;border-style:solid;background-color:black;color:yellow accept="jpg,image/jpg" />
  106. <br/><br/>Message To Hide: <input type=text name=txtmessage style=border-color:grey;border-style:solid;background-color:black;color:yellow /><br/>
  107. <br/><input type=submit value="Hide Message" style=color:#00ff00;background-color:black;border-color:purple;border-style:solid onclick=addtxt() />
  108. <br/><br/><br/></fieldset><br/><br/><br/><fieldset style=width:60%;border-style:solid;border-color:grey;margin:0px;padding:0px;border-width:4px>
  109. <legend style=color:yellow;margin:0px;padding:0px;border-style:solid;border-color:grey;border-width:4px ><b>Read Hidden Message From JPG File</b></legend>
  110. <br/><br/><br/>Browse For JPG-File:
  111. <input type=file value="Select Image File" name=getmsgfrom style=border-color:purple;border-style:solid;background-color:black;color:yellow accept="jpg" /><br/>
  112. <br/><input type=submit value="Read Hidden Message" style=color:#00ff00;background-color:black;border-color:purple;border-style:solid onclick=readtxt() />
  113. <br/><br/><br/></fieldset>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement