954,525 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Socket Module Possiblities?

Recently I have been learning about the socket module and how you can create networking applications using it.

I was curious if it would be possible using the socket module to either:

Set the port as a USB port to trick the computer into thinking a USB is plugged in and 'fake' incoming data from the port allowing you to manipulate data and relay it through the usb port.

or, Set the port as a USB port and relay the information from the usb, directly to the application and then manipulate it and then send it to the computer. So having the application as an interrupt of the data allowing manipulation to occur before it gets sent to the computer as normal.

I was unsure if this would be achievable with the socket module. If it is not would someone be able to point me towards the required module / knowledge that would be needed to pull something like this off.

Thanks

Python_nooby
Newbie Poster
4 posts since Feb 2011
Reputation Points: 10
Solved Threads: 0
 

I don't think I understand what you want to do.

If you just want to talk to a usb device theres pyusb.

http://sourceforge.net/apps/mediawiki/pyusb/index.php?title=Main_Page

Enders_Game
Newbie Poster
23 posts since Mar 2010
Reputation Points: 23
Solved Threads: 6
 

I'll give that a go. I was kind of going for an application that uses the socket module to trick the computer into thinking it is a USB device (or use it to create a virtual usb) which I can process data through and the computer will accept the data as if it was coming directly from a USB.

I will check out the pyUSB module and I will report back any findings.

Python_nooby
Newbie Poster
4 posts since Feb 2011
Reputation Points: 10
Solved Threads: 0
 

Sorry for the double post. To clarify a little.

I was looking to create an application to spoof a USB barcode reader or card scanner. I wanted to create an application that pretended to be a usb device and tricked the pc into thinking it was a USB barcode / card reader. I would then feed the application some data which the PC would receive and believe it was the information from the barcode or card reader. Would this be possible with the socket module? or is this something completely different?

Python_nooby
Newbie Poster
4 posts since Feb 2011
Reputation Points: 10
Solved Threads: 0
 

Sorry for the double post. To clarify a little.

I was looking to create an application to spoof a USB barcode reader or card scanner. I wanted to create an application that pretended to be a usb device and tricked the pc into thinking it was a USB barcode / card reader. I would then feed the application some data which the PC would receive and believe it was the information from the barcode or card reader. Would this be possible with the socket module? or is this something completely different?


I think it has little to do with the socket module, or even with python. You should look for usb device emulators, if it exists. If such emulators can be written in any language, they can probably be written in python. Google is your friend...

Gribouillis
Posting Maven
Moderator
2,786 posts since Jul 2008
Reputation Points: 1,044
Solved Threads: 691
 

sockets got nothing to do with isb. look into pyserials ok?

richieking
Master Poster
764 posts since Jun 2009
Reputation Points: 61
Solved Threads: 152
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: