Advertising (This ad goes away for registered users. You can Login or Register)

[Release]UsbServer

Submit your entry for the competition here.
check http://wololo.net/genesis for detailed rules
Abhinav The Great
Posts: 59
Joined: Tue May 24, 2011 8:24 am

Re: [Release]UsbServer

Post by Abhinav The Great » Mon May 30, 2011 4:01 am

when i pressed X the network connection window opened , so i scanned but no access points were detected
Below is the status of Start Example at that time

C:\Documents and Settings\Abhinav\Desktop\PC>java -jar UsbServerPC.jar
USBSERVERPC v1.0 by Thecobra(James A.) 04/17/2011
Connecting to USBSERVER ... DONE.
USBSERVER Online: false
USBSERVER IP: unknown IP
Webpage :
C:\Documents and Settings\Abhinav\Desktop\PC>pause
Press any key to continue . . .

Well.................. what am i doing wrong???????????????????
Advertising

User avatar
shadowknight1620
Posts: 420
Joined: Mon Nov 15, 2010 12:45 am
Location: California
Contact:

Re: [Release]UsbServer

Post by shadowknight1620 » Mon May 30, 2011 6:54 am

OMG! Totally keep working on this project this is exactly what i've been looking for since i started hacking my PSP awesome work keep it up and Thank You!
Advertising
ShadowKnight1620 PSP-3001 6.60 PRO-C2 & PSVita 3.36 ARK-2
ImageDownload ShadowKnight1620's CTF

User avatar
nisarg_kolhe
Posts: 944
Joined: Fri Dec 10, 2010 12:44 pm
Location: 404 : Not Found
Contact:

Re: [Release]UsbServer

Post by nisarg_kolhe » Mon May 30, 2011 7:17 am

Abhinav The Great wrote:when i pressed X the network connection window opened , so i scanned but no access points were detected
Below is the status of Start Example at that time

C:\Documents and Settings\Abhinav\Desktop\PC>java -jar UsbServerPC.jar
USBSERVERPC v1.0 by Thecobra(James A.) 04/17/2011
Connecting to USBSERVER ... DONE.
USBSERVER Online: false
USBSERVER IP: unknown IP
Webpage :
C:\Documents and Settings\Abhinav\Desktop\PC>pause
Press any key to continue . . .

Well.................. what am i doing wrong???????????????????
+1
Reality Sucks! :|
!~My Blog~!
[spoiler]Ultimate PS3 Theme Mod v2.1(For PSP)
Image
Image[/spoiler]

Jukki
Posts: 55
Joined: Fri Feb 04, 2011 7:28 pm

Re: [Release]UsbServer

Post by Jukki » Mon May 30, 2011 12:32 pm

dang. I need help asap. Leaving for RV trip for one month tomorrow. There is wi-fi's in every place. But unfortunately my pc's wi-fi is broken and this app came like from heaven. Only problem is. The app hangs in genesis logo for me :( any way to fix this?

vasi4_5
Posts: 12
Joined: Wed May 18, 2011 8:09 pm

Re: [Release]UsbServer

Post by vasi4_5 » Mon May 30, 2011 4:28 pm

Is there any chance for brick with this HB? And sorry for calling you as*hole :lol: You ROCK! Thanks for this HB.

Mexicouger
Posts: 89
Joined: Sun Feb 13, 2011 8:32 pm

Re: [Release]UsbServer

Post by Mexicouger » Mon May 30, 2011 11:16 pm

I follow the steps, and it just says:


C:\Users\Administrator\Desktop\PC>java -jar UsbServerPC.jar
USBSERVERPC v1.0 by Thecobra(James A.) 04/17/2011
Connecting to USBSERVER ..

And it doesn't do anything past that
It also didn't say my drivers installed properly when I plugged my psp in with USBserver on, so I dunno if thats a problem

shura
Posts: 33
Joined: Sat Dec 11, 2010 3:06 am

Re: [Release]UsbServer

Post by shura » Tue May 31, 2011 2:13 am

Jukki wrote:dang. I need help asap. Leaving for RV trip for one month tomorrow. There is wi-fi's in every place. But unfortunately my pc's wi-fi is broken and this app came like from heaven. Only problem is. The app hangs in genesis logo for me :( any way to fix this?
Disable all your game plugins and it will work, it happened to me too but works later when i disabled all game plugins.
btw, it works at the point when i search for access points and connects succesfully but when using bat files nothing happen :cry:

npt
VIP
Posts: 154
Joined: Wed Oct 27, 2010 3:32 pm

Re: [Release]UsbServer

Post by npt » Tue May 31, 2011 5:07 am

thecobra wrote:Project Name: UsbServer
Version: 1.5
Developer: Thecobra
Credit:
*lukas for release his pspnet source code online( it gave me a clue to what function i will need to patch later on and hows to improve some of my code)
*Thanks to those in my thread for posting and telling me that i found this project interested. I will keep on working on this project so don't worry about it.
Description: Use the PSP as a UsbWifi Adapter for the PC
Info:
*psp side is done
*PC side needs some bug fix before it complety ready
*need to add the PC to PSP feature


Hi all, It me Thecobra.

Here i am releasing the UsbServer that i have been developing for the PSP comp.
This program is meant to make your psp work as a PC Wifi adapter but due to some problem and lack of time. i wasn't able to complete the PC proxy program but i did release a simple Java program with it that shows how to use the PSP as a PC wifi adapter. The example retrieves a Google.com web page.
I included the java code so anyone that knows how to code in java could easly make a java proxy server using it.

Instruction:
First connect your psp to your pc.
Then run the PSP usbServer program. Press X to connect to the internet.
Then run the usbhostfs on the pc.
Finnaly run startExample.

I gonna keep on working on this project but i wanted to release atleast this much for the contest.

Image

Image

Download it here: http://www.netgameorb.com/UsbServer.zip
I hope you keep working on this! Please do! Awesome entry! Welcome to the competition!

Very cool idea, and a lot have said it wouldn't happen! Using the psp as a usb wifi card, heck yeah! : )

Regards,

npt

:ugeek:

User avatar
jvhellraiser
Posts: 1478
Joined: Tue Jan 18, 2011 4:09 pm

Re: [Release]UsbServer

Post by jvhellraiser » Tue May 31, 2011 12:35 pm

Hello NTP:

i get this but it dont do anything else:



C:\Users\Hellraiser\Desktop\PC>java -jar UsbServerPC.jar
USBSERVERPC v1.0 by Thecobra(James A.) 04/17/2011
Connecting to USBSERVER ... DONE.
USBSERVER Online: true
USBSERVER IP: 10.0.0.71
Webpage : HTTP/1.1 302 FoundLocation: http://www.google.com.pr/index.htmlCache-C
ontrol: privateContent-Type: text/html; charset=UTF-8Set-Cookie: PREF=ID=ecdefb9
74d7f8c21:FF=0:TM=1306844863:LM=1306844863:S=ncyahpsn3T6D6LD8; expires=Thu, 30-M
ay-2013 12:27:43 GMT; path=/; domain=.google.comSet-Cookie: NID=47=IybRpM36Bo7By
jP-3zjnMEclCK11945pQwd2IXPTtSGokGgArSHxhSJaa8GnfM7VKZKXJuAQP7IQrAc9WujCq6yCCmmnu
-E8wyKp1nUmwjAC2lpGiKOxx8Qp6Y-EUBEj; expires=Wed, 30-Nov-2011 12:27:43 GMT; path
=/; domain=.google.com; HttpOnlyDate: Tue, 31 May 2011 12:27:43 GMTServer: gwsCo
ntent-Length: 232X-XSS-Protection: 1; mode=blockConnection: close<HTML><HEAD><me
ta http-equiv="content-type" content="text/html;charset=utf-8"><TITLE>302 Moved<
/TITLE></HEAD><BODY><H1>302 Moved</H1>The document has moved<A HREF="http://www.
google.com.pr/index.html">here</A>.</BODY></HTML>
C:\Users\Hellraiser\Desktop\PC>pause
Press any key to continue . . .

After this i can't do anything or connec to the internet. maybe you know why?

User avatar
ohrores
Posts: 21
Joined: Thu Apr 14, 2011 5:11 pm
Location: Germany

Re: [Release]UsbServer

Post by ohrores » Tue May 31, 2011 2:01 pm

I have wrote a little mod.
To pipe it to firefox.
UsbServerPC.java:

Code: Select all

import java.net.* ;

import java.io.* ;





public class UsbServerPC {



	private static String title = "USBSERVERPC v1.0 by Thecobra(James A.) 04/17/2011";

	public static Socket s = null;

	public static DataInputStream dIn;

	public static DataOutputStream dOut;



	public static void main(String[] args) throws IOException {

		// TODO Auto-generated method stub

		try{

			s = new Socket("127.0.0.1",10005);

			dIn = new DataInputStream(s.getInputStream());

			dOut = new DataOutputStream(s.getOutputStream());

		} catch(IOException e){

			System.out.println("Fehler: "+e);

		}



		//System.out.print(RecvUsbWait());

		WaitForUsbServer();

		String data = "GET  /index.html HTTP/1.1\r\n" + "User-Agent: HTTPGrab\r\n"

		+ "Accept: text/*\r\n" + "Connection: close\r\n" + "Host: "+args[0]+" \r\n" + "\r\n";

		String webpage = GetWebPage(args[0],80,data);
		String[] page = webpage.split("<head>");

		System.out.print("" + page[1]);

	}



	public static void SendUsb(String data) throws IOException{

		dOut.write(data.getBytes());

		dOut.flush();

	}





	public static String RecvUsb() throws IOException{

		int timeout = 1000;

		while(timeout >= 0){

			if(dIn.available() > 0){

				return dIn.readLine();

			}

			timeout--;

		}

		return "";

	}



	public static String RecvUsbWait() throws IOException{

		return dIn.readLine();

	}



	public static int MakeClientSocket(int time, String address, int port) throws IOException{

		int sock = -1;

		if(time >= 10){

			return -1;

		}

		SendUsb("SC*" + port + "*" + address);

		String data = RecvUsbWait().trim();

		if(data.startsWith("SCD*")){

			sock =  Integer.parseInt(data.substring(4));

		} else {

			return MakeClientSocket(time++,address,port);

		}



		return sock;

	}



	public static int MakeHostSocket(int time,int port) throws IOException{

		int sock = -1;

		if(time >= 10){

			return -1;

		}

		SendUsb("CC*" + port);

		String data = RecvUsbWait().trim();

		if(data.startsWith("CCD*")){

			sock =  Integer.parseInt(data.substring(4));

		} else {

			return MakeHostSocket(time++,port);

		}

		return sock;

	}



	public static int CloseSocket(int time,int port) throws IOException{

		int sock = -1;

		if(time >= 10){

			return -1;

		}

		SendUsb("CS*" + port);

		String data = RecvUsbWait().trim();

		if(data.startsWith("CSD*")){

			sock =  Integer.parseInt(data.substring(4));

		} else {

			return CloseSocket(time++,port);

		}

		return sock;

	}



	public static String RecvData(int sock, int maxlen) throws IOException{

		int slen = 0;

		String buf = "";

		SendUsb("RD*" + sock + "*" + maxlen);

		String tempbuf = RecvUsbWait().trim();

		if(tempbuf.startsWith("RDD*")){

			slen = Integer.parseInt(tempbuf.substring(4));

			while(slen > 5){

				tempbuf = RecvUsbWait();

				buf = buf + tempbuf;

				slen -= tempbuf.length() + 2;

			}

		}

		return buf;

	}





	public static int SendData(int sock,String buf, int maxlen) throws IOException{

		int sendt = 0;

		SendUsb("SD*" + sock + "*" +maxlen + "*" + buf);

		String tempbuf = RecvUsbWait();

		if(tempbuf.startsWith("SDD*")){

			sendt = Integer.parseInt(tempbuf.substring(4));

		}

		return sendt;

	}



	public static String GetIP() throws IOException {

		String reip = "0.0.0.0";

		SendUsb("PI");

		String data = RecvUsbWait().trim();

		if(data.startsWith("PID*")){

			reip = data.substring(4);

		}

		return reip;

	}



	public static Boolean GetOnline(int time) throws IOException {

		SendUsb("WP");

		String data = RecvUsbWait().trim();

		if(time >= 10){

			return false;

		}

		if(data.startsWith("WPD*")){

			if(data.substring(4).matches("1")){

				return true;

			} else {

				return false;

			}

		} else {

			return GetOnline(time++);

		}

	}





	private static void WaitForUsbServer() throws IOException {

		SendUsb("EC*ECHO");

		RecvUsbWait();

	}



	private static String GetWebPage(String address, int port, String data) throws IOException{

		int sock = MakeClientSocket(0,address,port);

		SendData(sock,data,data.length());

		String webpage = "";

		String buffer = "";

		Boolean more = true;



		while(more){

			buffer = RecvData(sock,1024);

			if(buffer.length() > 0){

				webpage += buffer;



			} else {

				more = false;

			}

		}



		CloseSocket(0,sock);

		return webpage;

	}



	private static int AcceptClient(int sock) throws IOException{

		int ac = -1;

		SendUsb("CA*"+sock);

		String c = RecvUsb();

		if(c.startsWith("CAD*")){

			ac = Integer.parseInt(c.substring(4));

		}

		return ac;

	}



	private static void MakeServerHost(int port) throws IOException{

		int socket = MakeHostSocket(0,port);

		int client = AcceptClient(socket);

		String data = "";

		while(true){

			data = RecvData(socket,512);

			System.out.print(data);

			SendData(socket,data,data.length());

		}

	}



}
And a pipetool :

Code: Select all

#!/usr/bin/perl -00
use File::Temp;$f=File::Temp->new;print{$f}<>;system qw{firefox -remote},"openURL(file://$f, new-tab)" 
And then start UsbServer on the psp, start usbhostfs on the pc, open firefox and write this in the terminal:

Code: Select all

java UsbServerPC http://www.wololo.net | ./pipe.pl
before you must build the "mod":
javac UsbServerPC.java
for me it works ;)
www.wololo.net works, but not many others :lol:
[spoiler]Image[/spoiler]

Post Reply

Return to “Submissions”