Tiff,

    Why do you create a new email thread for each email you send?

On Tue, Jul 28, 2015 at 12:13 AM, 冠庭 羅 <btiffe...@yahoo.com.tw> wrote:
> 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 name
> But 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");

Once again, you need to send THE CONTENTS OF THE FILE, NOT THE FILE NAME.

>      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
>



-- 
Andrés Riancho
Project Leader at w3af - http://w3af.org/
Web Application Attack and Audit Framework
Twitter: @w3af
GPG: 0x93C344F3

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

Reply via email to