title: Overwriting bytes of an exe in hex
body: <p>I want to change the logic of an exe by changing the binary. One of the hex values in the exe is 75 which I have to change to 74 (JNE to JE in x86 assembly). I know it's the 1276th byte of the file, but how do I do this?</p>
  
  <p>Here's what I have:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  int main(void)
  {
      FILE *fileH = fopen ("foo", "r+");
      fseek(fileH, 1276, SEEK_SET);
      fwrite("74", 1, 1, fileH);
      fclose(fileH);
      return 0;
  }
  </code></pre>
  
  <p>Also for some reason I'm getting 'fileH' undeclared, even though I included stdio and have FILE in all uppercase. I wasn't able to find anyone else with this problem. Running this on ubuntu</p>