Swift-Keylogger | Keylogger for mac written in Swift using HID
kandi X-RAY | Swift-Keylogger Summary
kandi X-RAY | Swift-Keylogger Summary
Keylogger for mac written in Swift using HID
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Swift-Keylogger
Swift-Keylogger Key Features
Swift-Keylogger Examples and Code Snippets
Community Discussions
Trending Discussions on Swift-Keylogger
QUESTION
I've been using Swift-Keylogger as a command-line program.
I thought of making a UI for it as I have started mac development recently.
As it is a command-line program, the author used RunLoop.current.run()
in-order to run the keylogger continuously.
Now the problem is I can't use RunLoop.current.run()
because it blocks the UI.
I have looked into GCD
and it only runs a piece of code. But I want to run it continuously. I saw some additional articles about running continuously but I found running code continuously after every 'n' specified time by using Timer
.
So, how can I replace the RunLoop.current.run()
which has same behaviour without blocking UI?
ANSWER
Answered 2018-Jul-05 at 13:32UPDATE: 05/07/2018
To start and stop the keylogger from the UI, check this issue from GitHub
UPDATE: 18/01/2018
Some guy approached me with same requirement as yours. After some discussion and trial and error method, he found a solution.
1) Just comment out the RunLoop.main.run()
line in the keylogger code.
2) Now disable the app sandbox. If you want to enable the app sandbox, then add this entitlement com.apple.security.device.usb = YES
.
Original: 18/03/2017
I also searched for it a lot in the beginning when I'm writing my keylogger. After a day I gave up.
I use Process
in swift to run the keylogger from my UI.
The way I do is:
Do the necessary modifications in keylogger source like the path of files/folders.
Compile the keylogger source.
Drag the keylogger to your project in your Xcode and check copy if needed
.
The executable is in resources folder inside your .app
.
Run the executable using Process
class and launch()
to start the executable/ your keylogger.
You should terminate the created process, otherwise the keylogger will be running in the background. To stop the keylogger, use terminate()
on Process
variable.
Code:
QUESTION
I'm doing my project and I need to log keystrokes system wide in macOS. So, I turned over to GitHub and found Swift-Keylogger. The only problem is I can't quit the Terminal while the program is still running.
Is there any way to not to run this in terminal or closing the terminal window instead of creating a mac app like here.
Note: There are some mac app style executables in github but they are not providing the output I want and some need additional permissions.
...ANSWER
Answered 2017-Feb-05 at 20:15Instead of running the executable like ./Keylogger
use nohup ./Keylogger &
.
You can quit the Terminal after executing the command.
To kill the Keylogger, run ps -e | grep "Keylogger"
to get pid and kill -9 pid
.
P.S. I thought of adding it as well as running at startup but I'm too lazy to update the repository.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Swift-Keylogger
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page