Advertisement
metalx1000

Basic busybox netcat web server output

Apr 16th, 2016
802
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.53 KB | None | 0 0
  1. #include <stdio.h>
  2. /*
  3.  *wget "http://lh6.ggpht.com/_fX4ubyr2-9U/ShPBngRU2kI/AAAAAAAABOY/ZzJLuiY0UJ8/linux_inside%5B5%5D.png?imgmax=800" -O tux.png
  4.  *base64 tux.png -w 0|xclip
  5.  *./main| nc -l -p 8080
  6.  */
  7. int main()
  8. {  
  9.   printf("HTTP/1,1 200 OK\n");
  10.   printf("Content-Type: text/html\n\n");
  11.   printf("<h1>Hello World</h1>");
  12.   printf("<img src='http://lh6.ggpht.com/_fX4ubyr2-9U/ShPBngRU2kI/AAAAAAAABOY/ZzJLuiY0UJ8/linux_inside%5B5%5D.png?imgmax=800'>");
  13.   printf("<img src='data:image/png;base64,[base64 code goes here]'");
  14.  
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement