Hi Andrés Riancho,

Sorry.. That is language gap... I thought that filename is like 
"fast_scan.pw3af" so that I keep trying on folder nameBut anyway, I tried 
"../../fast_scan.pw3af" before...
my code is like this (only change to the scan_profile)    @POST   
@SuppressWarnings("unchecked")

   @Path("/ScanTarget")

  @Consumes(MediaType.APPLICATION_JSON)

   @Produces(MediaType.APPLICATION_JSON) 

  public int ScanIt() throws IOException {

    JSONObject jsonObject = new JSONObject();  

    jsonObject.put("scan_profile", "/home/tiff/w3af/profiles/fast_scan.pw3af"); 

    JSONArray jsonArray = new JSONArray();

    jsonArray.add("http://testaspnet.vulnweb.com/";);

    jsonObject.put("target_url", jsonArray);

    System.out.println("output:" + jsonObject.toJSONString()); 

      connect.set_response(

                           connect.get_service().                               
 

                           request().

                           header("Content-Type", "application/json").

                       post(Entity.json(jsonObject.toJSONString())));

                      return connect.get_status();

    }


and I got the status 301 message from w3af_api console 

(venv)[root@localhost w3af]# ./w3af_api * Running on http://127.0.0.1:5000/ 
(Press CTRL+C to quit)127.0.0.1 - - [27/Jul/2015 11:19:40] "POST /scans 
HTTP/1.1" 301 -127.0.0.1 - - [27/Jul/2015 11:19:40] "GET /scans/ HTTP/1.1" 200 -

What's wrong in my web service or somewhere I lost it?

Thanks
Tiff 
------------------------------------------------------------------------------
_______________________________________________
W3af-develop mailing list
W3af-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/w3af-develop

Reply via email to