3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* Script pro vyhledání minecraft serveru Cernokneznik 2013 */ /* Definice proměnných a funkcí */ function testserver($host,$port) { //Ověření serveru $fp = @fsockopen($host,$port,$errno,$errstr, $timeout = 60); if ($fp === true) { return "1"; //Server je zapnutý } } /* Vyhledávání serverů */ for($p5 = 10000; $p5 <= 49152; $p5++){ //Generace portů - snížený rozsah -> odebrány funkční porty /* Prochází možné ip-adresy pro port $p5 */ echo"Procházím možné ip-adresy pro port $p5"; for($p1 = 0; $p1 <= 255; $p1++){ //část IP //Skip privátních IP adres if($p1 == 10){ $p1=11; echo"Přeskočen rozsah IP adresy 10.0.0.0 – 10.255.255.255"; } for($p2 = 0; $p2 <= 255; $p2++){ //část IP //Skip privátních IP adres if($p1 == 172 && $p2 == 16){ $p2=32; echo"Přeskočen rozsah IP adresy 172.16.0.0 – 172.31.255.255"; }elseif($p1 == 192 && $p2 == 168){ $p2=169; echo"Přeskočen rozsah IP adresy 192.168.0.0 – 192.168.255.255"; } for($p3 = 0; $p3 <= 255; $p3++){ //část IP for($p4 = 1; $p4 <= 254; $p4++){ //část IP - snížený rozsah -> privátní sítě $ip = "".$p1.".".$p2.".".$p3.".".$p4.""; //Sestavení IP adresy //Ověření dostupnosti serveru if(testserver($ip, $p5)== 1){ $soubor=fopen("vysledky.txt", "w+"); //Prozatím.... $text = "TIME> ". $cas ." | IP> ". $ip .":". $p5 ."\n"; fwrite($soubor, $text); //Zapsání výsledku do souboru fclose($soubor); //Uzavření souboru } } } } //Schody, Woooohooo!! } } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 79
Branch analysis from position: 79
2 jumps found. (Code = 44) Position 1 = 81, Position 2 = 2
Branch analysis from position: 81
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 76
Branch analysis from position: 76
2 jumps found. (Code = 44) Position 1 = 78, Position 2 = 7
Branch analysis from position: 78
2 jumps found. (Code = 44) Position 1 = 81, Position 2 = 2
Branch analysis from position: 81
Branch analysis from position: 2
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 73
Branch analysis from position: 73
2 jumps found. (Code = 44) Position 1 = 75, Position 2 = 13
Branch analysis from position: 75
2 jumps found. (Code = 44) Position 1 = 78, Position 2 = 7
Branch analysis from position: 78
Branch analysis from position: 7
Branch analysis from position: 13
2 jumps found. (Code = 46) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 21
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 70
Branch analysis from position: 70
2 jumps found. (Code = 44) Position 1 = 72, Position 2 = 30
Branch analysis from position: 72
2 jumps found. (Code = 44) Position 1 = 75, Position 2 = 13
Branch analysis from position: 75
Branch analysis from position: 13
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 67
Branch analysis from position: 67
2 jumps found. (Code = 44) Position 1 = 69, Position 2 = 32
Branch analysis from position: 69
2 jumps found. (Code = 44) Position 1 = 72, Position 2 = 30
Branch analysis from position: 72
Branch analysis from position: 30
Branch analysis from position: 32
2 jumps found. (Code = 43) Position 1 = 47, Position 2 = 66
Branch analysis from position: 47
2 jumps found. (Code = 44) Position 1 = 69, Position 2 = 32
Branch analysis from position: 69
Branch analysis from position: 32
Branch analysis from position: 66
Branch analysis from position: 21
2 jumps found. (Code = 46) Position 1 = 23, Position 2 = 25
Branch analysis from position: 23
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 28
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 70
Branch analysis from position: 70
Branch analysis from position: 28
Branch analysis from position: 25
Branch analysis from position: 17
Branch analysis from position: 11
filename:       /in/vqt7s
function name:  (null)
number of ops:  82
compiled vars:  !0 = $p5, !1 = $p1, !2 = $p2, !3 = $p3, !4 = $p4, !5 = $ip, !6 = $soubor, !7 = $text, !8 = $cas
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   ASSIGN                                                   !0, 10000
          1      > JMP                                                      ->79
   22     2    >   NOP                                                      
          3        FAST_CONCAT                                      ~10     'Proch%C3%A1z%C3%ADm+mo%C5%BEn%C3%A9+ip-adresy+pro+port+', !0
          4        ECHO                                                     ~10
   24     5        ASSIGN                                                   !1, 0
          6      > JMP                                                      ->76
   27     7    >   IS_EQUAL                                                 !1, 10
          8      > JMPZ                                                     ~12, ->11
   28     9    >   ASSIGN                                                   !1, 11
   29    10        ECHO                                                     'P%C5%99esko%C4%8Den+rozsah+IP+adresy+10.0.0.0+%E2%80%93+10.255.255.255'
   32    11    >   ASSIGN                                                   !2, 0
         12      > JMP                                                      ->73
   35    13    >   IS_EQUAL                                         ~15     !1, 172
         14      > JMPZ_EX                                          ~15     ~15, ->17
         15    >   IS_EQUAL                                         ~16     !2, 16
         16        BOOL                                             ~15     ~16
         17    > > JMPZ                                                     ~15, ->21
   36    18    >   ASSIGN                                                   !2, 32
   37    19        ECHO                                                     'P%C5%99esko%C4%8Den+rozsah+IP+adresy+172.16.0.0+%E2%80%93+172.31.255.255'
         20      > JMP                                                      ->28
   38    21    >   IS_EQUAL                                         ~18     !1, 192
         22      > JMPZ_EX                                          ~18     ~18, ->25
         23    >   IS_EQUAL                                         ~19     !2, 168
         24        BOOL                                             ~18     ~19
         25    > > JMPZ                                                     ~18, ->28
   39    26    >   ASSIGN                                                   !2, 169
   40    27        ECHO                                                     'P%C5%99esko%C4%8Den+rozsah+IP+adresy+192.168.0.0+%E2%80%93+192.168.255.255'
   43    28    >   ASSIGN                                                   !3, 0
         29      > JMP                                                      ->70
   45    30    >   ASSIGN                                                   !4, 1
         31      > JMP                                                      ->67
   46    32    >   CONCAT                                           ~23     '', !1
         33        CONCAT                                           ~24     ~23, '.'
         34        CONCAT                                           ~25     ~24, !2
         35        CONCAT                                           ~26     ~25, '.'
         36        CONCAT                                           ~27     ~26, !3
         37        CONCAT                                           ~28     ~27, '.'
         38        CONCAT                                           ~29     ~28, !4
         39        CONCAT                                           ~30     ~29, ''
         40        ASSIGN                                                   !5, ~30
   49    41        INIT_FCALL                                               'testserver'
         42        SEND_VAR                                                 !5
         43        SEND_VAR                                                 !0
         44        DO_FCALL                                      0  $32     
         45        IS_EQUAL                                                 $32, 1
         46      > JMPZ                                                     ~33, ->66
   50    47    >   INIT_FCALL                                               'fopen'
         48        SEND_VAL                                                 'vysledky.txt'
         49        SEND_VAL                                                 'w%2B'
         50        DO_ICALL                                         $34     
         51        ASSIGN                                                   !6, $34
   51    52        CONCAT                                           ~36     'TIME%3E+', !8
         53        CONCAT                                           ~37     ~36, '+%7C+IP%3E+'
         54        CONCAT                                           ~38     ~37, !5
         55        CONCAT                                           ~39     ~38, '%3A'
         56        CONCAT                                           ~40     ~39, !0
         57        CONCAT                                           ~41     ~40, '%0A'
         58        ASSIGN                                                   !7, ~41
   52    59        INIT_FCALL                                               'fwrite'
         60        SEND_VAR                                                 !6
         61        SEND_VAR                                                 !7
         62        DO_ICALL                                                 
   53    63        INIT_FCALL                                               'fclose'
         64        SEND_VAR                                                 !6
         65        DO_ICALL                                                 
   45    66    >   PRE_INC                                                  !4
         67    >   IS_SMALLER_OR_EQUAL                                      !4, 254
         68      > JMPNZ                                                    ~46, ->32
   43    69    >   PRE_INC                                                  !3
         70    >   IS_SMALLER_OR_EQUAL                                      !3, 255
         71      > JMPNZ                                                    ~48, ->30
   32    72    >   PRE_INC                                                  !2
         73    >   IS_SMALLER_OR_EQUAL                                      !2, 255
         74      > JMPNZ                                                    ~50, ->13
   24    75    >   PRE_INC                                                  !1
         76    >   IS_SMALLER_OR_EQUAL                                      !1, 255
         77      > JMPNZ                                                    ~52, ->7
   19    78    >   PRE_INC                                                  !0
         79    >   IS_SMALLER_OR_EQUAL                                      !0, 49152
         80      > JMPNZ                                                    ~54, ->2
   61    81    > > RETURN                                                   1

Function testserver:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 16
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vqt7s
function name:  testserver
number of ops:  17
compiled vars:  !0 = $host, !1 = $port, !2 = $fp, !3 = $errno, !4 = $errstr, !5 = $timeout
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   11     2        BEGIN_SILENCE                                    ~6      
          3        INIT_FCALL                                               'fsockopen'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        SEND_REF                                                 !3
          7        SEND_REF                                                 !4
          8        ASSIGN                                           ~7      !5, 60
          9        SEND_VAL                                                 ~7
         10        DO_ICALL                                         $8      
         11        END_SILENCE                                              ~6
         12        ASSIGN                                                   !2, $8
   12    13        TYPE_CHECK                                    8          !2
         14      > JMPZ                                                     ~10, ->16
   13    15    > > RETURN                                                   '1'
   15    16    > > RETURN                                                   null

End of function testserver

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.43 ms | 1407 KiB | 22 Q