import java.net.
;
import java.io.
;
public class sendMail {
public void sendMail(String mailServer, String recipient, String result) {
try {
Socket s = new Socket(mailServer, 25);
BufferedReader in = new BufferedReader
(new InputStreamReader(s.getInputStream(), "8859_1"));
BufferedWriter out = new BufferedWriter
(new OutputStreamWriter(s.getOutputStream(), "8859_1"));
send(in, out, "HELO client");
send(in, out, "MAIL FROM: ");
send(in, out, "RCPT : " + recipient);
send(in, out, "DATA");
send(out, "Subject: ");
send(out, "From: Admin ");
send (out, "\n");
send(out, result);
send(out, "\n.\n");
send(in, out, "QUIT");
}
catch (Exception e) {
e.printStackTrace();
}
}
public void send(BufferedReader in, BufferedWriter out, String s) {
try {
out.write(s + "\n");
out.flush();
Sys...
|
import java.io.
;
import java.util.
;
import java.
;
import java.net.
;
public class WatchDog
{
static Process p = null;
static Process qproc = null;
static BufferedReader bf = null;
static StringTokenizer tok = null;
static String Path = null;
static String str = null;
static String urlStr=null;
static boolean changed = false;
static File indexfile = new File("index.html");
static File tmpfile = new File("tmpindex.html");
static File mdfile = new File("md5file.txt");
static File tmpmdfile = new File("tmpmd5file.txt");
static PrintWriter mailwriter = null;
public static void main(String[] args)
{
urlStr = "
http://www.cs.rmit.edu./
";
try
{
mailwriter = new PrintWriter(new BufferedWriter(new FileWriter("tomail.txt", false)));
getLatest(urlStr);
parseFile();
mailwriter.read();
if(changed)
{
System.out.println("Sending Mail");
...
|
0
|
import java.io.
;
import java.net.
;
public class BruteForce
{
private String myUsername = "";
private String urlToCrack = "
http://sec-crack.cs.rmit.edu./SEC/2
";
private int NUM_CHARS = 52;
public static void main(String args[])
{
BruteForce bf = new BruteForce();
}
public BruteForce()
{
generatePassword();
}
public void generatePassword()
{
int index1 = 0, index2, index3;
char passwordChars[] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',
'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
's', 't', 'u', 'v', 'w', 'x', 'y', 'z' };
while(index1 < NUM_CHARS)
{
index2 = 0;
while(index2 < NUM_CHARS)
{
...
|
public class HoldSharedData
{
private int numOfConnections = 0;
private int startTime;
private int totalTime = 0;
private String[] password;
private int pwdCount;
public HoldSharedData( int time, String[] pwd, int count )
{
startTime = time;
password = pwd;
pwdCount = count;
}
public int getPwdCount()
{
return pwdCount;
}
public void setNumOfConnections( )
{
numOfConnections ++;
}
public int getNumOfConnections()
{
return numOfConnections;
}
public int getStartTime()
{
return startTime;
}
public void setTotalTime( int newTotalTime )
{
totalTime = newTotalTime;
}
public int getTotalTime()
{
return totalTime;
}
public String getPasswordAt( int index )
{
return password[index];
}
}
|
0
|
import java.net.
;
import java.io.
;
public class sendMail {
public void sendMail(String mailServer, String recipient, String result) {
try {
Socket s = new Socket(mailServer, 25);
BufferedReader in = new BufferedReader
(new InputStreamReader(s.getInputStream(), "8859_1"));
BufferedWriter out = new BufferedWriter
(new OutputStreamWriter(s.getOutputStream(), "8859_1"));
send(in, out, "HELO client");
send(in, out, "MAIL FROM: ");
send(in, out, "RCPT : " + recipient);
send(in, out, "DATA");
send(out, "Subject: ");
send(out, "From: Admin ");
send (out, "\n");
send(out, result);
send(out, "\n.\n");
send(in, out, "QUIT");
}
catch (Exception e) {
e.printStackTrace();
}
}
public void send(BufferedReader in, BufferedWriter out, String s) {
try {
out.write(s + "\n");
out.flush();
Sys...
|
import java.net.
;
import java.io.
;
public class Base64Encoder
{
private final static char base64Array [] = {
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
'w', 'x', 'y', 'z', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9', '+', '/'
};
public static String encode (String string)
{
String encodedString = "";
byte bytes [] = string.getBytes ();
int i = 0;
int pad = 0;
while (i < bytes.length)
{
byte b1 = bytes [i++];
byte b2;
byte b3;
if (i >= bytes.length)
{
b2 = 0;
b3 = 0;
pad = 2;
}
else
{
b2 = bytes [i++];
if (i >= bytes.length)
...
|
0
|