![]() |
|
[.NET] Sending Alerts to clients - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] Sending Alerts to clients (/showthread.php?tid=5264287) |
Sending Alerts to clients - ОЯВІТ - May 9, 2016 Hello I am currently trying to create a tool that will send an alert to all other computers running my client. I know this is very vague but I don't really know you to explain it. I will appreciate any help What it looks like [img]http://pics.keepthis.online/data/ecqdnvq0.q5s.png[/img] * - Slavoj Žižek - May 9, 2016 running what client? your rat? start with sockets, the clients would have to connect to your server then your server could send a message out * - ОЯВІТ - May 9, 2016 (May 9, 2016 01:02 PM)Blezzedd Wrote: running what client? your rat? It's literally going to be a small program with a button that says poke and when you click it all other people online running that small program receive an alert. I'll start looking into sockets. Thanks * - Malum™ - May 9, 2016 You're going to love this thread. It's exactly what you need. Code showthread.php?tid=2962380Sorry I can't give you the direct link. I can't post links yet. :( * - ОЯВІТ - May 9, 2016 (May 9, 2016 01:06 PM)Malem Wrote: You're going to love this thread. It's exactly what you need. So does that mean I need a program running on my server? It is running linux and I am coding this in VB.net * - Malum™ - May 9, 2016 (May 9, 2016 01:11 PM)ОЯВІТ Wrote: So does that mean I need a program running on my server? It is running linux and I am coding this in VB.net Yes, it most definitely means you have to have a server running that all your clients will be connecting to. * - 6e756c6c - May 9, 2016 If all you want to do is send a simple notification your best bet is to have the client(s) poll a webpage and check if it's contents have changed, if so, raise a notification. Writing a TCP server for this is going to be a lot of work and they can be difficult to maintain / keep online. * - taktaktak - May 9, 2016 (May 9, 2016 05:07 PM)Aeonhack Wrote: If all you want to do is send a simple notification your best bet is to have the client(s) poll a webpage and check if it's contents have changed, if so, raise a notification. Writing a TCP server for this is going to be a lot of work and they can be difficult to maintain / keep online. I second what Aeon said, just post a random string to a webpage/txt and have the client save to file or in memory the string it received, then wait for it to change again, signifying the host want's to poke everyone. * - OmegaCode - May 9, 2016 What aeon said, you can create a simple PHP api and use downloadstring to get the contents of the page. If page is blank, no alert. If page contains data, an alert is popped * - ОЯВІТ - May 10, 2016 (May 9, 2016 05:07 PM)Aeonhack Wrote: If all you want to do is send a simple notification your best bet is to have the client(s) poll a webpage and check if it's contents have changed, if so, raise a notification. Writing a TCP server for this is going to be a lot of work and they can be difficult to maintain / keep online. Thank you for the idea. How would I go around changing the content on the page? I need every client to be able to poke every client (May 9, 2016 05:07 PM)Aeonhack Wrote: If all you want to do is send a simple notification your best bet is to have the client(s) poll a webpage and check if it's contents have changed, if so, raise a notification. Writing a TCP server for this is going to be a lot of work and they can be difficult to maintain / keep online. I currently have this which works and writes to it However I would like to know how I would be able to clear the text file? Code Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.ClickDo I need to use multi-threading for this as I need it both to check the state of the text file(check for poke) and also be able to accept the button click (initiate a poke) * - Ant_Dec - May 18, 2016 This might help you in the right direction same idea just different concept. showthread.php?tid=5264061 * - +Haze - May 18, 2016 Just make a HTML post form with a button you click called poke or whatever. When you click the button, it will save create a hash of the current time which is saved to a .txt file. When you run your application, it should first get a hash value to compare, then have it keep checking the URI periodically, and if the hashes changes then show an alert then save the most recent hash value to compare to the next. Pretty simple if you ask me. * - Nick (Name) - May 19, 2016 I've done this type of project before! Basically I setup a webpage with info I wanted displayed in the notification message. First off I started the project off with a nulled string stored in the settings, and had a loop setup to compare the stored string to a downloaded string from my page, if the string and the web string did not match it would display the contents of the web string to the user via notification. Once the message is displayed it would store the web string into the settings string, then continue on with the loop. * - ОЯВІТ - May 19, 2016 (May 19, 2016 12:50 PM)Nick (Name) Wrote: I've done this type of project before! Basically I setup a webpage with info I wanted displayed in the notification message. First off I started the project off with a nulled string stored in the settings, and had a loop setup to compare the stored string to a downloaded string from my page, if the string and the web string did not match it would display the contents of the web string to the user via notification. Once the message is displayed it would store the web string into the settings string, then continue on with the loop. Would I use a timer to check the string? I currently am using thread.sleep and the app is unresponsive while I do this * - Annabelle Lee - May 19, 2016 (May 19, 2016 01:00 PM)ОЯВІТ Wrote: Would I use a timer to check the string? You should probably use separate threads for this. One handling input, and one scanning periodically for the pokes. |