Jsoup:必须发布哪个输入字段?

时间:2016-06-29 16:07:50

标签: post jsoup

我想知道哪个输入字段必须在我的应用程序中发布。我使用jsoup post:

我的网址:http://185.47.49.85/login.aspx

我的代码:

Document doc=new Document("ASD");

try {

    doc=Jsoup.connect("http://185.47.49.85/login.aspx/")
            .data("__EVENTTARGET","")
            .data("__EVENTARGUMENT", "")
            .data("__VIEWSTATE", "/wEPDwUJMTc5NzE0NDAzD2QWDAIDDw8WBB4EVGV4dAU+2K/Yp9mG2LTar9in2Ycg2KLYstin2K8g2KfYs9mE2KfZhduMINmF2LHZg9iyINmC2LXYsdi024zYsduM2YYeC05hdmlnYXRlVXJsBRNodHRwOi8vMTg1LjQ3LjQ5Ljg1ZGQCBQ9kFgICDw9kFgICAQ8UKwADDxYCHhdFbmFibGVBamF4U2tpblJlbmRlcmluZ2hkFgIeC0N1cnJlbnRHdWlkBSRhZGQzNGE1Yi05YzA5LTQ0NDYtYTEyYy0yMzdjOGJkZWIzNDkUKwADZGRkFgICAQ9kFghmD2QWAmYPZBYGZg8PFgoeBkhlaWdodBsAAAAAAABJQAEAAAAeBVdpZHRoGwAAAAAAgGZAAQAAAB4IQ3NzQ2xhc3MFDnJjQ2FwdGNoYUltYWdlHghJbWFnZVVybAVTfi9UZWxlcmlrLldlYi5VSS5XZWJSZXNvdXJjZS5heGQ/dHlwZT1yY2EmZ3VpZD1hZGQzNGE1Yi05YzA5LTQ0NDYtYTEyYy0yMzdjOGJkZWIzNDkeBF8hU0ICggNkZAIBDw8WAh8AZWRkAgIPFgQeCWlubmVyaHRtbGUeBGhyZWYFV34vVGVsZXJpay5XZWIuVUkuV2ViUmVzb3VyY2UuYXhkP3R5cGU9Y2FoJmFtcDtndWlkPWFkZDM0YTViLTljMDktNDQ0Ni1hMTJjLTIzN2M4YmRlYjM0OWQCAQ8PFgofBBsAAAAAAABJQAEAAAAfBRsAAAAAAIBmQAEAAAAfBgUOcmNDYXB0Y2hhSW1hZ2UfBwVTfi9UZWxlcmlrL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fZiiDZhdi32YXYptmGINmIINio2LHZiNiyICjZhdin2YbZhtivINqv2Yjar9mEINqp2LHZiNmFINmIINmB2KfZitix2YHYp9qp2LMpINin2LPYqtmB2KfYr9mHINqp2YbZitivLiA8YnIvPiAyLSDYsdmF2LIg2LnYqNmI2LEg2K7ZiNivINix2Kcg2K/YsSDZgdmI2KfYtdmEINiy2YXYp9mG2Yog2qnZiNiq2KfZhyDYqti62YrZitixINiv2YfZitivLiA8YnIvPiAzLSDZvtizINin2LIg2KfZhtis2KfZhSDZiCDYp9iq2YXYp9mFINmD2KfYsdiMINit2KrZhdinINin2LIg2LPZitiz2KrZhSDYrtin2LHYrCDYtNmI2YrYry4gPGJyLz48L2ZvbnQ+ZAIQDxYCHwkF+wI8Zm9udCBzaXplPSIycHQiPiA8YnIvPiAxLSDYqtmI2LXZitmHINmF2Yog2LTZiNivINin2LIg2YXYsdmI2LHar9ixINmH2KfZiiDZhdi32YXYptmGINmIINio2LHZiNiyICjZhdin2YbZhtivINqv2Yjar9mEINqp2LHZiNmFINmIINmB2KfZitix2YHYp9qp2LMpINin2LPYqtmB2KfYr9mHINqp2YbZitivLiA8YnIvPiAyLSDYsdmF2LIg2LnYqNmI2LEg2K7ZiNivINix2Kcg2K/YsSDZgdmI2KfYtdmEINiy2YXYp9mG2Yog2qnZiNiq2KfZhyDYqti62YrZitixINiv2YfZitivLiA8YnIvPiAzLSDZvtizINin2LIg2KfZhtis2KfZhSDZiCDYp9iq2YXYp9mFINmD2KfYsdiMINit2KrZhdinINin2LIg2LPZitiz2KrZhSDYrtin2LHYrCDYtNmI2YrYry4gPGJyLz48L2ZvbnQ+ZAISDxYCHwkF+wI8Zm9udCBzaXplPSIycHQiPiA8YnIvPiAxLSDYqtmI2LXZitmHINmF2Yog2LTZiNivINin2LIg2YXYsdmI2LHar9ixINmH2KfZiiDZhdi32YXYptmGINmIINio2LHZiNiyICjZhdin2YbZhtivINqv2Yjar9mEINqp2LHZiNmFINmIINmB2KfZitix2YHYp9qp2LMpINin2LPYqtmB2KfYr9mHINqp2YbZitivLiA8YnIvPiAyLSDYsdmF2LIg2L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")
    .data("__VIEWSTATEGENERATOR", "C2EE9ABB")
    .data("__PREVIOUSPAGE", "gsmhLhCPfCvUmPOtmYGZavCSVn8KiXvv_ujJZKgxbGMTMoS7-fB3jUysNlHpjGVqTCuIxlxNA5vnOOF_Jog3vb2j6HKQ3_kOJ6JWUlcAd5c1")
    .data("__EVENTVALIDATION", "/wEdAA6lKtoPqg2wpq8JitnIKCzHY3plgk0YBAefRz3MyBlTcHY2+Mc6SrnAqio3oCKbxYbDKjeO0tta9Mov2vsvaZ0VW1VFON8NLemVOIc5oCPrDDbNd+G2gDK/o3KZLpfRls0NLI0sLHtyhUxJ5tRy0Qw1IPPXXbVwmcpXcDunE5ErJXf3ZhkaY4N6/yfgXHrl+bYJKZv54L/IQQgpkqAarNp9zfg78Z8BXhXifTCAVkevd6R7lV3BRrsBFnVFRzoWBlmUuSYZz4ym4FYvndnVPufxn7/4HiQ5iYGPaZqUf85XUUWnddBptMe0iBB5jBDhyiLyP8LBCLgClOePInYX7Jk6")
    .data("txtUserName","111111")
    .data("txtPassword","1111111")
    .data("rcTextBox1", "45652")
    .data("TypeStudents","RAD_DANESHJOO")
    .data("RadCaptcha1_ClientState","45652")
    .data("btn_enter", "????")
    .timeout(30000).post();
}
catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
}
return doc;

1 个答案:

答案 0 :(得分:0)

检查服务器是否未动态生成以下参数:

  • __ VIEWSTATE
  • __ VIEWSTATEGENERATOR
  • __ |上一页
  • __ EVENTVALIDATION

如果是这种情况,请使用此问题的代码:Submitting a form with Jsoup

<强>更新 另外,您可能会发现以下答案也很有用。它显示captcha image grabbing with Jsoup