Hacker News new | past | comments | ask | show | jobs | submit login
Killbutmakeitlooklikeanaccident.sh (gist.github.com)
386 points by app4soft on July 17, 2022 | hide | past | favorite | 165 comments



Haha, I don't know how folks found this, but I actually did make it for a real-world use case. While doing large-scale builds of debian packages [1], occasionally I'd have parts of the build process hang (usually some test that I didn't care about). I didn't want the whole build to fail, so I needed some way to kill the process but have it return 0 so that make and friends wouldn't think anything was amiss.

Also, credit where credit is due -- the original idea was suggested to me by Kyle Huey: https://twitter.com/moyix/status/1484342467205816325

[1] https://moyix.blogspot.com/2022/02/on-building-30k-debian-pa...


> Haha, I don't know how folks found this

I found it yesterday on Ukrainian Linux users forum[0], and decided to re-post it on HN ;)

[0] https://linux.org.ua/index.php?topic=11868


This is using exit_group() (#231), not exit() (#60):

http://main.lv/notes/syscalls.md

https://man7.org/linux/man-pages/man2/exit_group.2.html

> Note: glibc provides no wrapper for exit_group(), necessitating the use of syscall(2).

Hmm, but elsewhere I find:

> In glibc up to version 2.3, the _exit() wrapper function invoked the kernel system call of the same name. Since glibc 2.3, the wrapper function invokes exit_group(2), in order to terminate all of the threads in a process.

https://www.man7.org/linux/man-pages/man2/_exit.2.html


May not be as portable, but "exit(1)" would probably make it seem more like an accident.


That would make it look like suicide and not an accident


Yeah, but was the suicide done to it?


Two shots to the back of the head.


Two shots to the back of the thread


And it managed to throw() itself out of the window.


HA, yes that's the real joke right there.


Suicided.


I see this like a cartoon black hole painted on the ground.


Wouldn't just "p exit(0)" do the same, just with gdb doing the heavy lifting?


not if the program is statically linked and stripped.


I'm sure there's a way to do syscalls like that from gdb as well


What's at 0x050f? Looks like they set the rip register to that value.


That's the syscall instruction (0f 05).

It's not jumping to that address, it's injecting the exit syscall right under the instruction pointer. If you wanted to modify the register, you'd do `set $rip = 0x050f` without the `{short}`


So would this not work if the program's code is mapped read-only?


Debuggers typically bypass normal memory permissions.


"typically" being important. Here's an example of where they can't: https://gist.github.com/josephcsible/c8ce72a6084634fe56928c4...


I'm kind of confuses as to what this is doing. I see that it just unmaps everything but the loop but what does this have to do with strace?


There's only one page of executable memory left in the whole process. It doesn't contain any syscall instructions, and it's a shared mapping of a read-only file. That means the debugger can't point the instruction pointer at any existing syscall instructions, and it also can't create any new ones.


Right, but why would the debugger need to do this?


Because on Linux, those are the only ways to make another process execute a syscall. (Note that the technique I'm using wouldn't work on Windows, since there, you could use VirtualAllocEx to allocate new pages in other processes.)


They're not changing the rip register at all. They're setting the contents of the memory location pointed to by the rip register to 0x050f. The equivalent of "set {x}y = z" in C would be "*(x *)y = z;".


Wouldn't this technically be a suicide? The process calls exit itself, after all.


The kind of suicide where you fall on a knife, several times...


Accidental discharge of gun is a frequent cause of death in the wild, wild united states of guns. Why not also falling out of window, tripping in kitchen with knife, or eating poorly cooked meat, comrade?


> Accidental discharge of gun is a frequent cause of death in the wild, wild united states of guns.

It actually ain't; it's only about 500 a year (out of about 200,000 total accidental deaths). To put that in perspective, falling and car accidents each account for about 40,000, and poisoning accounts for 80,000.


> It actually ain't; it's only about 500 a year (out of about 200,000 total accidental deaths).

Looks like more than 2300 accidental shootings in 2020 with 39000 roughly shootings in general. Of course with a positive trend line over the years prior, 2021 and 2022 should be even worse once the data comes out. If we compare this on a per capita basis with other developed nations, the US ranks number one in per capita gun deaths. 'USA USA USA. We're number one.' Oh wait, that's bad. 23X per capita deaths in the US more than Australia is bad. We can agree that more Americans died from other causes than guns, but does that make the gun deaths any less significant or more acceptable? I don't agree that we should accept this stat and reality as all well and good, especially as nearly every other developed country is doing better than us in regards to gun safety and gun deaths. Certainly more could be done to prevent gun casualties.

https://www.healthdata.org/acting-data/gun-violence-united-s...

https://www.gunviolencearchive.org/


> Looks like more than 2300 accidental shootings in 2020 with 39000 roughly shootings in general.

Sure, but that's shootings, not deaths. If you're going to broaden one end of the comparison, it's prudent to do the same for the other end.

> We can agree that more Americans died from other causes than guns, but does that make the gun deaths any less significant or more acceptable?

Well sure, zero is obviously ideal. My point, however, is that there are far bigger fish to fry - by, again, multiple orders of magnitude.


> Violence and suidice (with or without access to firearms) is a direct function of socioeconomic inequality.

You seem strangely allergic to gun control or gun safety. Other countries have simple, effective measures for gun safety and ownership which reduce shootings and gun deaths precipitously. Some of these measures can be implemented here with only slight modifications. Social inequality is not solved by more guns, nor should reducing social inequality by itself be considered a precondition for attempting to reduce gun deaths in the US.

> There are far bigger fish to fry - by, again, multiple orders of magnitude.

More than one social issue can addressed at a time. No person seriously says to the effect that we can't solve all of these murders until we've addressed affordable housing. Society can and does work on issues, plural, at once.


> You seem strangely allergic to gun control or gun safety

Because I consider self defense to be a basic and inalienable right, and consider any pretext for disarming the working class while said working class continues to face oppression to be unethical. Glad to hear that you trust police officers to even so much as not actively harm you (let alone actually protect you); if only everyone was so privileged.

> Other countries have simple, effective measures for gun safety and ownership which reduce shootings and gun deaths precipitously.

Other countries also have simple, effective (compared to the US) socioeconomic safety nets which reduce the motivation for all violence and suicides precipitously.

> Social inequality is not solved by more guns

Well it sure as hell ain't solved by leaving the working class even less able to defend itself against the very state driving social inequality.

> More than one social issue can addressed at a time

Indeed, and as I explained in the other comment thread you perused, by addressing socioeconomic inequality you address violence (including gun violence) for free - because, again, people don't kill themselves or each other for gits and shiggles.

That is:

> No person seriously says to the effect that we can't solve all of these murders until we've addressed affordable housing.

People who understand cause and effect absolutely do. Gun control is a distraction - a Band-Aid over a broken leg.


Nono, it calls `exit(0)` only once. :)

(I love the cell block tango)


Involuntary euthanasia


It had it coming


It only had itself to blame


If you'd have been there, if you'd have seen it, I bet ya you would have done the same


Involuntary assisted suicide, I suppose!


Maybe it should call \x0988 for advice first?


Call not connected, foiled again by hex…


To be honest I was expecting different kind of content.


Perhaps even more evil:

kill -SEGV $1


So we can use this to kill hanging process ? Or must wait till it's not hanging to kill it ?


If it's hanging in userspace, then this will work, but so will a regular "kill -9". If it's in uninterruptible sleep, then neither this nor a regular "kill -9" will work.


What is the purpose of this?


In theory you could maybe use this to kill some endpoint agent used for security monitoring in a way that, if someone were to go investigate the crash, maybe they wouldn't immediately think "oh shit, someone killed it".

Attackers do kill those agents, absolutely, but you'd have to be root to kill the agent with this method (and ideally any method), at which point endpoint instrumentation and forensic artifacts are unreliable anyway. Any logs that someone were looking at that said "attacker killed me" could just be deleted/ rewritten. The attacker could even rewrite them on the fly and ship them off the box so you're none the wiser :)


One use I can think of is killing a child process in such a way that the parent process considers it has successfully returned.

For example you have a "curl" command in a script that is waiting for a server that doesn't respond, killing the process with the kill command may cause the script to fail. If you want the script to continue anyway, you can use that trick.


A way to annoy developers. This and cron + sleep + rand could be fun.


You are evil. Wanna get a beer sometime?


I've had some different friends work with colleagues who literally do this. My friends typically left for various reasons, but it never seemed like the best way to "make you improve your code" to me.


I think it would be better to cause an exception or even a segfault for that


It’s a one liner to have gdb put “exit” as the next line in a program so it closes itself.

Not a security bug or anything. Just fun.


Fun!


epstein.sh


Has anybody claimed that his death, by hanging, was an accident?


Nobody officially.

But he did not keep at what he did for decades without plenty of dirt on plenty of big people. Once they were confident it would not come to light, he could be disposed of.


I think it’s implying that “the process didn’t kill itself”.


Would love to read an explanation of this.



Using gdb is like when you forget to take the silencer off your gun and claim self defense when the police comes.


A suppressor lowers the decibel level of a firearm by about 20-30 dB. It’s anything but silent and there’s nothing illegal, malicious, or unusual for wanting to not go deaf in the event you had to fire a weapon in self defense without a chance to wear ear protection.


This may be true for the US, but the whole argument falls apart as soon as you remember the world is wider. Eg in Europe are suppressors often allowed with a special permit only = which, in my country, basically means army use only.

There are plenty reasons why.

https://commons.wikimedia.org/wiki/File:Legality_of_firearm_...


Nunchaku are illegal in many countries as well. Which curiously also seems to be based on depictions in movies and not reality.


Which part of the gun laws are not based in reality?


Many firearm regulations, both inside and outside the US, are based on inaccurate perceptions of how things work (eg: suppressors), or things just looking scary.

Where I live, I can get a licence for a semiautomatic center fire rifle rather easily. So long as its not of a "military style".

So I can own a Mini-14, which fires 5.56/.223 rounds, etc, but not an AR-15 despite there being no functional difference between the two rifles. They both have the same standard magazine capacity, same round, etc.

The reason for this comes down to one being "military style" and the other looking more like a hunting rifle.


It would be somewhat reasonable to want to regulate suppressors if they worked like they did in movies. It's completely unreasonable to regulate suppressors given how they actually work.


Yep. There are plenty of videos on Youtube where you can hear how some actual suppressors sound. For example, this one: https://www.youtube.com/watch?v=EAwarGzJ9R8


What about ballistics / forensics side of things? Don’t they make it harder to identify bullets?


Aside from forensic ballistics being mostly junk science, if your suppressor is contacting the projectile in a way that deforms it... you're going to have much bigger problems.


In many European countries shooters are encouraged to use suppressors these days, to avoid pissing off people who live nearby (and to avoid deafness).

In the UK they are called "sound moderators" and are easy to get - you can even buy them for .22LR firearms over the counter if you say its for an air rifle.

In the US getting a suppressor requires a 200$ tax stamp, NFA registration, FBI background checks, fingerprints, and a huge wait for the ATF to process the paperwork.


>There are plenty of reasons why

And not a single one was provided, curious!

It does not make your weapon more lethal, it does not make your weapon cheaper, it does not increase the capacity of your weapon. Sounds like more copium to me.


It even makes many weapons less lethal as it is nearly useless with supersonic projectiles ('bang'), and using more adequate subsonic ones reduces the kinetic energy, and therefore expansion.


That's not quite accurate: talking supersonics, even if the sound isn't made hearing-safe or movie quiet, the tone goes from a sharp crack to a kind of thud. It's difficult to describe but this change in the quality of the sound makes it a lot harder to tell where a shot is coming from by ear alone.

Suppressors are also generally excellent at suppressing muzzle flash, moreso than flash hiders. Same idea as the tone thing.

They also reduce felt recoil impulse and muzzle climb, so controlling the weapon across a string of shots is easier.

A genuine downside is they make direct impingement platforms get really gunked up really quickly. Also, gas to the face via the charging handle. However, the advantages are so significant that basically nobody who has the option shoots unsuppressed. That includes most military forces; if cans suck why does everyone use them?

Re subsonics: that'd be true if you were simply underloading a designed-as-supersonic round, but a lot of the point of stuff like .300 blackout / .458 socom is to compensate for velocity loss with a fat heavy projectile.


Sorry bit I wrote "less lethal", not anything about telling from where the shot is coming, muzzle flash, recoil or anything in your answer full of correct statements (especially "nobody who has the option shoots unsuppressed"!).

Compensating (performance-wise) for velocity loss isn't easy, the "kinetic energy vs. momentum" isn't (AFAIK) settled, as every parameter (including projectile frangibility...) plays a role. My experience is limited, however when it comes to penetrating hard material with a metal-piercing round or to obtain a massive cavity (and shock) on a soft target with an frangible/expansive one, I will pick supersonic rather than subsonic-and-massive because there is too wide of a gap, just as (and for similar reasons) I will prefer a long gun to a handgun. A .300 Blackout (supersonic) develops (E0) ~1800J, while the subsonic version only develops ~700, this seems a "massive" difference to me, exhibiting the difficulty. "There is no replacement for (speed of) displacement."


Ah, sorry - I definitely assumed you were operating on a broader definition of lethality than you were and got defensive. I personally agree with the second paragraph as well.


The people in most countries on Earth like to know when a weapon is being fired near them.

Wear ear muffs if you are worried about your hearing.


You know suppressors don't work in real life the same way they do in movies, right? Gunshots with one are still really loud; they're just not loud enough to cause instant and permanent hearing damage anymore.


this is literally such a meme. it's not that hard to hear everybody still wear earpro when shooting suppressed. you will still hear it ffs. it's literally a safety device.


This is a statement of profound and frustrating ignorance. It's not physically possible even in the best case to use over-the-ear or in-ear protection (even doubled or tripled up) to reduce ~2kHz sound by more than 40dB or so, because that's how much reduction a human skull provides. No matter how blocked off your ears are sound will still be transmitted through flesh/bone. More realistically, even 30 dB of reduction is quite good. And a naked firearm can easily be 160-175 dB at the muzzle, and it's hard to overstate how VERY loud that is. A chainsaw is like 110 dB, and remember this is a log scale. Every 10 dB = 10x the energy (only about 3x the perceived "loudness", but it's energy that matters for cellular damage). Furthermore, firing inside (or next to any large hard surfaces that can reflect sound) can increase the total exposure.

A sibling post writes "Firing a gun with no hearing protection is a pretty jarring experience", but let's be clear: ANY exposure to sound over 140 dB or so mean instantaneous permanent hearing loss. Period. "Jarring" isn't quite the adjective. A single use doesn't mean you just go deaf or even "merely" get tinnitus, but it does mean you just burned some of your hearing forever. It doesn't heal and there isn't any treatment. For practice with regular usage even with ear protection it's quite possible to exceed NIOSH limits on sound exposure. Obviously lots of people just live with that, but hearing loss is serious. There is environmental damage and bystanders to consider as well. All of this of course ignores that for self defense at home someone might not have time to put on ear pro at all.

The only way to really make guns hearing safe is to double up on multiple physically different methods combining both hearing protection and sound reduction of the gun itself. A suppressor can take a gun down to the 130-150dB range, and then a further 20-30 dB of ear protection takes that to 100-130dB for the shooter. Subsonic ammunition can also be use, sacrificing performance to eliminate the supersonic crack and somewhat reduce sound too.

Suppressors should just be standard safety equipment. The Hollywood meme where you screw something onto a rifle and now it sounds like a can of compressed air is as real as people jumping through plate glass windows (actually made of sugar) and other such ridiculous physics. 130dB is still LOUD, you will absolutely here that from a distance. The original impetus in America for trying to make them a thing only for rich people was concerns about "poaching" by poor people and ties into a bunch of class warfare there. It's an obsolete consideration for a host of reasons at this point. The societal benefits of less hearing damage would be considerable, it's now known quite a number of significant issues like dementia can be influenced by hearing loss.


This is the first time I’ve ever heard that no amount of ear protection will help you from certain handheld weapons. Navy guns, yes (my dad was in the Navy and has many such stories) but every gun range I’ve been to and gun safety class has never once said that there’s a risk of hearing damage no matter how much ear protection you use.

Maybe it’s true! But if so, I am definitely surprised as heck, since I grew up around guns and gun safety. It was a big part of my upbringing. My gramps took me shooting underneath some bridge somewhere when I was like 11, and let me loose off a few rounds of a magnum. We just wore earplugs + earmuffs like usual. It felt like a hand cannon in the truest sense of the word, so it’s hard to imagine a louder handheld gun.

EDIT: Randomly searching for things like “is hearing protection always enough for guns?” doesn’t seem to bring up anything to support this, and all the links seem to say variations of “yes, hearing protection will always prevent hearing loss when shooting.” E.g. from ASHA: https://www.asha.org/public/hearing/recreational-firearm-noi...

> The good news is that people can prevent hearing loss by using appropriate hearing protective devices (HPDs), such as earmuffs or earplugs.

And ASHA’s credentials seem pretty impressive:

> The American Speech-Language-Hearing Association (ASHA) is the national professional, scientific, and credentialing association for 223,000 members and affiliates who are audiologists; speech-language pathologists; speech, language, and hearing scientists; audiology and speech-language pathology support personnel; and students.

So would you mind pointing me to anything that supports the idea that a suppressor is a necessary component to prevent hearing loss, and that hearing protection alone isn’t enough? I’d appreciate it, since it’s a chance to reshape my worldview. I’m always willing to suspend disbelief in the face of evidence.


I mean, it's just so weapon, environment and use specific, and also what exactly you're after. There are certainly guns that are fairly "quiet" (ie., 140-150 dB) unsuppressed, subtract 20-30 in earpro from that and that's not bad. If you go look for measurements of magnums and 30cal+ rifles and shotguns and such you'll have no issues finding 165+ levels too. Or if someone is using a short barrel, that's going to be louder then a long one (and compared to a few decades ago even short barreled rifles are now very popular though not something I use). Or are they shooting outdoors or indoors? How much? Someone going out and doing a few dozen rounds of slow deliberate fire a month to stay in practice with some hunting (just a handful of rounds per year) is facing a different combined exposure then someone doing a hundred+ per week. Our knowledge of hearing loss has also changed. People are just plain living longer as well.

Any ear protection is better then nothing and there is certainly more than one way to do it. But damage is cumulative, so it's worth considering what kind of exposure one is seeing. I think lots of people just accept it or don't even know, they "get used to it" which means they've lost high frequency hearing in particular but the ear protection is helping make sure they can still hear conversations and avoid tinnitus ok (or at least raise their odds). The law plus natural human impulse also perverts the situation, people want things they enjoy or think are important to also not have serious drawbacks, industry wants people to feel shooting is safe, and government (not just the law [0]) makes getting a suppressor a real pain in the butt. So there are plenty of incentives for motivated reasoning around the issue further mixing things up. If suppressors were just OTC safety devices I think we'd be looking at a different picture.

Ultimately though I think this is one of a number of medical issues that society overall is slowly waking up to right now (like plastic/"forever chemical" exposure) and will look back on with regret. Noise, not just from firearms but industry, equipment and just environmental exposure, has been under appreciated as a problem despite long standing concerns.

----

0: the NFA requires checks, prints/photo, and a $200 tax stamp, so that's in the law and does add some hurdle. But the law does not require the process take an indeterminate 3-12+ months to just do the same look over and over again that happens instantly elsewhere. That's due to poor agency funding and procedures, but is one of the big hurdles.

Although I should note too that there is also State law: in 8 states suppressors are simply flat out illegal even if the federal government approved. So many people simply have no legal option period.

----

Edit to your edit: It's worth doing the math for your own situation. Look at long standing NIOSH criteria for sound exposure limits by decibel, ie ( https://www.nonoise.org/hearing/criteria/criteria.htm ). Now go look at gun noise, ie., ( https://www.ammunitiontogo.com/lodge/silencer-guide-with-dec... ). Keep in mind of course that again, this will all vary significantly with gun, ammo, and environment. I'm NOT claiming that no usage of guns without a suppressor can be safe, again there are guns where 20-30 db less will be plenty particularly if used lightly outdoors. But that isn't every gun. Finally go look at anything on NRR (https://www.protectear.com/nrr-rating/) and maximum hearing protection. Keep in mind that factors like fit are crucial.

Then add it all up. If someone is firing a 165 dB gun while others are also firing 150-170 dB guns around them with non-custom fit hearing protection a doing a few hundred rounds once per week, what does that look like vs NIOSH limits? Play with the variables from there. And remember human imperfection. People forget earpro. Someone fires unexpectedly (safely downrange perhaps, hopefully not an ND, but still a surprise). Someone might wear earpro that doesn't fit that well.

So I personally will not shoot unsuppressed. It's just not worth it, the slightest hearing loss is going to cost vastly more money then a suppressor and stamp. It's some extra insurance as well in terms of earpro not doing quite as much as I expected. The long wait truly does suck and I can understand others just not wanting to deal with it, but I think it's an unfortunate state of affairs.

As far as artillery I think there what you might be misremembering is the level of instant hearing loss even with full earpro from even a single shot. If something is 180 dB then you need full head/suit protection or something else, earpro won't even get you below 140 dB at that point which means every shot = a bit more hearing loss.


I wanted to take a moment to say that I really appreciate this thoughtful and detailed comment.


Oh believe me, you'll hear it either way!


Not only that, there's adapters you can buy (or print..) that allow you to screw oil filters onto a pistol or AR. It might sound pretty stupid but it is actually relatively effective.


Pretty sure the ATF doesn't like people doing that


They require a stamp from the ATF, but are legal with it.


It's a red flag for further investigation as it is a tool often used by professionals. At least in movies. I stand by my humorous analogy!


Some states actually require silencers while hunting because of the sound disturbance.


A lot of people use silencers on their home defense guns. Firing a gun with no hearing protection is a pretty jarring experience, and a suppressor can help quite a bit with that.


Does it make the laser "piow" noise in real life too? Or that's just the cinema effect


The stuff that's mimicked in movies would probably be something like a silenced 22 short round or maybe a subsonic 22LR round. The primary noise of a gun is the bullet breaking the sound barrier, the secondary noise is the actual powder burning. You can absorb some of that with a suppressor but if you shoot a round that goes faster than the speed of sound, you'll still get an audible and identifiable 'crack'

A hand gun round will usually run you about 145-160db. There's a lot of variation here like barrel length, load, all of which influence speed which is also a factor. Take 30db off that with a suppressor and you're still looking at over 100db and maybe even over 120db which is the hearing loss range.

At best, a suppressor brings the sound from 'hearing loss' to 'quite loud' for normal rounds.

For a subsonic 22 round you're looking at something like 60-70db, take 20-30db off that and you get that sound that you hear in movies.


They are no where near as quiet as movies would have you believe. There are a lot of factors that come in to play as to how quiet they are, like if you're using sub-sonic ammo, the size of the supressor, barrel length, what the bullet hits, and more.

Sadly, I'm sure a lot of their regulation has to do with how they're portrayed in movies rather than reality.


No, it goes KABANG (instead of KABLAAAAAANG).

There are a ton of YouTube videos of people testing this, they’re usually a pretty fun watch.


Usually with no DB measurement. I couldn't find a single video of someone using silenced subsonic rounds with a decibel meter.


There’s a reason for that! Standard dB meters that most YouTubers have easy access to simply aren’t accurate enough for guns, even suppressed ones.


A cinema effect, which is why they’re usually called suppressors. It lowers the decibel level of the sound enough that you can fire without ear protection and not risk damage to your hearing.


Depends on the weapon and ammunition used. With subsonic ammunition silenced pistols can get pretty silent.

I think I remember some combination that did sound surprisingly similar to the movie effect, but I don't know which one.


Not sure why this is being downvoted - it's true.

You're not going to get a centerfire rifle to be "Hollywood quiet", no matter what you do. You can get a .22 rimfire rifle or pistol down to the level that it sounds like an airgun.

... but it sounds like an airgun because it has about the same energy as an airgun.


> Firing a gun with no hearing protection is a pretty jarring experience

That's perfect UX for the use case


If an intruder breaks into your home, (seemingly easily) overpowers you, and begins doing horrible things to your wife and wife's son, would you still have such a negative opinion about guns?


And the statistics on that are? Also if it's the police doing it, you're not allowed to defend yourself even if they don't announce/identify themselves.


> Also if it's the police doing it, you're not allowed to defend yourself even if they don't announce/identify themselves.

You are allowed, it's just that they are allowed to kill you if you do.


> You are allowed, it's just that they are allowed to kill you if you do.

To be fair, in practice, they are allowed to kill you if you don't, too, they are just more likely to avail themselves of being allowed to if you defend yourself.


I like how you all are talking about this, when the number of people killed by police each year is in the hundreds, while the number of people who are assaulted every year by random strangers is in the hundreds of thousands.


I find the concept of being killed by someone who was allowed to do that more offensive than the concept of being killed, much less assaulted, by someone who wasn't. Neither is a realistic threat. On the other hand, we can easily change what's allowed.


>neither is a realistic threat

tell that to the 450,000 women raped every year?


Not sure why you are comparing police killings to non-police assaults, except to make sure that the comparison is as irrelevant as possible.


Solely because the data you are suggesting (very wrongly) doesn't exist.

Anyway, the point is you are way more likely to be a victim of rape/burglary in your own home than you are to be killed by police anywhere, for any reason.

The previous poster was making it seem like dealing with this edge case is very important, meanwhile is happens somewhere around 1k-10k times less frequently than the situation I presented.


You're also more likely to be a victim of rape in your own home than you are to be injured by a table saw.

Should table saws include any safety mechanisms?


>also if it's the police

"and the statistics on that are"? Well, in that scenario I'll be doing the same thing and I will have to let my lawyer and public opinion get me out of jail

Now, for the question you've asked me: there are 2.5 million burglaries/home invasions in the USA per year. 25% of these occur when someone is at home. Quite interestingly, there are 450,000 rapes per year in the USA as well, which lines up quite scarily with the above number.

If someone is in my home, I'm not going to rely on my kung fu to save my family, who are depending on me for their protection.


> and wife's son

holup



You’ve just described a scenario in which one wouldn’t care if the gun had a silencer or not, so I think you’ve failed to make your point, whatever it was.


I'm not pro-gun and do not own any, but if I had to fire a gun in that instance I sure would prefer my ears to be able to tell me if there were someone else in another room shortly after the fact.


No, it would be nice to have a silencer in this situation actually, since I will be letting off around 15 shots into that person's chest, at about 162 dB each time.


Is there a problem with "silencers" other than stupid propaganda?


Not outside of the circle of people wildly uneducated on firearms.


A silencer is to gun croed what loud exhausts are to thewtuning crowd. Not adding anything to the product but a stupid shiney cool thing to distiguish oneself from people outside the "educated" circles.


It’s no different than a muffler on a car. In fact, both were invented by the same guy. It’s a safety device.


This couldn't be more wrong. It's a safety device to protect your hearing.


The safety device protect your hearing while shooting goes over your ears, or inside them. Not inbfront your mizzle. But hey, I guess operator style tacticoolness beats everything.

Anyway, gun safety pratices seem to be desperately lacking in the US, judging by all the stupid gun accidents. At least your hearing was protected by a cool, tactical device.


> The safety device protect your hearing while shooting goes over your ears, or inside them. Not inbfront your mizzle.

This argument is like saying that since air bags are a safety device, seat belts must not be.


In the UK, police sometimes recommend that licence holders request suppressors as another line item on their licences, on health and safety grounds.


Yep, friends of mine in the UK were recommended heavily to add a sound moderator to their ticket, to avoid pissing off neighbours when shooting vermin at night, etc.


I mean, if you’re at your own home, and your guns have suppressors on them… it’s fine.


Nope, they’re an NFA item. Highly regulated, you can get men in suits at your door for the offense of buying several oil filters at once.


Not finding any regulation on the misuse of oil filters … yet.


They make pretty decent silencers when affixed to the muzzle of a gun, and suddenly become an NFA item.

I know a guy with a diesel repair shop who bought a “suspicious” number of filters off Amazon at once. A couple suits showed up at his door asking about them. We totally live in a surveillance state, and Amazon feeds your purchase history into it.


41 months in prison for your oil filter...

"Maryland Man Arrested for Fuel Filter Silencer" https://www.guntrustlawyer.com/maryland-man-arrested-fuel-fi...


Seems it wasn’t just “possession of an oil filter silencer”:

> Candelario sold and manufactured AR-15 style assault rifles in Maryland without a license. The ATF caught Candelario by using an anonymous man to purchase the firearms in a gas station parking lot. This agent purchased six rifles, as well as two fuel filter silencers.


It is issued in the form of enforcement action by the ATF. The recent SC ruling on regulatory agencies may change this some.


According the the NFA, anything you use as a suppressor, is a suppressor.

Be it an empty bottle, an oil filter, or a potato (yes, really).


if even a pillow; asking for a friend.


Constructive intent is what the ATF claims (and wins in court).


the "fuel filter" thing with the right other stuff is constructive possession even if u dont build it.


Yes, but there's nothing wrong with using an NFA item for reasonable self defense.


Has this been tested with silencers specifically? Seems like it’s nasty both directions; if you usually run a silencer on your home defense gun, they’d get you for that. If you don’t, and you take the time to put one on, it undermines your self defense claim.


Guns at any home don't really have an absolute level of fineness I'd say; it also depends on where the home is, who is in the home, if the person possessing the guns is reasonable and trained etc.

If your home is a small apartment in a building with small apartments all around you with walls that are essentially a thin sheet of cardboard, and the gun owner hears voices that aren't really there, is it still fine? (and suppressors don't even factor in at this point since they are essentially just hearing protection)

I don't think there is a universally applicable rule where it is fine or not-fine. Factors like the individual(s) involved, the location and even social climate make such a big impact when it comes to weapons. Probably also why there is a blanket ban on suppressors, not because it was actually based on the use with common sense.


Suppressors are regulated heavily under the NFA. You have to receive explicit permission from the Feds for each one.

The US, like it or not, has specific carve out allowances for firearm ownership by the mass civilian population. You may not find it reasonable.


> Suppressors are regulated heavily under the NFA. You have to receive explicit permission from the Feds for each one.

You make it sound far worse than it actually is. But everybody legally able to own a firearm, is also legally able to own any NFA item (if they are legal in their state of residence).

All you have to do is pay $200, submit your fingerprints, file an application and wait. You don't even need to provide them with a reason. And as long as the application is in order, and you're legally able to possess a firearm, there's no reason at all to refuse the application.

Also, Texas no longer cares about the NFA as far as suppressors are concerned.


It doesn't have anything to do with liking things. Blanket rules that apply to incompatible scenarios are just dumb, and not reasonable in any form.

The endless 'defence' for bad rules makes no sense either, it's okay to say "it isn't perfect and when we find a better way we might adopt it". Rules are just constructs that can be changed.


Tyrannical states tend to remove weapons and armor from the population early in their campaign. Some countries realized this in their founding and made sure that would be rather difficult to enforce.


Yet somehow in actual tyrannical states it doesn't solve anything, and in states where there are more guns than population it mostly just costs the lives of childen and citizens who were going about their day.

Life also doesn't revolve around states and guns, and countries that do seem to have a partial culture revolving around just that are generally very young countries that seem to be stuck in a vicious circle.

Instead of blindly deferring reality to an amendment to a man-made rule you could also engage in proactive betterment of society.


An armed citizen and a citizen working for the betterment of society are not mutually exclusive.


> engage in proactive betterment of society

I do, we just disagree on this topic.


In virtually all of the states a home intruder is considered a deadly threat by itself, so it's perfectly fine to shoot them. Even in super liberal states like New York or California it's perfectly okay to open fire on home intruders.


What do the rules have to do with it? We're talking about violence-centric thinking and making blanket statements that cannot apply to non-uniform societies.

If there are some rules that say it's fine to eat poop, does that mean that everyone now has to constantly eat poop? Probably not. Same applies to all the other "you are allowed to do X" rules. If all we do is parrot what someone else wrote at some other time in some other context, we'll just get nowhere and stay in limbo forever.


I'm missing the point you're trying to make.


Judging by the sibling comments here, silencers are a hot button issue on HN. FWIW, silencers are as of this year purchasable without a permit in Sweden (a hunting permit is required which involves firearms training, but before a separate license was required for the silencer)

EDIT: and as several commenters already have pointed out, it's a good thing. Shooting an unsilenced 30-06 rifle in a closed hideout will hurt even with ear protection.


It’s weird that GitHub makes me log in to view gists. I would prefer to view them anonymously.


I'm able to view with out authentication.



> It’s weird that GitHub makes me log in to view gists.

It doesn't.


It does for me too. (Also surprised that I'm logged out, guess it does that after a 2 week break)


Just tried in chrome and Firefox both in and out of incognito mode. Worked without any login.

On a VPN perhaps?


> On a VPN perhaps?

My first guess would be that the people complaining see the prompt to log in, assume it's blocking the content, and don't notice that the content appears above the prompt.


It doesn't. Which you can prove to yourself in incognito mode, or even just using curl.


Is there any reason this should have #!/bin/bash as the shebang instead of #!/bin/sh ?

Especially considering it has the extension of .sh instead of .bash


I don't think I've ever seen a script use a.bash extension, so I wouldn't put any weight on that.


If I'm using bashisms, I'll use .bash extension. It's rare indeed, but that's because I'm trying to stay in pure sh way.


I only use .sh extensions for Bourne shell scripts and .bash for Bash scripts. It doesn't really matter in terms of executing scripts, but it's a handy visual indication.


Usually you don't put any extension on scripts that use a shebang (#!), so that you can chmod +x them, put them in your path, and use them like normal commands (which don't have a suffix).

IMHO the .sh extension should only be used for code that you're supposed to "source" instead of executing.


Downloaded scripts do generally have extensions, and they are almost exclusively .eh, which was the point of my comment.


Only if they are Canadian scripts.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: