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

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.

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?

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...

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.