English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Dear Community,
Hello,
I am trying to make a port scanner for cell phones using J2ME. I am having problem in finding out how can I create my own raw packet in J2ME. The only class I can think of is connector. If somebody can please guide me how can I make my own tcp packet and send it to a host and listen for a response. rather than opening a full 3 handshake connection with host how can i send only one packet with the flags of my own choice.
I would be much obliged if can get a prompt reply.
I really need help as I had been researching here and there but havent found any relavent information so far. I got source code of some port scanners but they used wincap api and thats not possible in j2me to import an api. please help me thanks

Truly yours,
ET

2007-07-15 15:51:04 · 3 answers · asked by ET 1 in Computers & Internet Programming & Design

3 answers

I don't think the default Java libraries support that. Even their own TCP implementation (java.net. PlainSocketImpl) uses native code to establish a socket.

You can do UDP packets (see java.net. DatagramPacket and java.net. DatagramSocket)

2007-07-15 17:45:28 · answer #1 · answered by McFate 7 · 0 1

Theres no packets to write. You do have to design the network communications, but there is datagramsocket class for udp packets, and a regular socket for tcp/ip packets.The objects you send are embedded within TCP/IP Packets. e.g. Socket sock = new Socket("localhost", 5678); (new bufferedWriter(sock.getOutputStream()).w... new String("requesting connection"));

2016-05-18 22:25:51 · answer #2 · answered by ? 3 · 0 0

Does not look trivial. You may consider contacting a j2me expert at websites like http://askexpert.info/

2007-07-15 20:04:25 · answer #3 · answered by Anonymous · 0 1

fedest.com, questions and answers