Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- void handle_open_port(unsigned int x);
- void handle_close_port(unsigned int x);
- long previous_variable = 0;
- void kernel_recursion(unsigned int x) {
- unsigned int previous_x = *(unsigned int *)(previous_variable);
- previous_variable = (long)(char *)&x;
- if (x < previous_x) {
- handle_open_port(x); ++x;
- kernel_recursion(previous_x);--x;
- handle_close_port(x);
- } else if (previous_x < x) {
- handle_open_port(previous_x);
- kernel_recursion(previous_x + 1); --x;
- handle_close_port(previous_x);
- } else {
- handle_open_port(previous_x);
- handle_close_port(previous_x);
- }
- }
- void kernel(unsigned int x) {
- previous_variable = (long)&x;
- kernel_recursion(0);
- }
- int main() { kernel(1337); }
- void handle_open_port(unsigned int x) { printf("OPENING: %u\n", x); }
- void handle_close_port(unsigned int x) { printf("CLOSING: %u\n", x); }
Advertisement
Comments
-
- #include <stdio.h>
- void handle_open_port(unsigned int x);
- void handle_close_port(unsigned int x);
- long previous_x = 0;
- void kernel_recursion(unsigned int x) {
- unsigned int current_previous_x = *(unsigned int *)(previous_x);
- previous_x = (long)(char *)&x;
- if (x < current_previous_x) {
- handle_open_port(x); ++x;
- kernel_recursion(current_previous_x);--x;
- handle_close_port(x);
- } else if (current_previous_x < x) {
- handle_open_port(current_previous_x);
- kernel_recursion(current_previous_x + 1); --x;
- handle_close_port(current_previous_x);
- } else {
- handle_open_port(current_previous_x);
- handle_close_port(current_previous_x);
- }
- }
- void kernel(unsigned int x) {
- previous_x = (long)&x;
- kernel_recursion(0);
- }
- int main() { kernel(10); }
- void handle_open_port(unsigned int x) { printf("OPENING: %u\n", x); }
- void handle_close_port(unsigned int x) { printf("CLOSING: %u\n", x); }
-
- #include <stdio.h>
- void handle_open_port(unsigned int x);
- void handle_close_port(unsigned int x);
- long previous_x = 0;
- void kernel_recursion(unsigned int x) {
- unsigned int current_previous_x = *(unsigned int *)(previous_x);
- //printf("PREVIOUS_X: %u ADDRESS: %ld CURRENT_ADDRESS: %ld\n", current_previous_x, previous_x, (long)&x);
- previous_x = (long)&x;
- if (x < current_previous_x) {
- handle_open_port(x); ++x;
- kernel_recursion(current_previous_x);--x;
- handle_close_port(x);
- } else if (current_previous_x < x) {
- handle_open_port(current_previous_x);
- kernel_recursion(current_previous_x + 1); --x;
- handle_close_port(current_previous_x);
- } else {
- handle_open_port(current_previous_x);
- handle_close_port(current_previous_x);
- }
- }
- void kernel(unsigned int x) {
- previous_x = (long)&x;
- kernel_recursion(0);
- }
- int main() { kernel(10); }
- void handle_open_port(unsigned int x) { printf("OPENING: %u\n", x); }
- void handle_close_port(unsigned int x) { printf("CLOSING: %u\n", x); }
-
- #include <stdio.h>
- void handle_open_port(unsigned int x);
- void handle_close_port(unsigned int x);
- unsigned long previous_x = 0;
- void kernel_recursion(unsigned int x) {
- unsigned int current_previous_x = *(unsigned int *)(previous_x);
- //printf("PREVIOUS_X: %u ADDRESS: %ld CURRENT_ADDRESS: %ld\n", current_previous_x, previous_x, (long)&x);
- previous_x = (unsigned long)&x;
- if (x < current_previous_x) {
- handle_open_port(x); ++x;
- kernel_recursion(current_previous_x);--x;
- handle_close_port(x);
- } else if (current_previous_x < x) {
- handle_open_port(current_previous_x);
- kernel_recursion(current_previous_x + 1); --x;
- handle_close_port(current_previous_x);
- } else {
- handle_open_port(current_previous_x);
- handle_close_port(current_previous_x);
- }
- }
- void kernel(unsigned int x) {
- previous_x = (unsigned long)&x;
- kernel_recursion(0);
- }
- int main() { kernel(10); }
- void handle_open_port(unsigned int x) { printf("OPENING: %u\n", x); }
- void handle_close_port(unsigned int x) { printf("CLOSING: %u\n", x); }
-
- #include <stdio.h>
- void handle_open_port(unsigned int x);
- void handle_close_port(unsigned int x);
- unsigned long previous_x = 0;
- void kernel_recursion(unsigned int x) {
- unsigned int current_previous_x = *(unsigned int *)((unsigned long)previous_x);
- //printf("PREVIOUS_X: %u ADDRESS: %ld CURRENT_ADDRESS: %ld\n", current_previous_x, previous_x, (long)&x);
- previous_x = (unsigned long)&x;
- if (x < current_previous_x) {
- handle_open_port(x); ++x;
- kernel_recursion(current_previous_x);--x;
- handle_close_port(x);
- } else if (current_previous_x < x) {
- handle_open_port(current_previous_x);
- kernel_recursion(current_previous_x + 1); --x;
- handle_close_port(current_previous_x);
- } else {
- handle_open_port(current_previous_x);
- handle_close_port(current_previous_x);
- }
- }
- void kernel(unsigned int x) {
- previous_x = (unsigned long)&x;
- kernel_recursion(0);
- }
- int main() { kernel(10); }
- void handle_open_port(unsigned int x) { printf("OPENING: %u\n", x); }
- void handle_close_port(unsigned int x) { printf("CLOSING: %u\n", x); }
-
- #include <stdio.h>
- void handle_open_port(unsigned int x);
- void handle_close_port(unsigned int x);
- unsigned long previous_x = 0;
- void kernel_recursion(unsigned int x) {
- unsigned int current_previous_x = *(unsigned int *)(unsigned long)previous_x;
- //printf("PREVIOUS_X: %u ADDRESS: %ld CURRENT_ADDRESS: %ld\n", current_previous_x, previous_x, (long)&x);
- previous_x = (unsigned long)&x;
- if (x < current_previous_x) {
- handle_open_port(x); ++x;
- kernel_recursion(current_previous_x);--x;
- handle_close_port(x);
- } else if (current_previous_x < x) {
- handle_open_port(current_previous_x);
- kernel_recursion(current_previous_x + 1); --x;
- handle_close_port(current_previous_x);
- } else {
- handle_open_port(current_previous_x);
- handle_close_port(current_previous_x);
- }
- }
- void kernel(unsigned int x) {
- previous_x = (unsigned long)&x;
- kernel_recursion(0);
- }
- int main() { kernel(10); }
- void handle_open_port(unsigned int x) { printf("OPENING: %u\n", x); }
- void handle_close_port(unsigned int x) { printf("CLOSING: %u\n", x); }
-
- #include <stdio.h>
- void handle_open_port(unsigned int x);
- void handle_close_port(unsigned int x);
- long previous_x = 0;
- void kernel_recursion(unsigned int x) {
- unsigned int current_previous_x = *(unsigned int *)previous_x;
- //printf("PREVIOUS_X: %u ADDRESS: %ld CURRENT_ADDRESS: %ld\n", current_previous_x, previous_x, (long)&x);
- previous_x = (long)&x;
- if (x < current_previous_x) {
- handle_open_port(x); ++x;
- kernel_recursion(current_previous_x);--x;
- handle_close_port(x);
- } else if (current_previous_x < x) {
- handle_open_port(current_previous_x);
- kernel_recursion(current_previous_x + 1); --x;
- handle_close_port(current_previous_x);
- } else {
- handle_open_port(current_previous_x);
- handle_close_port(current_previous_x);
- }
- }
- void kernel(unsigned int x) {
- previous_x = (long)&x;
- kernel_recursion(0);
- }
- int main() { kernel(10); }
- void handle_open_port(unsigned int x) { printf("OPENING: %u\n", x); }
- void handle_close_port(unsigned int x) { printf("CLOSING: %u\n", x); }
-
- #include <stdio.h>
- void handle_open_port(unsigned int x);
- void handle_close_port(unsigned int x);
- unsigned int * previous_x = 0;
- void kernel_recursion(unsigned int x) {
- unsigned int current_previous_x = *previous_x;
- //printf("PREVIOUS_X: %u ADDRESS: %ld CURRENT_ADDRESS: %ld\n", current_previous_x, previous_x, (long)&x);
- previous_x = &x;
- if (x < current_previous_x) {
- handle_open_port(x); ++x;
- kernel_recursion(current_previous_x);--x;
- handle_close_port(x);
- } else if (current_previous_x < x) {
- handle_open_port(current_previous_x);
- kernel_recursion(current_previous_x + 1); --x;
- handle_close_port(current_previous_x);
- } else {
- handle_open_port(current_previous_x);
- handle_close_port(current_previous_x);
- }
- }
- void kernel(unsigned int x) {
- previous_x = &x;
- kernel_recursion(0);
- }
- int main() { kernel(10); }
- void handle_open_port(unsigned int x) { printf("OPENING: %u\n", x); }
- void handle_close_port(unsigned int x) { printf("CLOSING: %u\n", x); }
Add Comment
Please, Sign In to add comment