« % cat the.bouncer | Main | Mes visi esame Dievo vaikai »

fuck hex

% mkdir fuckhex
% cd fuckhex
% cat > fuckhex.c << EOF
heredoc> #include "stdio.h"
heredoc> 
heredoc> int main () {
heredoc>   FILE* f = fopen("out", "w");
heredoc> 
heredoc>   fputc('f', f);
heredoc>   fputc('u', f);
heredoc>   fputc('c', f);
heredoc>   fputc('k', f);
heredoc>   fputc(' ', f);
heredoc>   fputc('h', f);
heredoc>   fputc('e', f);
heredoc>   fputc('x', f);
heredoc>   fputc('\n', f);
heredoc> 
heredoc>   return 0;
heredoc> }
heredoc> EOF
% cat main.c
// fuck hex
// because fuck you
#include "stdio.h"
int main () {
  FILE* f = fopen("out", "w");
  fputc('f', f);
  fputc('u', f);
  fputc('c', f);
  fputc('k', f);
  fputc(' ', f);
  fputc('h', f);
  fputc('e', f);
  fputc('x', f);
  fputc('\n', f);
  return 0;
}
% gcc -Wall -o fuckhex fuckhex.c
% ./fuckhex
% cat out
fuck hex
% hexedit out
00000000   66 75 63 6B  20 68 65 78  0A                        fuck hex.
00000010
00000020
00000030
00000040
00000050
00000060
00000070
00000080
00000090
000000A0
000000B0
000000C0
000000D0
000000E0
000000F0
00000100
00000110
00000120
00000130
00000140
00000150
00000160
00000170
00000180
00000190
000001A0
000001B0
000001C0
000001D0
000001E0
000001F0
00000200
00000210
00000220
00000230
00000240
00000250
00000260
00000270
00000280
00000290
000002A0
000002B0
000002C0
000002D0
000002E0
000002F0
00000300
00000310
00000320
00000330
00000340
00000350
^C

About

This page contains a single entry from the blog posted on 08.05.10 00:20.

The previous post in this blog was % cat the.bouncer.

The next post in this blog is Mes visi esame Dievo vaikai.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.35