title: Generate shellcode by using msfvenom
body: <p>according to <a href="https://youtu.be/aEZKGW_VTd4?t=464" rel="nofollow noreferrer">this video</a></p>
  
  <p>he used msfpayload &amp; msfencode to genarate shellcode for cmd command.</p>
  
  <pre><code>msfpayload windows/exec cmd=calc.exe R | msfencode -e x86/alpha_mixed -t c -v
  </code></pre>
  
  <p>But now, metasploit team change msfpayload &amp; msfencode to msfvenom, so I convert the above code to msfvenom:</p>
  
  <pre><code>msfvenom -a x86 --platform windows -p windows/exec cmd=calc.exe -e x86/alpha_mixed -f c
  </code></pre>
  
  <p>shellcode has been generated but calculator was not started after excuted  command on cmd. What's wrong with my msfvenom code? 
  Thanks for reading.</p>
  
  <p>update: 
  In video, he used a short shellcode. He public the shellcode in description but didn't show how to generate it. I've followed his instruction and get a long shellcode.
  When I use his short shellcode, it's worked but the same is not happen to my long shellcode.</p>