fork download
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. /* CHAR_BIT == 8 */
  6. char *foo = "What the fuck did you just fucking say about me, you little bitch? I'll have you know I graduated top of my class in the Navy Seals, and I've been involved in numerous secret raids on Al-Quaeda, and I have over 300 confirmed kills. I am trained in gorilla warfare and I'm the top sniper in the entire US armed forces. You are nothing to me but just another target. I will wipe you the fuck out with precision the likes of which has never been seen before on this Earth, mark my fucking words. You think you can get away with saying that shit to me over the Internet? Think again, fucker. As we speak I am contacting my secret network of spies across the USA and your IP is being traced right now so you better prepare for the storm, maggot. The storm that wipes out the pathetic little thing you call your life. You're fucking dead, kid. I can be anywhere, anytime, and I can kill you in over seven hundred ways, and that's just with my bare hands. Not only am I extensively trained in unarmed combat, but I have access to the entire arsenal of the United States Marine Corps and I will use it to its full extent to wipe your miserable ass off the face of the continent, you little shit. If only you could have known what unholy retribution your little \"clever\" comment was about to bring down upon you, maybe you would have held your fucking tongue. But you couldn't, you didn't, and now you're paying the price, you goddamn idiot. I will shit fury all over you and you will drown in it. You're fucking dead, kiddo.";
  7. char ciphered[10000] = {0}; // FIXME good size?
  8. char deciphered[sizeof(foo)] = {0};
  9. int i = 0;
  10. int j = 0;
  11. int buffer = 0;
  12. int remainder = 0;
  13.  
  14. printf("%s\n", foo);
  15. while (*foo)
  16. {
  17. buffer |= *foo; // read byte in buffer
  18. ciphered[i++] = (char) (buffer >> (1 + remainder) & 0x7f); // take first 7 fresh bits from buffer
  19. //throw away older ones with &0x7f
  20. if(++remainder == 7) // increse remainder for 8-7
  21. { // there are another 7 bits in buffer we can take
  22. ciphered[i++] = (char) (buffer & 0x7F);
  23. remainder = 0; // no more pending bits left
  24. }
  25. buffer = buffer << 8; // make space for another byte
  26.  
  27. foo++; // move to next byte
  28. }
  29. ciphered[i++] = (char) (buffer >> (1 + remainder) & 0x7f); // eat remaing bits into coded array
  30. // (may read 0x00, if last loop ate 2)
  31.  
  32. printf ("%s\n\n", ciphered);
  33.  
  34. // use for() in case of unexpected 0x00
  35. for(i=0, buffer=0, remainder=0; i<sizeof(ciphered); i++)
  36. {
  37. buffer |= ciphered[i]; // read byte (with only 7 significant bits)
  38. remainder +=7; // increase significant bits remainig
  39. if (remainder >= 8) // enough pending bits for full byte?
  40. {
  41. remainder-=8;
  42. deciphered[j++] = (char) (buffer >> remainder & 0xFF); //take 8 fresh bits from buffer; throw away older ones with &0xFF
  43. }
  44. buffer = buffer << 7; // make space for another 7 bits
  45. }
  46. printf("%s\n", deciphered);
  47. return 0;
  48. }
Success #stdin #stdout 0s 4348KB
stdin
Standard input is empty
stdout
What the fuck did you just fucking say about me, you little bitch? I'll have you know I graduated top of my class in the Navy Seals, and I've been involved in numerous secret raids on Al-Quaeda, and I have over 300 confirmed kills. I am trained in gorilla warfare and I'm the top sniper in the entire US armed forces. You are nothing to me but just another target. I will wipe you the fuck out with precision the likes of which has never been seen before on this Earth, mark my fucking words. You think you can get away with saying that shit to me over the Internet? Think again, fucker. As we speak I am contacting my secret network of spies across the USA and your IP is being traced right now so you better prepare for the storm, maggot. The storm that wipes out the pathetic little thing you call your life. You're fucking dead, kid. I can be anywhere, anytime, and I can kill you in over seven hundred ways, and that's just with my bare hands. Not only am I extensively trained in unarmed combat, but I have access to the entire arsenal of the United States Marine Corps and I will use it to its full extent to wipe your miserable ass off the face of the continent, you little shit. If only you could have known what unholy retribution your little "clever" comment was about to bring down upon you, maybe you would have held your fucking tongue. But you couldn't, you didn't, and now you're paying the price, you goddamn idiot. I will shit fury all over you and you will drown in it. You're fucking dead, kiddo.
+Z!hh2Hg+
V 2,Be^uNWP@f:Xm6K9N 9X/Do:]kX <[nR1Rt:R	Rt1Zr$Nl6
YJ <[nR-\o;H	da2,#H :n=L 6^$1Bs9H
qhh2H	fYr )Y,cLX 0[LB$Nv2H&+\ 4[Nf{1le2
q\u6Y.&{Uf 9Y,7h 9-#L@o7a5"u0Y,F	0@a7IPa;${YJrfFo7M5Jdmc1f.$4@t9-sH 4[D;=di6]Br3.&)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\DK=j 0[LBe^umc0@d9nvqRn.Bq2o:In&)Lu1Zms@d2X,BaVi2
rp

What the fuck did you just fucking say about me, you little bitch? I'll have you know I graduated top of my class in the Navy Seals, and I've been involved in numerous secret raids on Al-Quaeda, and I have over 300 confirmed kills. I am trained in gorilla warfare and I'm the top sniper in the entire US armed forces. You are nothing to me but just another target. I will wipe you the fuck out with precision the likes of which has never been seen before on this Earth, mark my fucking words. You think you can get away with saying that shit to me over the Internet? Think again, fucker. As we speak I am contacting my secret network of spies across the USA and your IP is being traced right now so you better prepare for the storm, maggot. The storm that wipes out the pathetic little thing you call your life. You're fucking dead, kid. I can be anywhere, anytime, and I can kill you in over seven hundred ways, and that's just with my bare hands. Not only am I extensively trained in unarmed combat, but I have access to the entire arsenal of the United States Marine Corps and I will use it to its full extent to wipe your miserable ass off the face of the continent, you little shit. If only you could have known what unholy retribution your little "clever" comment was about to bring down upon you, maybe you would have held your fucking tongue. But you couldn't, you didn't, and now you're paying the price, you goddamn idiot. I will shit fury all over you and you will drown in it. You're fucking dead, kiddo.