Skip to content

Commit

Permalink
v0.0.0.24
Browse files Browse the repository at this point in the history
  • Loading branch information
INeddHelp committed Mar 25, 2023
1 parent 01ef89e commit a262ee6
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
Empty file added .scripts/NUL
Empty file.
26 changes: 26 additions & 0 deletions .scripts/ShutNet.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#include <iostream>
#include <cstdlib>
#include <string>

using namespace std;

int main()
{
string ipAddress;
string command;

for (int i = 1; i <= 254; i++) {
ipAddress = "192.168.1." + to_string(i);
cout << "Scanning " << ipAddress << endl;
command = "ping -c 1 " + ipAddress;

if (system(command.c_str()) == 0) {
cout << "Shutting down " << ipAddress << endl;
command = "shutdown /s /t 0 /m \\\\" + ipAddress;
system(command.c_str());
}
}

return 0;
}

Binary file added .scripts/ShutNet.exe
Binary file not shown.
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"files.associations": {
"string": "cpp"
}
}

0 comments on commit a262ee6

Please sign in to comment.