• 0

Detect Wake-On-Lan packet in VB.Net?


Question

Well, I got a computer working with Wake-on-Lan, and the remote boot is awesome.

However, I would love to be able to remotely shut it down as well, and I was wondering if it was possible to detect a "Magic Packet" and shutdown when it is detected.

I searched around, and only found ONE program that was designed to sniff WOL packets, but it only shows the data, doesn't do anything with it.

I tried using the inbuilt shutdown command, but I always get Access Denied and I'm not sure how to proceed in that way.(If you know how, let me know, this is just as good)

Any help?

(I specified VB.Net, because I code in VB.Net and would like to be able to modify code, or add to it, etc..

Link to comment
https://www.neowin.net/forum/topic/864106-detect-wake-on-lan-packet-in-vbnet/
Share on other sites

10 answers to this question

Recommended Posts

  • 0

So you would rather write a some vb code vs troubleshoot a simple access denied error??

Does the account your trying to use have the right to do so -- guess not if access denied huh ;)

What OSes are you using, and what accounts? In secpol local policy user rights.. You will see that even though users have the right to locally shutdown the machine, the force remote shutdown right is limited to administrators.

So if the account your using is not in the administrators group -- then yeah your going to get access denied.

  • 0

The machine I want to remotely shut down is on Windows XP Professional

The machine I want to shut down FROM is Windows 7 Ult.

I wouldn't know how to grant an account access.

I own both of these machines, so there's only one account on each of them, both of them Administrator.

I've tried many things, even making an admin user account on the Windows XP machine identical to one from my Windows 7 machine.

I'm clueless as to what else to do.

A nice tut in that area would be nice, I can't find a decent one.

  • 0

"I own both of these machines, so there's only one account on each of them, both of them Administrator."

And does this admin account have a password? Is the name actually called administrator? Do the passwords match on each machine??

By default any account in administrators group has permission to force shutdown remotely -- you need need to auth to the machine with that account first, if you do not already have a connection with an account in that machines administrators group

So here is my test xp machine running in virtualbox -- it has user called budman, with a password of Password1. From my win7 machine - I send the correct command, and just like magic it shuts down ;)

As you can see the first time I send it -- access denied.

I then auth to the machine, the IPC$ connection is fine for this sort of thing - or you could just access a share.

I then send the command again - and it shuts down.

post-14624-1263249394_thumb.jpg

Do you have file sharing working to the xp machine? Are you using Simple file sharing? If so you would have to give guest the ability to remotely shutdown..

  • 0
  BudMan said:
"I own both of these machines, so there's only one account on each of them, both of them Administrator."

And does this admin account have a password? Is the name actually called administrator? Do the passwords match on each machine??

By default any account in administrators group has permission to force shutdown remotely -- you need need to auth to the machine with that account first, if you do not already have a connection with an account in that machines administrators group

So here is my test xp machine running in virtualbox -- it has user called budman, with a password of Password1. From my win7 machine - I send the correct command, and just like magic it shuts down ;)

As you can see the first time I send it -- access denied.

I then auth to the machine, the IPC$ connection is fine for this sort of thing - or you could just access a share.

I then send the command again - and it shuts down.

post-14624-1263249394_thumb.jpg

Do you have file sharing working to the xp machine? Are you using Simple file sharing? If so you would have to give guest the ability to remotely shutdown..

Thanks for that! Unfortunately, I had already figured out how to, and gave guests the ability to remotely shut down. Thanks for the help guys

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • OneDrive search is currently broken for many users by Taras Buria If you are trying to find a certain file in your OneDrive storage, but the service just won't give you the stuff you need, you are likely experiencing an issue that Microsoft has just confirmed. The company updated the official OneDrive documentation with a list of known bugs to clarify that the service currently exhibits problems with the search functionality. According to Microsoft, the bug affects four platforms: Windows, iOS, Android, and Web (macOS users are spared). The company says that affected users see black search results, and the storage does not return files that certainly exist (do not blame Microsoft if OneDrive cannot find the file you accidentally deleted or renamed). Fortunately, files are intact—it is just the search that cannot find them and present them to you. Another good thing is that the issue does not appear to affect 100% of users. Microsoft says only "a subset of users" experience the bug. Neowin checked a bunch of systems with personal and work OneDrive accounts, and all of them found the requested files without any issues. Unfortunately, if you are affected, there is nothing you can do at this point. Microsoft made it clear that there are no workarounds. Therefore, you will have to manually scavenge your OneDrive folders (they can now be colored!) to search for the needed file. Microsoft added that it understands how disruptive this bug could be, and it is "working with urgency" to resolve the bug as quickly as possible. You can check out the list of known OneDrive bugs and their possible workarounds in the official support document. In other news about OneDrive frustration, Microsoft recently locked out a user who was attempting to move a bunch of important data from old hard drives to OneDrive. Eighteen attempts to resolve the issue led to nothing but automated replies from Microsoft. You can read more about that wild story here.
    • If anyone thinks bringing manufacturing back will result in a bazillion jobs should heed this information. They will be plants full of robots with human supervisors. It’s the only way the products have a chance to be affordable.
    • You can’t sell BS unless you have autonomy as a sales gimmick. They don’t have the technology, I’ve been in several Tesla Swasticars, they are not safe and self driving barely works - their implementation is incredibly dangerous and still very error prone. They are selling this as a feature to assure safety, the reality is they know their technology isn’t safe and have humans there when it’s not fully able to do what you want it to. If they hired drivers and didn’t have any self driving they are then basically competing with uber and they don’t have the numbers of cars to compete so they sell fake self driving with humans and hope they fix their problems in the meantime. Felon skum has always been a snake oil salesman and people fall for it.
    • Exactly, this defeats the point entirely.
  • Recent Achievements

    • Week One Done
      BlakeBringer earned a badge
      Week One Done
    • Week One Done
      Helen Shafer earned a badge
      Week One Done
    • First Post
      emptyother earned a badge
      First Post
    • Week One Done
      Crunchy6 earned a badge
      Week One Done
    • One Month Later
      KynanSEIT earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      670
    2. 2
      ATLien_0
      271
    3. 3
      Michael Scrip
      229
    4. 4
      Steven P.
      166
    5. 5
      +FloatingFatMan
      161
  • Tell a friend

    Love Neowin? Tell a friend!