How to get the captcha

02/03/2009 21:18 fabrimp#1
How i can do to take the captcha ?

i tried to take a screen shot but if u change resolutions this way dont work more ...

Silkroad make a temp file for captcha or store it for a time ?

were i can found it ?
02/04/2009 12:57 InvincibleNoOB#2
It's stored in memory.The packet length is 641 bytes.The Image size is 200x64pxl.The image itself is monochrome.
02/05/2009 20:33 fabrimp#3
Ok thanks man ... but its dificult to read packets in memory from a java program .... i will find a solution ... i only can program in java ....
02/05/2009 21:44 ShyroN1337#4
Quote:
Originally Posted by fabrimp View Post
Ok thanks man ... but its dificult to read packets in memory from a java program .... i will find a solution ... i only can program in java ....
yup, java is really weak in such things
02/07/2009 05:59 fabrimp#5
Ok !! i found an easy way to get the captcha using java
i wrote a metod to read clipboard and determine resolution to get only the captcha

but i need to do javadoc for it

Code:
import java.awt.Toolkit;
import java.awt.datatransfer.Clipboard;
import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.Transferable;
import java.awt.datatransfer.UnsupportedFlavorException;
import java.awt.image.BufferedImage;
import java.io.IOException;
//import java.nio.Buffer;


public class CutCaptcha {
	
	BufferedImage screen = getImageFromClipboard();
    private int comprimento = screen.getWidth();
	private int altura = screen.getHeight();
	
	
//Metodo para pegar imagem do Clipboard
	 public static BufferedImage getImageFromClipboard() {  
		     Clipboard systemClipboard = Toolkit.getDefaultToolkit().getSystemClipboard();  
		     Transferable clipboardContents = systemClipboard.getContents(null);  
		     if (clipboardContents == null)  
		         return null;  
		    else  
		        try {  
		             if (clipboardContents.isDataFlavorSupported(DataFlavor.imageFlavor)) {  
		            	 BufferedImage image = (BufferedImage) clipboardContents.getTransferData(DataFlavor.imageFlavor);  
		                 return image;  
		             }  
		        } catch (UnsupportedFlavorException ufe) {  
		             ufe.printStackTrace();  
		         } catch (IOException ioe) {  
		             ioe.printStackTrace();  
		         }  
		     return null;  
		 }
	 
//Obter Comprimento

	public int getComprimento() {
		return comprimento;
	}

//Obter Altura

	public int getAltura() {
		return altura;
	}
//Cortar imagem
	public BufferedImage getCaptcha(){
		if(getComprimento() == 1024 && getAltura() == 768){
			return screen.getSubimage(345, 455, 200, 64);
			}else {
				return null;
			}
	}
	 

}
now i will add more resolutions and i doing the filter for clean image
but i need a litle help to derotate text ...
please helpme with this ....

I followng this steps:

1-getCaptcha - get only the captcha -ready!
2-filterCaptcha - Clean captcha noise - working in process 68%
3-derotateCaptcha - Find bether angle to improve accuracy - NEED HELP HERE PLEASE !
4-Ocr [Only registered and activated users can see links. Click Here To Register...] -ready !
5-Robot + gui class - next step !