3v4l.org

run code in 300+ PHP versions simultaneously
<?php session_start(); if ($_POST['Submit'] == 'Send') { if (strcmp(md5($_POST['user_code']),$_SESSION['ckey'])) { header("Location: sendmail.php?msg=ERROR: Invalid Verification Code"); exit(); } $to = $_POST['toemail']; $subject = $_POST['subject']; $message = $_POST['message']; $fromemail = $_POST['fromemail']; $fromname = $_POST['fromname']; $lt= '<'; $gt= '>'; $sp= ' '; $from= 'From:'; $headers = $from.$fromname.$sp.$lt.$fromemail.$gt; mail($to,$subject,$message,$headers); header("Location: sendmail.php?msg= Mail Sent!"); exit(); } ?> <html> <head> <title>Email Pranks</title> </head> <body bgcolor="#ffffcc"> <h2 align="center"> Fake Email Prank Script By Srikanth </h2> <h3 align="center"> Please do not misuse this script. Use it only for having FUN. </h3><br> <p style="margin-left:15px"> <form action="sendmail.php" method="POST"> <b>From Name:</b><br> <input type="text" name="fromname" size="50"><br> <br><b>From Email:</b><br> <input type="text" name="fromemail" size="50"><br> <br><b>To Email:</b><br> <input type="text" name="toemail" size="50"><br> <br><b>Subject:</b><br> <input type="text" name="subject" size="74"><br> <br><b>Your Message:</b><br> <textarea name="message" rows="5" cols="50"> </textarea><br> <br><b>Verification Code:</b><br> <input name="user_code" type="text" size="25"> <img src="pngimg.php" align="middle"><br><br> <input type="submit" name="Submit" value="Send"> <input type="reset" value="Reset"> </form> </p> <?php if (isset($_GET['msg'])) { echo "<font color=\"red\"><h3 align=\"center\"> $_GET[msg] </h3></font>"; } ?> <h3 align="center"> WARNING: Use it at your own risk. Do not use this for Spamming!. </h3> </body> </html>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 57
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 22
Branch analysis from position: 18
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 22
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 57
2 jumps found. (Code = 43) Position 1 = 61, Position 2 = 67
Branch analysis from position: 61
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 67
filename:       /in/0gmfq
function name:  (null)
number of ops:  69
compiled vars:  !0 = $to, !1 = $subject, !2 = $message, !3 = $fromemail, !4 = $fromname, !5 = $lt, !6 = $gt, !7 = $sp, !8 = $from, !9 = $headers
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'session_start'
          1        DO_ICALL                                                 
    3     2        FETCH_R                      global              ~11     '_POST'
          3        FETCH_DIM_R                                      ~12     ~11, 'Submit'
          4        IS_EQUAL                                                 ~12, 'Send'
          5      > JMPZ                                                     ~13, ->57
    5     6    >   INIT_FCALL                                               'strcmp'
          7        INIT_FCALL                                               'md5'
          8        FETCH_R                      global              ~14     '_POST'
          9        FETCH_DIM_R                                      ~15     ~14, 'user_code'
         10        SEND_VAL                                                 ~15
         11        DO_ICALL                                         $16     
         12        SEND_VAR                                                 $16
         13        FETCH_R                      global              ~17     '_SESSION'
         14        FETCH_DIM_R                                      ~18     ~17, 'ckey'
         15        SEND_VAL                                                 ~18
         16        DO_ICALL                                         $19     
         17      > JMPZ                                                     $19, ->22
    7    18    >   INIT_FCALL                                               'header'
         19        SEND_VAL                                                 'Location%3A+sendmail.php%3Fmsg%3DERROR%3A+Invalid+Verification+Code'
         20        DO_ICALL                                                 
    8    21      > EXIT                                                     
   11    22    >   FETCH_R                      global              ~21     '_POST'
         23        FETCH_DIM_R                                      ~22     ~21, 'toemail'
         24        ASSIGN                                                   !0, ~22
   12    25        FETCH_R                      global              ~24     '_POST'
         26        FETCH_DIM_R                                      ~25     ~24, 'subject'
         27        ASSIGN                                                   !1, ~25
   13    28        FETCH_R                      global              ~27     '_POST'
         29        FETCH_DIM_R                                      ~28     ~27, 'message'
         30        ASSIGN                                                   !2, ~28
   14    31        FETCH_R                      global              ~30     '_POST'
         32        FETCH_DIM_R                                      ~31     ~30, 'fromemail'
         33        ASSIGN                                                   !3, ~31
   15    34        FETCH_R                      global              ~33     '_POST'
         35        FETCH_DIM_R                                      ~34     ~33, 'fromname'
         36        ASSIGN                                                   !4, ~34
   16    37        ASSIGN                                                   !5, '%3C'
   17    38        ASSIGN                                                   !6, '%3E'
   18    39        ASSIGN                                                   !7, '+'
   19    40        ASSIGN                                                   !8, 'From%3A'
   20    41        CONCAT                                           ~40     !8, !4
         42        CONCAT                                           ~41     ~40, !7
         43        CONCAT                                           ~42     ~41, !5
         44        CONCAT                                           ~43     ~42, !3
         45        CONCAT                                           ~44     ~43, !6
         46        ASSIGN                                                   !9, ~44
   21    47        INIT_FCALL                                               'mail'
         48        SEND_VAR                                                 !0
         49        SEND_VAR                                                 !1
         50        SEND_VAR                                                 !2
         51        SEND_VAR                                                 !9
         52        DO_ICALL                                                 
   22    53        INIT_FCALL                                               'header'
         54        SEND_VAL                                                 'Location%3A+sendmail.php%3Fmsg%3D+Mail+Sent%21'
         55        DO_ICALL                                                 
   23    56      > EXIT                                                     
   26    57    >   ECHO                                                     '%3Chtml%3E%0A%3Chead%3E%0A%3Ctitle%3EEmail+Pranks%3C%2Ftitle%3E%0A%3C%2Fhead%3E%0A%3Cbody+bgcolor%3D%22%23ffffcc%22%3E%0A%3Ch2+align%3D%22center%22%3E%0AFake+Email+Prank+Script+By+Srikanth%0A%3C%2Fh2%3E%0A%3Ch3+align%3D%22center%22%3E%0APlease+do+not+misuse+this+script.+Use+it+only+for+having+FUN.%0A%3C%2Fh3%3E%3Cbr%3E%0A%3Cp+style%3D%22margin-left%3A15px%22%3E%0A%3Cform+action%3D%22sendmail.php%22+method%3D%22POST%22%3E%0A%3Cb%3EFrom+Name%3A%3C%2Fb%3E%3Cbr%3E%0A%3Cinput+type%3D%22text%22+name%3D%22fromname%22+size%3D%2250%22%3E%3Cbr%3E%0A%3Cbr%3E%3Cb%3EFrom+Email%3A%3C%2Fb%3E%3Cbr%3E%0A%3Cinput+type%3D%22text%22+name%3D%22fromemail%22+size%3D%2250%22%3E%3Cbr%3E%0A%3Cbr%3E%3Cb%3ETo+Email%3A%3C%2Fb%3E%3Cbr%3E%0A%3Cinput+type%3D%22text%22+name%3D%22toemail%22+size%3D%2250%22%3E%3Cbr%3E%0A%3Cbr%3E%3Cb%3ESubject%3A%3C%2Fb%3E%3Cbr%3E%0A%3Cinput+type%3D%22text%22+name%3D%22subject%22+size%3D%2274%22%3E%3Cbr%3E%0A%3Cbr%3E%3Cb%3EYour+Message%3A%3C%2Fb%3E%3Cbr%3E%0A%3Ctextarea+name%3D%22message%22+rows%3D%225%22+cols%3D%2250%22%3E%0A%3C%2Ftextarea%3E%3Cbr%3E%0A%3Cbr%3E%3Cb%3EVerification+Code%3A%3C%2Fb%3E%3Cbr%3E%0A%3Cinput+name%3D%22user_code%22+type%3D%22text%22+size%3D%2225%22%3E++%0A%3Cimg+src%3D%22pngimg.php%22+align%3D%22middle%22%3E%3Cbr%3E%3Cbr%3E%0A%3Cinput+type%3D%22submit%22+name%3D%22Submit%22+value%3D%22Send%22%3E%0A%3Cinput+type%3D%22reset%22+value%3D%22Reset%22%3E%0A%3C%2Fform%3E%0A%3C%2Fp%3E%0A'
   57    58        FETCH_IS                                         ~48     '_GET'
         59        ISSET_ISEMPTY_DIM_OBJ                         0          ~48, 'msg'
         60      > JMPZ                                                     ~49, ->67
         61    >   ROPE_INIT                                     3  ~53     '%3Cfont+color%3D%22red%22%3E%3Ch3+align%3D%22center%22%3E+'
         62        FETCH_R                      global              ~50     '_GET'
         63        FETCH_DIM_R                                      ~51     ~50, 'msg'
         64        ROPE_ADD                                      1  ~53     ~53, ~51
         65        ROPE_END                                      2  ~52     ~53, '+%3C%2Fh3%3E%3C%2Ffont%3E'
         66        ECHO                                                     ~52
   58    67    >   ECHO                                                     '%3Ch3+align%3D%22center%22%3E%0AWARNING%3A+Use+it+at+your+own+risk.+Do+not+use+this+for+Spamming%21.%0A%3C%2Fh3%3E%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
   62    68      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.74 ms | 1404 KiB | 23 Q