暴力破解思路--简化版

@Test
void pk(){
    RestTemplate restTemplate = new RestTemplate();
    System.out.println("sss");
    HttpHeaders headers = new HttpHeaders();
    headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
    MultiValueMap<String, String> map= new LinkedMultiValueMap<String, String>();
    map.add("UserID", "admin");
     map.add("Password", "000000als");
    HttpEntity<MultiValueMap<String, String>> request = new HttpEntity<MultiValueMap<String, String>>(map, headers);
    ResponseEntity<String> response = restTemplate.postForEntity( "http://localhost:4405/demo/Logon.jsp", request , String.class );
   System.out.println("Status:"+response.getStatusCode());
    System.out.println(response.getBody());
}

猜你喜欢

转载自blog.csdn.net/kevin_cat/article/details/83013304