GithubHelp home page GithubHelp logo

skreweverything / swift-keylogger Goto Github PK

View Code? Open in Web Editor NEW
1.1K 1.1K 108.0 30 KB

Keylogger for mac written in Swift using HID

License: MIT License

Swift 100.00%
apple hack hacking hacking-tool keylogger keystrokes mac mac-osx macos swift swift-3 swift4

swift-keylogger's People

Contributors

monkeywithacupcake avatar skreweverything avatar ziyaddin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

swift-keylogger's Issues

Can't open HID!

Hi,

First of all thanks for the code, you are helping a lot a developers here.
I am using macos Catalina (10.15.4) and i am facing an issue i.e "Can't open HID!". I am running it on my imac with keypad and trackpad.

Please help me to resolve this.
Thanks in Advance.

Key's not getting logged when using Karabiner on mac

Hi, thank you so much for making this!
I learned a lot by going through your code!

I was able to get it to compile after upgrading to Swift 4 and Xcode 9.0 beta.

I use Karabiner-Element to remap the keys on my keyboard.

When Karabiner is turned on, the Keylogger is writing logs to Data/Apps and Data/Devices but nothing in Data/Keys.

Here is the the output of Data/Devices

cat Data/Devices/19-8-2017/Time\ Stamps
Connected - Saturday, August 19, 2017 at 7:46:18 PM Japan Standard Time	<IOHIDDevice 0x7ff675601220 [0x7fffe4f0bda0] 'ClassName=AppleHSSPIHIDDriver'  Transport=SPI VendorID=1452 ProductID=627 Product=Apple Internal Keyboard / Trackpad PrimaryUsagePage=1 PrimaryUsage=6 ReportInterval=8000>
Connected - Saturday, August 19, 2017 at 7:46:18 PM Japan Standard Time	<IOHIDDevice 0x7ff6756009d0 [0x7fffe4f0bda0] 'ClassName=org_pqrs_driver_Karabiner_VirtualHIDDevice_VirtualHIDKeyboard_v040600'  VendorID=0 ProductID=0 Manufacturer=pqrs.org Product=Karabiner VirtualHIDKeyboard PrimaryUsagePage=1 PrimaryUsage=6 ReportInterval=8000>

I will try to debug this on my own time as soon as possible. If you have any idea on top of your head about where the problem may lie, any advice would be greatly appreciated!

Thanks again for this amazing program!

Compress and delete the old logs automatically

On long run, the files get accumulated and the directory size becomes very large.

So can you add the functionality of compressing the old files and deleting the very old files automatically?

Like compress the files which are 2 days old and delete the files which are 15 days old.

Is it possible?

Convert > To Current Swift Syntax

I get the following error when I try and build your project:

“Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.

I assume it is Swift 4 only.

Is there a way to log the passwords?

I have read the README.md about EnableSecureEventInput. But is there any way to log the passwords? I really need that.

Please Help me🙏🏻

Possibility to temporary enable/disable password log?

Hi,

Would it be possible to add the functionality to temporary enable/disable (self-disable) password log after certain given time?.

I have been having a look at your code but my Swift level is not the best.

Thanks.

Key Repeats

Long pressed keys get logged only once (even though they might be getting typed multiple times if key repeat is enabled).

Is it possible to get the exact count in the logs?

It might not be a big change because for special keys (shift, ctrl, option) I think we have something similar to the keyPress and keyRelease callbacks?

I made a UI interface for "Keylogger", but it didn't work ...

@SkrewEverything
First of all, thanks a lot for your great project.

I want to control the keyboard listening events with a switch Button. So I made a UI interface wrap it (use Xcode). I copy your codes into my project and create a view controller. Then I add a action for a checkbox Button :

 @IBAction func buttonFieldChecked(_ sender: NSButton) {
        let state = sender.state
        if state == .on {
            _ = Keylogger()  // if checked, listen the keyboard pressing
        } else {
            //...
        }
    }

But when I run and checked button, the UI application hanging and the mouse pointer loading forever.

I guess the reason in "Keylogger.swift":

       /* Scheduling the loop */
        scheduleHIDLoop()
       
        /* Running in Loop */
        RunLoop.current.run()

But I don't know how to fix it. Could you give me some advice? Thank you very much! : )

Azerty Version ?

Hello I just would like to ask if its possible to add an AZERTY version of this keylogger ? And why not detect automaticatly the language and choose between AZERTY and QWERTY keyboard ? Thank you

Keyboard events are going to have cut off after several hours.

I have tested this program, it runs well as expected for a while.
But after several hours, suddenly events regarding keyboard had cut off.
Other events are still going well.

I am using macOS 10.12.6 on MacBook Pro (13-inch, Late 2016, Four Thunderbolt 3 Ports)

Does anyone haven't experienced similar issues?

Incorrect app detected when using multiple screens

Context: I use an external monitor

What: The data directory was logging the keypresses in an incorrect file (i.e. under an incorrect Application).

Reason/ Additional Context: The keypresses were being logged to the active window on the first/primary screen but I was typing in the application active in the external/secondary screen.

CPM counter

would be neat if this could be used to track your typing skills:

  • cpm counter for a-z, 0-9 and symbols separately
  • wpm counter based on spacebar
  • accuracy based on backspace use

Donation?

I just want to say thank you for this great project which helped me a lot in my project. I submitted my project for a contest and I won the contest and got some money.

I just want to donate the money to you for creating such great project.

So, how can I donate to you?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.