Forum Discussion

Develop4d's avatar
Develop4d
Active Contributor
4 days ago

How to Identify the User Who Turns Off Hamachi?

I need to know if there is a way to identify which user is turning off my Hamachi. I tried checking the h2-engine.log, but there is no information about who did it.

Can I change something to obtain the user who sent the "go_offline, keep_tunnels 0, login_on_relaunch 0" command? I really need this because one person on my server is turning off Hamachi, causing all clients to disconnect.

  • I created a Python script that checks if my Hamachi network adapter is on or off. When it detects that Hamachi has been turned off, it uses PyAutoGUI to search for the button and click it to turn Hamachi back on immediately.

    This solves the issue of having to manually reactivate Hamachi each time it’s turned off.

    To identify which user turned it off, I set up the script to check the folder C:/Users whenever it detects that Hamachi is off. For each user, it goes to C:\Users\username\AppData\Local\LogMeIn Hamachi\h2-ui.log. This file is a log of Hamachi's interface, and when someone turns off Hamachi using the button, a line like this appears in their log:

    10/31 19:19:22.841 ipc: sending disconnect

    The script scans all users' logs and checks if any of them contain this line with the date matching when Hamachi was turned off, and if it finds this line, it tells me who turned it off.

  • GlennD's avatar
    GlennD
    GoTo Manager

    Hi Develop4d,

     

    I am not sure if this is possible, but I am researching the options. 

    • Develop4d's avatar
      Develop4d
      Active Contributor

      After a lot of research, I found a way. Thanks for trying. The method I used is quite convoluted, but if it helps someone and there are no issues with Hamachi, I can share how I did it. Please let me know if I can share this information.