/usr/share/doc/libjcifs-java/examples/NtlmHttpAuthExample.java is in libjcifs-java-doc 1.3.19-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class NtlmHttpAuthExample extends HttpServlet {
public void doGet( HttpServletRequest req,
HttpServletResponse resp ) throws IOException, ServletException {
PrintWriter out = resp.getWriter();
resp.setContentType( "text/html" );
out.println( "<HTML><HEAD><TITLE>NTLM HTTP Authentication Example</TITLE></HEAD><BODY>" );
out.println( "<h2>NTLM HTTP Authentication Example</h2>" );
out.println( req.getRemoteUser() + " successfully logged in" );
out.println( "<h3>Please submit some form data using POST</h3>" );
out.println( "<form action=\"NtlmHttpAuthExample\" method=\"post\">" );
out.println( "<input type=\"text\" name=\"field1\" size=\"20\"/>" );
out.println( "<input type=\"submit\"/>" );
out.println( "</form>" );
out.println( "field1 = " + req.getParameter( "field1" ));
out.println( "</BODY></HTML>" );
}
public void doPost( HttpServletRequest req,
HttpServletResponse resp ) throws IOException, ServletException {
doGet( req, resp );
}
}
|