Result

INVALID

Duration

1929ms

Code [DL]

echo "int main(){char s[7];while(gets(s)){putchar(s[1]==s[2]?s[2]:s[4]);}}" > a.c;gcc a.c;./a.out

stdin

429 298
365 663
717 756
595 285
926 115
471 153
599 294
977 748
616 662
449 943
188 814
355 779
831 881
336 566
544 611
936 361
177 331
337 933
557 773
868 664
373 372
844 442
377 491
688 883
993 947
517 918
419 125
818 661
394 348
377 476
178 656
756 983

stdout

26721197698585437976347899163769

stderr

a.c: In function 'main':
a.c:1:28: warning: implicit declaration of function 'gets' [-Wimplicit-function-declaration]
 int main(){char s[7];while(gets(s)){putchar(s[1]==s[2]?s[2]:s[4]);}}
                            ^~~~
a.c:1:37: warning: implicit declaration of function 'putchar' [-Wimplicit-function-declaration]
 int main(){char s[7];while(gets(s)){putchar(s[1]==s[2]?s[2]:s[4]);}}
                                     ^~~~~~~
/tmp/cciQWsEB.o: In function `main':
a.c:(.text+0x49): warning: the `gets' function is dangerous and should not be used.

strace

10    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7fff14ac6830 /* 6 vars */) = 0
12    execve("/usr/bin/pwsh", ["/usr/bin/pwsh", "/volume/CODE"], 0x556e0c920c28 /* 6 vars */) = 0
11    execve("/bin/cat", ["cat", "-"], 0x556e0c920c10 /* 6 vars */) = 0
11    +++ exited with 0 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=11, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
15    +++ exited with 0 +++
16    +++ exited with 0 +++
12    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=15, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
33    execve("/usr/bin/gcc", ["/usr/bin/gcc", "a.c"], 0x7f62d406d860 /* 7 vars */) = 0
34    execve("/usr/lib/gcc/x86_64-linux-gnu/7/cc1", ["/usr/lib/gcc/x86_64-linux-gnu/7/"..., "-quiet", "-imultiarch", "x86_64-linux-gnu", "a.c", "-quiet", "-dumpbase", "a.c", "-mtune=generic", "-march=x86-64", "-auxbase", "a", "-fstack-protector-strong", "-Wformat", "-Wformat-security", "-o", "/tmp/ccVpvHYV.s"], 0x1946a70 /* 12 vars */) = 0
34    +++ exited with 0 +++
33    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=34, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
35    execve("/opt/microsoft/powershell/7/as", ["as", "--64", "-o", "/tmp/cciQWsEB.o", "/tmp/ccVpvHYV.s"], 0x1946a70 /* 12 vars */) = -1 ENOENT (No such file or directory)
35    execve("/bin/as", ["as", "--64", "-o", "/tmp/cciQWsEB.o", "/tmp/ccVpvHYV.s"], 0x1946a70 /* 12 vars */) = -1 ENOENT (No such file or directory)
35    execve("/usr/local/sbin/as", ["as", "--64", "-o", "/tmp/cciQWsEB.o", "/tmp/ccVpvHYV.s"], 0x1946a70 /* 12 vars */) = -1 ENOENT (No such file or directory)
35    execve("/usr/local/bin/as", ["as", "--64", "-o", "/tmp/cciQWsEB.o", "/tmp/ccVpvHYV.s"], 0x1946a70 /* 12 vars */) = -1 ENOENT (No such file or directory)
35    execve("/usr/sbin/as", ["as", "--64", "-o", "/tmp/cciQWsEB.o", "/tmp/ccVpvHYV.s"], 0x1946a70 /* 12 vars */) = -1 ENOENT (No such file or directory)
35    execve("/usr/bin/as", ["as", "--64", "-o", "/tmp/cciQWsEB.o", "/tmp/ccVpvHYV.s"], 0x1946a70 /* 12 vars */) = 0
35    +++ exited with 0 +++
33    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=35, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
36    execve("/usr/lib/gcc/x86_64-linux-gnu/7/collect2", ["/usr/lib/gcc/x86_64-linux-gnu/7/"..., "-plugin", "/usr/lib/gcc/x86_64-linux-gnu/7/"..., "-plugin-opt=/usr/lib/gcc/x86_64-"..., "-plugin-opt=-fresolution=/tmp/cc"..., "-plugin-opt=-pass-through=-lgcc", "-plugin-opt=-pass-through=-lgcc_"..., "-plugin-opt=-pass-through=-lc", "-plugin-opt=-pass-through=-lgcc", "-plugin-opt=-pass-through=-lgcc_"..., "--build-id", "--eh-frame-hdr", "-m", "elf_x86_64", "--hash-style=gnu", "--as-needed", "-dynamic-linker", "/lib64/ld-linux-x86-64.so.2", "-pie", "-z", "now", "-z", "relro", "/usr/lib/gcc/x86_64-linux-gnu/7/"..., "/usr/lib/gcc/x86_64-linux-gnu/7/"..., "/usr/lib/gcc/x86_64-linux-gnu/7/"..., "-L/usr/lib/gcc/x86_64-linux-gnu/"..., "-L/usr/lib/gcc/x86_64-linux-gnu/"..., "-L/usr/lib/gcc/x86_64-linux-gnu/"..., "-L/lib/x86_64-linux-gnu", "-L/lib/../lib", "-L/usr/lib/x86_64-linux-gnu", ...], 0x1947750 /* 14 vars */) = 0
37    execve("/usr/bin/ld", ["/usr/bin/ld", "-plugin", "/usr/lib/gcc/x86_64-linux-gnu/7/"..., "-plugin-opt=/usr/lib/gcc/x86_64-"..., "-plugin-opt=-fresolution=/tmp/cc"..., "-plugin-opt=-pass-through=-lgcc", "-plugin-opt=-pass-through=-lgcc_"..., "-plugin-opt=-pass-through=-lc", "-plugin-opt=-pass-through=-lgcc", "-plugin-opt=-pass-through=-lgcc_"..., "--build-id", "--eh-frame-hdr", "-m", "elf_x86_64", "--hash-style=gnu", "--as-needed", "-dynamic-linker", "/lib64/ld-linux-x86-64.so.2", "-pie", "-z", "now", "-z", "relro", "/usr/lib/gcc/x86_64-linux-gnu/7/"..., "/usr/lib/gcc/x86_64-linux-gnu/7/"..., "/usr/lib/gcc/x86_64-linux-gnu/7/"..., "-L/usr/lib/gcc/x86_64-linux-gnu/"..., "-L/usr/lib/gcc/x86_64-linux-gnu/"..., "-L/usr/lib/gcc/x86_64-linux-gnu/"..., "-L/lib/x86_64-linux-gnu", "-L/lib/../lib", "-L/usr/lib/x86_64-linux-gnu", ...], 0x7ffcdbff33e0 /* 14 vars */) = 0
37    +++ exited with 0 +++
36    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=37, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
36    +++ exited with 0 +++
33    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=36, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
33    +++ exited with 0 +++
31    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=33, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
38    execve("/root/a.out", ["/root/a.out"], 0x7f62d4071090 /* 7 vars */) = 0
38    +++ exited with 0 +++
31    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=38, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
31    +++ exited with 0 +++
32    +++ exited with 0 +++
30    +++ exited with 0 +++
29    +++ exited with 0 +++
28    +++ exited with 0 +++
27    +++ exited with 0 +++
26    +++ exited with 0 +++
25    +++ exited with 0 +++
24    +++ exited with 0 +++
23    +++ exited with 0 +++
22    +++ exited with 0 +++
21    +++ exited with 0 +++
20    +++ exited with 0 +++
19    +++ exited with 0 +++
18    +++ exited with 0 +++
17    +++ exited with 0 +++
14    +++ exited with 0 +++
13    +++ exited with 0 +++
12    +++ exited with 0 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=12, si_uid=0, si_status=0, si_utime=40, si_stime=16} ---
10    +++ exited with 0 +++