-
-
Save anonymous/4335275 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "stdio.h" | |
int main(int argc, char const *argv[]) | |
{ | |
FILE *f; | |
char buffer[4096]; | |
f = fopen("bits.txt", "w"); | |
while(1) { | |
fwrite(buffer, 4096, 1, f); | |
} | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import signal | |
import sys | |
def on_interrupt(signal_num, stack_frame): | |
f.close() | |
sys.exit(0) | |
f = open("bits2.txt", "wb") | |
signal.signal(signal.SIGINT, on_interrupt) | |
ch = bytearray(4096) | |
while True: | |
f.write(ch) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment