How to use shell script for generation of Samba NT password hashes? lazarus / 32-Linux ---------------------------------------------------------------------- stem · 2020-10-02 16:29 Hi, the following script generates the Samba NT password hash for the password "apple": Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i printf '%s' "apple" | iconv -t utf16le | openssl md4 Output: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i (stdin)= 5ebe7dfa074da8ee8aef1faa2bbde876 How can I use this script in a free pascal function (input: password in plain text, output: password as NT hash)? Thank you. stem ---------------------------------------------------------------------- marcov · 2020-10-02 16:33 Escape the string properly by doubling tick marks, and then use runcommand to call the shell. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i {$mode delphi}uses process;var  ins,outs : string;begin  ins:='printf ''%s'' "apple" | iconv -t utf16le | openssl md4';  if runcommand('/bin/bash',['-c',ins],outs) then      writeln('success:',outs);end. ---------------------------------------------------------------------- stem · 2020-10-02 16:46 Thank you alot!  stem