Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3

Author Topic: PEW PEW! Bay12 Outage Checking program!  (Read 2610 times)

Taritus

  • Bay Watcher
    • View Profile
PEW PEW! Bay12 Outage Checking program!
« on: January 28, 2009, 08:43:28 pm »

Spoiler (click to show/hide)
Copy that into a new notepad window and when you go to save it, click the drop down menu and choose "All Files" and save that as outages.bat.  Run it, and allow it to run for a few days.  Hopefully (I think it'll work) it'll record whenever you cannot connect to Bay12 automatically in a .txt named outages.txt.  Post results whenever you get them, that way we can figure out when the problem occurs.

EDIT:  Fixed a minor bug.
« Last Edit: January 29, 2009, 09:14:33 am by Taritus »
Logged



woose1

  • Bay Watcher
  • Yay for bandwagons!
    • View Profile
Re: PEW PEW! Bay12 Outage Checking program!
« Reply #1 on: January 28, 2009, 08:50:32 pm »

EEK! Its a malwar!

To the fort gentlemen!
To eat kittens and mushrooms and rocks we go....
Logged

Taritus

  • Bay Watcher
    • View Profile
Re: PEW PEW! Bay12 Outage Checking program!
« Reply #2 on: January 28, 2009, 08:52:01 pm »

What?  I suggest tuning down your Anti Virus.  It is so definitely NOT malware.
Logged



Fossaman

  • Bay Watcher
    • View Profile
Re: PEW PEW! Bay12 Outage Checking program!
« Reply #3 on: January 28, 2009, 10:57:47 pm »

Besides, if he could write a virus that small, he deserves to enslave your computer. Very interesting.
Logged
Quote from: ThreeToe
This story had a slide down a chute. Everybody likes chutes.

Taritus

  • Bay Watcher
    • View Profile
Re: PEW PEW! Bay12 Outage Checking program!
« Reply #4 on: January 29, 2009, 12:28:29 am »

Hell, I'll even walk you through what it does.  First it turns the echo function off unless it's forced to use it, mainly because I don't feel like inducing seizures.  Next it prints some lines telling you what the program does.  Then we move into the main loop. We begin by pinging, or sending a small TCP/IP packet to the address 1.1.1.1, which is an invalid IP address.  After 1800 seconds, or thirty minutes, the program 'ping' (which is already preinstalled on all windows machines) gives up waiting to receive a return packet because 1.1.1.1 in an invalid IP address.  Now we can move into the beef of the operation: where I destroy your computer. pinging bay12games.com.  We ping bay12games with as small of a packet as is possible, to reduce any possible strain on the server.  If this ping times out, or fails to receive a return packet within an allotted time, ping will set the variable %errorlevel% to 1, otherwise %errorlevel% will be zero.  The next bit, an if statement, checks what %errorlevel% is, and if it's 1, it reports the time, storing it into outages.txt, and displaying it on screen, probably accompanied by a whine about how outages.txt doesn't exist, even though it does.  Then we return to the beginning of the loop and wait for the process to repeat.

With checking only every half hour, there is a relatively good chance that someone will miss a downtime event, but, hopefully, I can get enough people to run this we won't miss them.

tl;dr: It's not a virus.
Logged



Mulch Diggums

  • Bay Watcher
  • "Hey urist! I think that cat is having a seizure!"
    • View Profile
Re: PEW PEW! Bay12 Outage Checking program!
« Reply #5 on: January 29, 2009, 12:38:08 am »

Logged
ooooo! Swamp wiskey! Yeah!!

Janus

  • Bay Watcher
  • huffi muffi guffi
    • View Profile
    • Dwarf Fortress File Depot
Re: PEW PEW! Bay12 Outage Checking program!
« Reply #6 on: January 29, 2009, 03:48:34 am »

After 1800 seconds
Actually, it's 1800 milliseconds, or 1.8 seconds. So... 1.8 seconds wait, plus ~1 second inherent delay in a single ping attempt, times 4 (the number of times ping tries by default)... the total delay is about 11-12 seconds in your command.
A bit too often, no?
Logged
Tomas asked Dolgan, "What place is this?"
The dwarf puffed on his pipe. "It is a glory hole, laddie. When my people mined this area, we fashioned many such areas."
     - Raymond E. Feist, Magician: Apprentice  (Riftwar Saga)

Tormy

  • Bay Watcher
  • I shall not pass?
    • View Profile
Re: PEW PEW! Bay12 Outage Checking program!
« Reply #7 on: January 29, 2009, 08:36:45 am »

EEK! Its a malwar!

To the fort gentlemen!
To eat kittens and mushrooms and rocks we go....

*Shrugs*...sometime people shouldn't try to be funny.  ;D
Logged

Taritus

  • Bay Watcher
    • View Profile
Re: PEW PEW! Bay12 Outage Checking program!
« Reply #8 on: January 29, 2009, 09:13:04 am »

After 1800 seconds
Actually, it's 1800 milliseconds, or 1.8 seconds. So... 1.8 seconds wait, plus ~1 second inherent delay in a single ping attempt, times 4 (the number of times ping tries by default)... the total delay is about 11-12 seconds in your command.
A bit too often, no?

Oh, hell.  So it is.  Though it's actually far shorter than 11-12 seconds because I'm only pinging with one packet.
« Last Edit: January 29, 2009, 09:15:56 am by Taritus »
Logged



DarkSim

  • Bay Watcher
    • View Profile
Re: PEW PEW! Bay12 Outage Checking program!
« Reply #9 on: January 29, 2009, 09:29:38 am »

You need to add far more delay to the app. At present it just keeps pinging b12 every few seconds. The current incarnation would work well as a DOS tool tbh.
Logged

G-Flex

  • Bay Watcher
    • View Profile
Re: PEW PEW! Bay12 Outage Checking program!
« Reply #10 on: January 29, 2009, 10:16:51 am »

Wait, so this is intended to run all the time?

Why would anyone want to run a constant process that continuously pings an invalid address, just to check every so often that a website is up?
Logged
There are 2 types of people in the world: Those who understand hexadecimal, and those who don't.
Visit the #Bay12Games IRC channel on NewNet
== Human Renovation: My Deus Ex mod/fan patch (v1.30, updated 5/31/2012) ==

Yanlin

  • Bay Watcher
  • Legendary comedian.
    • View Profile
Re: PEW PEW! Bay12 Outage Checking program!
« Reply #11 on: January 29, 2009, 10:24:14 am »

Wait, so this is intended to run all the time?

Why would anyone want to run a constant process that continuously pings an invalid address, just to check every so often that a website is up?

To see if the valid site is up.
Logged
WE NEED A SLOGAN!

G-Flex

  • Bay Watcher
    • View Profile
Re: PEW PEW! Bay12 Outage Checking program!
« Reply #12 on: January 29, 2009, 10:31:30 am »

Yeah, I know, but running a program on your system constantly just to see if one site is up seems kind of odd, especially when it's done in some weird hackish way that times itself by sending ping requests to an invalid IP address.

Unless this is intended for use on some official site, to automate the check, but in that case 1) how do other people get this information?, and 2) it could probably be done in a slightly better way.

If it's to be used just by random guys who want to know if the site is up, it would be a hell of a lot better to just, I don't know, check manually, say using a batchfile to ping the site.
Logged
There are 2 types of people in the world: Those who understand hexadecimal, and those who don't.
Visit the #Bay12Games IRC channel on NewNet
== Human Renovation: My Deus Ex mod/fan patch (v1.30, updated 5/31/2012) ==

Mel_Vixen

  • Bay Watcher
  • Hobby: accidently thread derailment
    • View Profile
Re: PEW PEW! Bay12 Outage Checking program!
« Reply #13 on: January 29, 2009, 10:37:06 am »

Also there was an batch/command/cmd command for waiting an certan time iirc.
Logged
[sarcasm] You know what? I love grammar Nazis! They give me that warm and fuzzy feeling. I am so ashamed of my bad english and that my first language is German. [/sarcasm]

Proud to be a Furry.

PTTG??

  • Bay Watcher
  • Kringrus! Babak crulurg tingra!
    • View Profile
    • http://www.nowherepublishing.com
Re: PEW PEW! Bay12 Outage Checking program!
« Reply #14 on: January 29, 2009, 01:04:42 pm »

Fine, If I don't post in the next 10 minutes, it's a trap.

Ok, no CPU melties over here.
« Last Edit: January 29, 2009, 01:07:28 pm by PTTG?? »
Logged
A thousand million pool balls made from precious metals, covered in beef stock.
Pages: [1] 2 3