• 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

    • ...if there is any question if it's fake ... Steve Gibson created a little program to detect fraudulent drives.   https://www.grc.com/validrive.htm
    • Hello   Would anyone know by chance regarding the Lian Li Lancool 216 ARGB/Fan hub specifically where the front fans would connect to, to be able to see there RPM in UEFI bios when setting up the fan curves,   i am not a hardware expert, mostly a noob on Hardware still,  trying to learn as much as i can, but its a slow process. Did get Dust clean out done on system, and Temps are much much better,  even during a Defender scan previously i'd hit 85C or higher at times, today despite RL temp being humid and warmer today a bit,  didn't hardly go over 60C.     So i definitely cleaned system good this time!! Did the clean out after early afternoon storms ended!! **Note did not build system myself, had Ibuypower Build my Dream Ryzen Build, normally i don't mention that part as sometimes i feel ashamed that i can't build a whole system myself**  Even my last system before this one had Local PC shop build that one, it ran ok, but even after getting the upgraded cooler installed they said this should work,    still throttled when doing tasks.     My AMD Never Throttles!! I also tend to worry alot, just my nature i guess  
    • Did you just buy this drive? Were you ever able to use the full capacity, or you bought this new/only shows 3 GB? If this is new, then you probably got a fake.
    • Steam overlay's FPS counter gets major upgrade to show CPU and VRAM usage, temps, and more by Pulasthi Ariyasinghe Valve has been steadily revamping its Steam client for years now, with major updates hitting the PC store and platform targeting various parts. The next target has been revealed to be the very popular performance monitor that's a part of the Steam overlay. While the current version only shows a number in a small area to count the current frame rate of the game that's running, the update is giving much more information to the user. Now available via the Steam Beta client, the performance monitor now has multiple detail levels to choose from. These are FPS Single Value (the original version), FPS Detail & Graph, FPS Detail CPU & GPU Utilization, as well as the behemoth FPS Detail & Graph, CPU, GPU, & RAM Details options. As expected, each option adds more and more information to what's shown to the user on the overlay. Screen position, contrast and saturation, as well as background opacity, can also be adjusted from the same overlay settings page. The image above shows the maximum detail option available for users, with everything from generated frames to helpful graphs and VRAM information being shown while playing a game. "The performance monitor can help you understand your frame rate (both including frame generation, and base game frame rate), and it can help you see if CPU utilization might be your bottleneck, or if your GPU is," says Valve regarding its latest upgrade. "You can see if you are out of system or video memory and if those factors are impacting performance as well." Valve said that some of these features, in this initial beta release, will only be available on Windows machines, at least for now. "Much of it will apply to other supported operating systems and while some metrics are not supported on other operating systems additional support is planned for later," added the company. Check out this handy FAQ set up by Valve that explains what each setting means as well as notes on what issues players can diagnose, like micro stutter or bottlenecks, using these overlay additions. To try out the new feature before it goes out to everyone, you can switch to the Steam Beta Client by heading to the app's Settings > Interface section and changing the Client Beta Participation dropdown to the latest version available. Following that, to enable the new performance monitor, go to Settings > In Game section, and change the detail level to the level you would like.
    • I actually didn't like the classic Start Menu as much as the XP, Vista, 7 style menu. Mainly didn't like how you either had to click Programs every time, when that is what you would want 95% of the time, or fill up that top section (I forget what it was called back then) which was both harder than it should have been and looked ugly.
  • Recent Achievements

    • First Post
      TIGOSS earned a badge
      First Post
    • Week One Done
      slackerzz earned a badge
      Week One Done
    • Week One Done
      vivetool earned a badge
      Week One Done
    • Reacting Well
      pnajbar earned a badge
      Reacting Well
    • Week One Done
      TBithoney earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      675
    2. 2
      ATLien_0
      284
    3. 3
      Michael Scrip
      219
    4. 4
      +FloatingFatMan
      196
    5. 5
      Steven P.
      133
  • Tell a friend

    Love Neowin? Tell a friend!