To put you all in the perspective, I have a Raspberry Pi 4, I want to use it as a (python socket) server and on the client side, I will use my Computer.
The problem is when I try to execute a program using AF_BLUETOOTH on windows (10) , it always says that there is no thing called AF_BLUETOOTH.
I also searched many forums and I saw that AF_BLUETOOTH is not supported by windows 10's python (3.8).
I am asking for confirmation of this information because I wasted a lot of my time trying to make it work...
s = socket.socket(socket.AF_BLUETOOTH,socket.SOCK_RAW,socket.BTPROTO_RFCOMM)
This is my work after reading the documentation, I couldn't find any good tutorial on the internet about this topic.
Thank you.
Related
I got a assignment to implement this api and I don't know where to start and I've looked with no clear results.
The closest thing I've found is using ssh to access Linux system and running commands which give me the details about the system from there. I could run a python code to run commands on local host using subprocess library. Then saw somewhere I can't run ssh using a api.
I was hoping someone could tell me where to start or how to go about this.
Thank you.
try to use a backdoor ( I would recommand using python because it's easy) with a client listening ( on your computer), to retreive information about system, do some (relatively real-time ) monitoring ( cmd typing automated !) ....., (infos processing can be done in the client side ).
here is a close example of a (keylooger backdoor ) : https://github.com/JAMAIKA-MHD/Simple-Key-Logger-with-Backdoor
I am sending data via pickle and socket as found here: Socket Programming in Python using Pickle. I am running 2 scripts with different environments and they are communicating with each other. I plan to have this not connected to the network. i.e. no wifi. As I understand it, since they are connected on the same pc, they should still work right or do I need wifi?
P.S. I am not asking for any code, it is done, working, all I am asking is that would something like this work without internet connection.
Yes, you can absolutely use Unix domain sockets or even local servers on the same computer and it should work without a connection to the broader internet.
I'm using PyZMQ for IPC (over TCP) on Windows 10, as part of an automated updater. I have noticed that on some computers, a firewall prompt appears to select if it can use public or private internet, despite the fact that it makes no connections to the internet - only to localhost.
This PyInstaller-packaged script is launched by a user-land script.
So:
Script launches my PyInstaller-packaged script->
Script uses pyzmq strictly to connect to localhost->
Windows prompts how it should be allowed through firewall
This prompt doesn't stop the program, but I don't want users to see that and wonder what virus they might have.
This is the code that supposedly triggers it:
sckt = self.zmq_context.socket(zmq.REQ)
sckt.connect('tcp://localhost:%s' % updater_shared_port)
Is there anything I can do to stop that pop-up from Windows Firewall?
Thanks!
Yes, there is something:
may implement the connection by some other than tcp:// transport class.
ZeroMQ can help you build your ideas via smart transports{ ipc:// | inproc:// | vmci:// } given you need not assemble/disassemble the full-height-L3-ISO-OSI stack to reach a counterparty, hosted on the same localhost.
The firewall could be configured to allow your programmes to run unhindered. That might be a nuissance to do by hand. There's probably a way to have an installer configure the firewall appropriately, but that'll be a ton of work to set up.
On the off-chance that it's the binding end that's the causing the pop up (not the connecting end as you suggest), apparently one can bind a zmq socket to a particular interface. This is done with a connection string such as zmq_bind(socket, "tcp://127.0.0.1:5555"); This will clamp the socket to the loopback, which may well not trouble the firewall at all. zmq_bind(socket, "tcp://*:5555) will open a socket on all interfaces, including any Internet facing interfaces, which should certainly grab the attention of the firewall. If you've not already tried that, might be worth a quick go.
I have for the first time installed the OpenCV module for python3, and i am trying to find the best way to use OpenCV with a connected MCU (Microcontroller Unit) such as Arduino, or to control I/O of a Raspberry Pi 3..
In the past:
I have written a python GUI with tkinter and programmed the MCU to be controlled via serial communication. The MCU receives a string of data that is being written to the port. When I click a button in my python GUI, it then executes the programmed functions.
I have then also turned the host computer into a web server, and have written a front end using HTML/CSS/JavaScript, more specifically using AJAX, which then makes a call to a PHP back end script that in turn executes a python script(could use bash script), which is sending commands to a MCU.
(Yes it's secure. And mildly confusing to most people.)
In saying that, I have had some time to have a play around with some examples of OpenCV, but it has been quite difficult finding documentation that is clear and gives me an idea of how to use the module within robotics/mechatronics and industrial automation projects. All the uses I have seen have been mentioned using Arduino and processing.
So my question after explaining this is, how do I start using OpenCV object/face recognition and have it send commands serially?
Is Arduino processing the only option or can this be achieved with just the python modules and the code embedded on the MCU?
Thank you in advance to anyone who may be able to give me some guidance.
I am currently making a chat server and clientusing python, I have come across an issue with select as it doesn not work on Windows but does on Linux, I wish to know if it is possible to run the server on my Linux machine and rceate a client that will work on windows that would still be able to communicate with it as most of theople that I wish to talk to using this use windows.
check out how its done using tornado chat example, clients are browsers.