- 0
C++ Send Keypress/Code to a child process
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Posts
-
By Aditya Tiwari · Posted
Microsoft had to shut down 70+ GitHub repos after getting hacked, brings back some by Aditya Tiwari The self-replicating malware campaign known as Miasma took the open-source world by storm. It was reported that almost 73 Microsoft GitHub repositories were infected by the worm and had to be temporarily shut down to determine how attackers compromised projects and stuffed password-stealing malware in the code. These GitHub repos span across different organizations, including Microsoft Azure, Azure-Samples, Microsoft, and MicrosoftDocs. The malware enabled attackers to steal passwords and credentials when compromised tools were opened in popular AI coding apps, including Claude Code, Gemini CLI, VS Code, and Cursor. The security firm Cloudsmith, malware analysis site OpenSourceMalware, and 404 Media were among the first to report the hack. For background, Miasma is a variant of the Mini Shai-Hulud worm, open-sourced by the threat group TeamPCP. It started its journey by compromising a Red Hat employee's GitHub account to attack the @redhat-cloud-services npm namespace. Earlier this month, Microsoft Threat Intelligence reported that the Miasma attackers published 32 malicious packages across more than 90 versions under the @redhat-cloud-services npm scope to steal cloud credentials. The worm didn't take long to start attacking source repos directly rather than package registries. It is known to skip the npm registry entirely for several targets and plant malicious code straight into public repos like "icflorescu/mantine-datatable." The delivery approach was designed to weaponize AI coding tools. Miasma's malicious payload embedded into projects can trigger automatic code execution when the infected repo is opened in an AI coding tool or IDE. The list of affected projects includes "durabletask", a Python package compromised by TeamPCP a month earlier to deliver an information stealer designed for Linux systems. That said, Microsoft has begun restoring some repos affected by the malware campaign, The Hacker News reports. A company spokesperson stated the following: Microsoft will continue to investigate the attack. It has notified a small number of customers who may have removed their content from the affected repos. The company will reach out to customers again through established support channels "if anything further is identified that requires customer action." -
By RejZoR · Posted
Why is Opera doing this notification at all? They have their own extension store. They don't have to obey anything dictated by Google. Others like Brave and Vivaldi that rely on Chrome's extension store, not so much. Firefox is entirely separate as well with its own extensions store. I honestly don't understand why entire world is just insisting on Chrome. Like, why? It's a stupid fat browser with barely any functionality. But sure, it's installed on everything by default. I don't understand how people even use web that's filled with tracking garbage and ads all over the place. -
-
-
By rseiler · Posted
Just for anyone reading, AdGuard (the free, standalone MV3 extension) is quite good now, a direct competitor to uBlock Origin Lite and much more built-out than it.
-
-
Recent Achievements
-
rubentuben8 earned a badge
Week One Done
-
ARaclen earned a badge
Week One Done
-
jojodbn earned a badge
One Year In
-
jojodbn earned a badge
One Month Later
-
jojodbn earned a badge
Week One Done
-
-
Popular Contributors
-
Tell a friend
Question
firey
Background/Description:
I have recently gotten a raspberry pi, and have decide to not use a Desktop Environment. I have QT, and other development packages installed, however without QT-Embedded, I can't use the virtual windowing tools that QT Comes with. I wanted to create a media center style PC without the fancy additions of XBMC and other media centers. As I don't have a DE/Window system I can't run anything with a gui. I wanted to make a system that would allow me to run/play movies on the pi from any of my devices (Phone, Tablet, Desktop). So I have decided to make a GUI/Server on my computer that would control the PI via TCP. I would use PHP for a web system that would create trigger files that a FileSystemWatcher would pick up for the mobile devices, and will use a direct C# gui on the desktop.
I can do this with no problem as it is done with a standard TCP Connection. I will send commands such as: ~MSFS; to Mount the Shared file system (if not done), ~PV;FileName to Play the Video using omxplayer. All of this is pretty easy and as I will drive everything from the desktop it isn't a lot of pi side stuff to do. Now the problem is.. by forking the process I lose the direct input into the program, and as I will be running it externally instead of on the device I don't get the direct CLI input. As it is all command line, I pause videos by pressing "p". I am sure there are other commands I just haven't looked into them.
The Need:
As I will be controlling it from the PC Server I want to have the ability to send commands such as ~PAUSE; or equivelant, from the desktop to the pi, and have it send the 'p' key to the omxplayer. I have read about using pipes to communicate between parent a child processes, however as I am not taking input via command line for this it would be done all internally during the TCP Packet processing, I don't know how to get that stream. In C# it would just be a memorystream or stock stream that I could just save off and call good. I am not sure if I can do that with the pipe. Now, pausing is just an example, however having the ability to pause a video is a good thing, and would really be a requirement in making it useful.
TLDR;
I am making a client/server program for my Raspberry PI, that will run a child process. I need to send a specific key to the child process when a specific packet is sent. ie) Server Sends ~PAUSE, Client Processes and sends the "p" key to the child process, which then should pause the video (as that's how it works when I run the program directly, hitting p will pause it). How do I do it?
Link to comment
https://www.neowin.net/forum/topic/1123316-c-send-keypresscode-to-a-child-process/Share on other sites
2 answers to this question
Recommended Posts