S
S
StasFetisov2015-05-02 22:15:43
Java
StasFetisov, 2015-05-02 22:15:43

How to download a secure file (JSP authorization)?

Help me please. Can't download jsp file.

If you download the file https://do.vivt.ru/Brainfork/confirmtest.jsp through Opera, then it loads */testselector.jsp

Because of this, I started digging and came across a way to protect the file through referrer checking.
Based on this, wget began to torment. But it still doesn't work, it says 404.

Here's what I'm doing:
0. authorization happens through
https://do.vivt.ru/Brainfork/test/login.jsp

<form action="login.jsp">
      <input class="textfield" type="text" name="login" value=""/>
      <input class="textfield" type="password" name="password" value=""/>
      
      <label><input class="textfield" type="checkbox" name="captureSession" value="ON"/>Захватить сеанс</label>
      
      <input class="button" type="submit" value="Вход"/>
      <input class="button" type="button" value="Отмена" onclick="window.close()"/>
   </form>

authorization

wget https://do.vivt.ru/Brainfork/login.jsp --post-data="login=0&password=1&captureSession=ON" -P d:\v\ --save-cookies=d:\v\coc --no-check-certificate


1. The page
https://do.vivt.ru/Brainfork/test/testselector.jsp

contains the form:

<form action="confirmtest.jsp">
     <select class="textfield" name="selectedTest" size="6">
            <option value="0..5" selected="selected">ТЕМА</option>

     </select>       
     <input class="button" type="submit" value="Начать">   
   </form>


I execute confirmtest.jsp to download

wget --referer=https://do.vivt.ru/Brainfork/testselector.jsp --load-cookies=d:\v\coc --keep-session-cookies --post-data="selectedTest=0" https://do.vivt.ru/Brainfork/confirmtest.jsp -P d:\v\ --no-check-certificate


2. does not download

Resolving do.vivt.ru... 85.113.147.88
Connecting to do.vivt.ru|85.113.147.88|:443... connected.
WARNING: cannot verify do.vivt.ru's certificate, issued by `/C=IL/O=StartCom Ltd
./OU=Secure Digital Certificate Signing/CN=StartCom Class 1 Primary Intermediate
Server CA':
Unable to locally verify the issuer's authority .
HTTP request sent, awaiting response... 404 Not Found
2015-05-02 12:27:40 ERROR 404: Not Found.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AlexLIn, 2015-05-02
@StasFetisov

272 of the Criminal Code of the Russian Federation

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question