0416: "Zealous Autoconfig"

This forum is for the individual discussion thread that goes with each new comic.

Moderators: Moderators General, Prelates, Magistrates

takeda
Posts: 3
Joined: Tue Apr 29, 2008 4:17 am UTC

Re: "Zealous Autoconfig" Discussion

Postby takeda » Tue Apr 29, 2008 4:23 am UTC

rwald wrote:Actually, my thoughts went something like this: "If he just hit ctrl+c once, it would send SIGINT; that would give the autoconfig process time to exit cleanly, which would probably notify field agents to release the children. However, by sending it twice, he might have interrupted that cleanup process and prevented the 'release children' command from being sent."
Incidentally, I'm not sure how this relates to possibly sending SIGKILL; I know that, for example, rsync will clean up nicely if sent SIGTERM but will leave temporary files when sent SIGKILL. I don't know if sending it SIGINT quickly in rapid succession does anything interesting, though.


Ctrl-C always send SIGTERM no matter how many times you press it. Also when the signal is handled generally the OS will release the handler, until you set it back again. This is to protect against program going crazy when it receives a signal while processing another one. Though, if you really want it you can make your program go crazy.

takeda
Posts: 3
Joined: Tue Apr 29, 2008 4:17 am UTC

Re: "Zealous Autoconfig" Discussion

Postby takeda » Tue Apr 29, 2008 4:39 am UTC

Ondore wrote:And to think, I thought I was secure for using WPA. Never thought about brute force attacks.
Though it helps I have no children. What does the program do then?


No kids? Kidnaps your wife/girlfriend.
No wife/gf? Kidnaps your parents.
No parents? Sends an agent to your house to reset the password in your router :)

User avatar
R.K.
Posts: 32
Joined: Mon Apr 21, 2008 8:49 pm UTC
Location: Pitcairn

Re: "Zealous Autoconfig" Discussion

Postby R.K. » Tue Apr 29, 2008 4:48 am UTC

takeda wrote:Ctrl-C always send SIGTERM [SIGINT] no matter how many times you press it. Also when the signal is handled generally the OS will release the handler, until you set it back again. This is to protect against program going crazy when it receives a signal while processing another one. Though, if you really want it you can make your program go crazy.


Some programs will keep track of how many SIGINTs they receive, however. After a certain number, they might just give up on quitting gracefully, and explode instead. They could also simply ignore SIGINT, for the user's own good.
[citation needed]

takeda
Posts: 3
Joined: Tue Apr 29, 2008 4:17 am UTC

Re: "Zealous Autoconfig" Discussion

Postby takeda » Tue Apr 29, 2008 5:19 am UTC

R.K. wrote:Some programs will keep track of how many SIGINTs they receive, however. After a certain number, they might just give up on quitting gracefully, and explode instead. They could also simply ignore SIGINT, for the user's own good.


Ooops. Yeah I meant SIGINT :)))
Are there really programs who check the number of SIGINT called? The closest thing to that I got while I was running a program in scripting language (portupgrade for fbsd), which was starting other programs. So first Ctrl+C terminated the running program, and next ctrl+c was sent to the script. Both of them exit gracefuly, the second ctrl+c actually makes a difference, because after pressing just once, the portupgrade would just continue upgrading the next port skipping the current one.

Instead handling ctrl+c and counting the occurrences, isn't better to make it return gracefuly, and instead NOT handling the SIGQUIT (CTRL-\). I think it is actually better. Not only it terminates the program, but also makes it dump core which might be useful for debugging.

User avatar
Æshættr
Posts: 149
Joined: Mon Jul 30, 2007 4:47 am UTC

Re: "Zealous Autoconfig" Discussion

Postby Æshættr » Tue Apr 29, 2008 5:47 am UTC

I'm just waiting for this to kick in on this one.

User avatar
Southwest
Posts: 84
Joined: Mon Sep 10, 2007 6:01 am UTC

Re: "Zealous Autoconfig" Discussion

Postby Southwest » Tue Apr 29, 2008 6:28 am UTC

It took me a couple of readings, but then I laughed out loud in a way I haven't for a couple of weeks of xkcd.

Well done, Mr. Munroe. Well done, indeed.

User avatar
phlip
Restorer of Worlds
Posts: 7573
Joined: Sat Sep 23, 2006 3:56 am UTC
Location: Australia
Contact:

Re: "Zealous Autoconfig" Discussion

Postby phlip » Tue Apr 29, 2008 6:52 am UTC

takeda wrote:Are there really programs who check the number of SIGINT called?

VLC will try to quit cleanly on the first ^C, but on the second ^C it'll just try to quit, regardless of how clean it is. Generally (for me, at least), if it's gotten to the point where I'm trying to kill it with two ^C's, even that doesn't work, and it hangs somewhere... and a third ^C does the usual SIGINT stuff and the process is killed.

Code: Select all

enum ಠ_ಠ {°□°╰=1, °Д°╰, ಠ益ಠ╰};
void ┻━┻︵​╰(ಠ_ಠ ⚠) {exit((int)⚠);}
[he/him/his]

User avatar
Linux0s
Posts: 247
Joined: Sat Dec 29, 2007 7:34 pm UTC

Re: "Zealous Autoconfig" Discussion

Postby Linux0s » Tue Apr 29, 2008 9:04 am UTC

phoenixineohp wrote:I just get the clear impression that if the character was wearing a black hat the last panel would have him sitting with his arms crossed, impressed at this new discovery.


No doubt. But BHM would more likely be one who would code such a patch in the first place.
If the male mind truly were a machine it would consist of a shaft and a bushing.

User avatar
crazdgamer
Posts: 21
Joined: Fri Sep 28, 2007 12:10 pm UTC

Re: "Zealous Autoconfig" Discussion

Postby crazdgamer » Tue Apr 29, 2008 1:18 pm UTC

phoenixineohp wrote:I just get the clear impression that if the character was wearing a black hat the last panel would have him sitting with his arms crossed, impressed at this new discovery.
Or he'd be getting annoyed that the program isn't going as fast as he'd like.

I'd imagine, if it were up to Black-Hat guy, the program would have already brute-forced the admin password on the router and restricted access to allow only his MAC address on the network.

Random832
Posts: 2525
Joined: Wed Oct 10, 2007 4:38 pm UTC

Re: "Zealous Autoconfig" Discussion

Postby Random832 » Tue Apr 29, 2008 2:31 pm UTC

takeda wrote:Are there really programs who check the number of SIGINT called? The closest thing to that I got while I was running a program in scripting language (portupgrade for fbsd), which was starting other programs. So first Ctrl+C terminated the running program, and next ctrl+c was sent to the script. Both of them exit gracefuly, the second ctrl+c actually makes a difference, because after pressing just once, the portupgrade would just continue upgrading the next port skipping the current one.

Instead handling ctrl+c and counting the occurrences, isn't better to make it return gracefuly, and instead NOT handling the SIGQUIT (CTRL-\). I think it is actually better. Not only it terminates the program, but also makes it dump core which might be useful for debugging.


IIRC, mplayer will give up on quitting gracefully after five.

The problem with ctrl-\ is that it's more obscure.

Mikeski
Posts: 1113
Joined: Sun Jan 13, 2008 7:24 am UTC
Location: Minnesota, USA

Re: "Zealous Autoconfig" Discussion

Postby Mikeski » Tue Apr 29, 2008 5:55 pm UTC

Random832 wrote:
takeda wrote:Are there really programs who check the number of SIGINT called?


IIRC, mplayer will give up on quitting gracefully after five.


The EDA software I use at work counts CTRL-C's, and echos some text back to STDERR and/or STDOUT when you do it. Quotes are approximate:

CTRL-C.
"Interrupting current process."
CTRL-C.
"Yes, I heard you the first time. It takes a while to gracefully recover a database that occupied 40GB of memory."
CTRL-C.
"Do that again, and I quit."
CTRL-C.
"/home/mikeski> _"

Kalos
Posts: 172
Joined: Thu Jan 31, 2008 6:45 pm UTC

Re: "Zealous Autoconfig" Discussion

Postby Kalos » Tue Apr 29, 2008 6:06 pm UTC

phoenixineohp wrote:I just get the clear impression that if the character was wearing a black hat the last panel would have him sitting with his arms crossed, impressed at this new discovery.

Funny, I got the impression that Black Hat Guy gets all his gadgetry and frequent travel in by being one of the field agents..

latrine
Posts: 2
Joined: Tue Apr 29, 2008 6:45 pm UTC

Re: "Zealous Autoconfig" Discussion

Postby latrine » Tue Apr 29, 2008 7:14 pm UTC

phlip wrote:
takeda wrote:Are there really programs who check the number of SIGINT called?

VLC will try to quit cleanly on the first ^C, but on the second ^C it'll just try to quit, regardless of how clean it is. Generally (for me, at least), if it's gotten to the point where I'm trying to kill it with two ^C's, even that doesn't work, and it hangs somewhere... and a third ^C does the usual SIGINT stuff and the process is killed.


A program can install its own signal handler for SIGINT, so the program can do whatever it wants when it receives that signal and not just terminate. But depending on the implementation, a signal handler can have a "mouse trap" behavior. Meaning that when the handler receives a signal the trap goes off. If another signal arrives and the handler hasn't been reset then the default action for that signal is taken. That might be what's happening with VLC, although I kind of doubt it since it implies an old implementation.

As a side note, since SIGINT doesn't necessarily take the default action, SIGKILL is guaranteed to kill the process.

User avatar
Some_Random_Guy
Posts: 54
Joined: Tue Apr 29, 2008 2:29 pm UTC

Re: "Zealous Autoconfig" discussion

Postby Some_Random_Guy » Wed Apr 30, 2008 1:18 am UTC

I wonder, would the Lenhart's relinquish their precious WEP key? They can always have more children...
I don't like Haikus
I think that they're all stupid
Is this ironic?

mattflaschen
Posts: 25
Joined: Sat Dec 09, 2006 12:24 pm UTC
Contact:

Re: "Zealous Autoconfig" Discussion

Postby mattflaschen » Wed Apr 30, 2008 5:32 am UTC

thebestsophist wrote:If he's hitting ctrl-c during negotiations, do the field agents just hold onto the children indefinitely, or would the autoconfig send abort orders?


See, this is why you have to write good interrupt-handling code.

mattflaschen
Posts: 25
Joined: Sat Dec 09, 2006 12:24 pm UTC
Contact:

Re: "Zealous Autoconfig" discussion

Postby mattflaschen » Wed Apr 30, 2008 5:34 am UTC

Socal Swimmer wrote:But it would be quite expensive to maintain field agents, wouldn't it?


Not if they were self-sufficient robots. Besides, it'd be easier that way; if a 7' robot tells you to get in the car, you get in the car.

User avatar
Celtic Minstrel
Posts: 46
Joined: Fri Apr 11, 2008 2:44 pm UTC
Location: Sitting on a cloud

Re: "Zealous Autoconfig" Discussion

Postby Celtic Minstrel » Wed Apr 30, 2008 2:52 pm UTC

Kni7es wrote:I'm not sure what I need more now, a WiFi decryptor or open-source field agents. I wonder if I copied the program and used it on multiple computers if it would then create a small army of field agents... I could take over.... CANADA!
No, not Canada. Mexico.

Some_Random_Guy wrote:I wonder, would the Lenhart's relinquish their precious WEP key? They can always have more children...
:shock: No, they can't! Not the same children, anyway! :x


Xbehave
Posts: 54
Joined: Wed Jan 09, 2008 4:45 am UTC

Re: "Zealous Autoconfig" Discussion

Postby Xbehave » Wed Apr 30, 2008 7:58 pm UTC

takeda wrote:No parents? Sends an agent to your house to reset the password in your router :)


Hey could somebody try this at my parents house, i set a stupidly hard WPA+admin password on the basis that if i ever forgot it then i just unplug and reset, my router has no reset button, MWHAHAHAHA!

Interestingly i found this today http://www.aircrack-ng.org/doku.php?id=wesside-ng
GENERATION 20: The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.

User avatar
OmegaLord
LXIX
Posts: 281
Joined: Sat Sep 01, 2007 10:33 pm UTC
Contact:

Re: "Zealous Autoconfig" Discussion

Postby OmegaLord » Thu May 01, 2008 1:20 am UTC

I thought he was being a horrible person and copying the code rather than quitting the process.
So what do you guys know about *glances down at sheet* the kingdoms of orgasms
but I just don't see why someone would tape themselves together.
Bear Police wrote:I got Ready to Die today. Took me too long. Great record.

User avatar
'; DROP DATABASE;--
Posts: 3284
Joined: Thu Nov 22, 2007 9:38 am UTC
Location: Midwest Alberta, where it's STILL snowy
Contact:

Re: "Zealous Autoconfig" Discussion

Postby '; DROP DATABASE;-- » Sat May 03, 2008 2:40 pm UTC

e946 wrote:
Steroid wrote:And this is why I leave my home network open.

Well, this and the fact that I'm a forward-thinking type who believes that anyone driving by (despite the fact that I live in a semi-gated community) ought to have internet access.

Well, that and that fact that if I get a new WiFi device, I'm lazy and want it to connect ASAP without a password.


Except for when someone gets on your connection and promptly sstarts downloading all sorts of illegal things, then leaves, leaving you stuck with the blame.
Which gives you deniability when confronted with access logs. "Nope, someone must have hacked into my wireless and downloaded that. I never put a password on it cuz it wouldn't work with so-and-so when I did. Who would download that kind of thing anyway, that's disgusting!"
poxic wrote:You suck. And simultaneously rock. I think you've invented a new state of being.

User avatar
phlip
Restorer of Worlds
Posts: 7573
Joined: Sat Sep 23, 2006 3:56 am UTC
Location: Australia
Contact:

Re: "Zealous Autoconfig" Discussion

Postby phlip » Sun May 04, 2008 2:23 am UTC

'; DROP DATABASE;-- wrote:Which gives you deniability when confronted with access logs. "Nope, someone must have hacked into my wireless and downloaded that. I never put a password on it cuz it wouldn't work with so-and-so when I did. Who would download that kind of thing anyway, that's disgusting!"

Except that most ISP's TOS say that anyone who connects through your Internet connection is your responsibility... regardless of whether you knew about them or not. If you have an open WiFi point, and someone uses it for something dodgy, the ISP can and will blame you for it.

Code: Select all

enum ಠ_ಠ {°□°╰=1, °Д°╰, ಠ益ಠ╰};
void ┻━┻︵​╰(ಠ_ಠ ⚠) {exit((int)⚠);}
[he/him/his]

User avatar
'; DROP DATABASE;--
Posts: 3284
Joined: Thu Nov 22, 2007 9:38 am UTC
Location: Midwest Alberta, where it's STILL snowy
Contact:

Re: "Zealous Autoconfig" Discussion

Postby '; DROP DATABASE;-- » Sun May 04, 2008 3:05 am UTC

Does that extend up to the law itself, though, or is it just a common ISP policy?
poxic wrote:You suck. And simultaneously rock. I think you've invented a new state of being.

mbrigdan
False Alarm! There's more rum.
Posts: 109
Joined: Wed Jun 25, 2008 2:45 am UTC

Re: "Zealous Autoconfig" Discussion

Postby mbrigdan » Wed Jun 25, 2008 2:55 am UTC

Me and a friend of mine actually thought this through quite throughly. I mean, _really_ throughly. Blackwater would handle the field agents, paid on a per use basis. They could come in on an apache, so that there wouldn't really be arguing (When a gun in a gunship tells you to give him your wifi password, i bet that most of you would give it to him). It would try to brute-force from 5mins or so, then keep trying as the field agents are called in. Looking back at this post, it sorta distrubes me how much me and my friend thought out.

Offtopic: Yay! This is my first post ever on xkcd!
Spoiler:
TheNgaiGuy wrote:god is playing a huge trick on us and wants us to use our brains to come to the logical conclusion, even though wrong, that he doesn't exist and will send all atheists to heaven for exercising said gifts and send all theists to hell for having faith.

Bratmon
Posts: 24
Joined: Sun Aug 30, 2009 7:54 pm UTC

Re: "Zealous Autoconfig" Discussion

Postby Bratmon » Sat Jan 16, 2010 2:42 am UTC

I was bored today:
Spoiler:

Code: Select all

#!/bin/bash

echo "Starting wifi autoconfig."
sleep .3
echo "For help type \"man wificonf\"."
sleep .3
echo "Searching for wifi"
sleep 1
echo "No open networks found."
sleep 1
echo "Found secure net"
sleep .3
echo "SSID \"Lenhart Family\""
sleep .3
echo "Trying common passwords..."
sleep 3
echo "Failed"
sleep .3
echo "Checking for WEP Vulnerabilities"
sleep 2
echo "None found."
sleep .3
echo "Connecting to Bluetooth phone"
sleep 2
echo "Calling local school"
sleep 4
echo "Found Lenhart children."
sleep .3
echo "Notifying field agents."
sleep 5
echo "Children acquired."
sleep .3
echo "Calling Lenhart parents."
sleep 3
echo "Negotiating for WiFi password"
sleep 500


Return to “Individual XKCD Comic Threads”

Who is online

Users browsing this forum: hetas and 85 guests