[HN Gopher] Killbutmakeitlooklikeanaccident.sh
       ___________________________________________________________________
        
       Killbutmakeitlooklikeanaccident.sh
        
       Author : app4soft
       Score  : 357 points
       Date   : 2022-07-17 11:38 UTC (11 hours ago)
        
 (HTM) web link (gist.github.com)
 (TXT) w3m dump (gist.github.com)
        
       | mrits wrote:
       | Using gdb is like when you forget to take the silencer off your
       | gun and claim self defense when the police comes.
        
         | Dylan16807 wrote:
         | Is there a problem with "silencers" other than stupid
         | propaganda?
        
           | typeofhuman wrote:
           | Not outside of the circle of people wildly uneducated on
           | firearms.
        
             | hef19898 wrote:
             | 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.
        
               | josephcsible wrote:
               | This couldn't be more wrong. It's a safety device to
               | protect your hearing.
        
               | hef19898 wrote:
               | 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.
        
               | josephcsible wrote:
               | > 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.
        
               | mod wrote:
        
               | jonhohle wrote:
               | It's no different than a muffler on a car. In fact, both
               | were invented by the same guy. It's a safety device.
        
           | tengwar2 wrote:
           | In the UK, police sometimes recommend that licence holders
           | request suppressors as another line item on their licences,
           | on health and safety grounds.
        
             | nibbleshifter wrote:
             | 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.
        
         | koolba wrote:
         | 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.
        
           | typeofhuman wrote:
           | Some states actually require silencers while hunting because
           | of the sound disturbance.
        
           | jorvi wrote:
           | 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.
        
             | oynqr wrote:
             | Pretty sure the ATF doesn't like people doing that
        
               | coryrc wrote:
               | They require a stamp from the ATF, but are legal with it.
        
           | ondrek wrote:
           | 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_.
           | ..
        
             | jsiaajdsdaa wrote:
             | >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.
        
               | Grimburger wrote:
               | 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.
        
               | xoa wrote:
               | 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.
        
               | elbigbad wrote:
               | I wanted to take a moment to say that I really appreciate
               | this thoughtful and detailed comment.
        
               | sillysaurusx wrote:
               | 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.
        
               | xoa wrote:
               | 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.
        
               | collegeburner wrote:
               | 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.
        
               | josephcsible wrote:
               | 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.
        
               | jsiaajdsdaa wrote:
               | Oh believe me, you'll hear it either way!
        
               | natmaka wrote:
               | 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.
        
               | livueta wrote:
               | 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.
        
             | formerly_proven wrote:
             | Nunchaku are illegal in many countries as well. Which
             | curiously also seems to be based on depictions in movies
             | and not reality.
        
               | andy_ppp wrote:
               | Which part of the gun laws are not based in reality?
        
               | josephcsible wrote:
               | 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.
        
               | k_sze wrote:
               | 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
        
               | nibbleshifter wrote:
               | 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.
        
             | nibbleshifter wrote:
             | 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.
        
           | mrits wrote:
           | 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!
        
             | YeGoblynQueenne wrote:
        
         | sgjohnson wrote:
         | I mean, if you're at your own home, and your guns have
         | suppressors on them... it's fine.
        
           | mwint wrote:
           | 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.
        
             | egberts1 wrote:
             | Not finding any regulation on the misuse of oil filters ...
             | yet.
        
               | collegeburner wrote:
               | the "fuel filter" thing with the right other stuff is
               | constructive possession even if u dont build it.
        
               | captainredbeard wrote:
               | It is issued in the form of enforcement action by the
               | ATF. The recent SC ruling on regulatory agencies may
               | change this some.
        
               | mwint wrote:
               | 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.
        
               | belter wrote:
               | 41 months in prison for your oil filter...
               | 
               | "Maryland Man Arrested for Fuel Filter Silencer"
               | https://www.guntrustlawyer.com/maryland-man-arrested-
               | fuel-fi...
        
               | alfon wrote:
               | 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.
        
               | nibbleshifter wrote:
               | Constructive intent is what the ATF claims (and wins in
               | court).
        
           | oneplane wrote:
           | 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.
        
             | captainredbeard wrote:
             | 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.
        
               | oneplane wrote:
               | 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.
        
               | jonhohle wrote:
               | 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.
        
               | oneplane wrote:
               | 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.
        
               | jonhohle wrote:
               | An armed citizen and a citizen working for the betterment
               | of society are not mutually exclusive.
        
         | [deleted]
        
         | laszlojamf wrote:
         | 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.
        
         | gmiller123456 wrote:
         | 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.
        
           | kzrdude wrote:
           | Does it make the laser "piow" noise in real life too? Or
           | that's just the cinema effect
        
             | tgsovlerkhgsel wrote:
             | 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.
        
             | mwint wrote:
             | 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.
        
               | Taek wrote:
               | Usually with no DB measurement. I couldn't find a single
               | video of someone using silenced subsonic rounds with a
               | decibel meter.
        
               | girvo wrote:
               | 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.
        
             | ch4s3 wrote:
             | 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.
        
             | gmiller123456 wrote:
             | 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.
        
             | jethro_tell wrote:
             | 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.
        
           | slim wrote:
           | > Firing a gun with no hearing protection is a pretty jarring
           | experience
           | 
           | That's perfect UX for the use case
        
             | jsiaajdsdaa wrote:
        
               | cmonnow wrote:
               | > and wife's son
               | 
               | holup
        
               | Forbo wrote:
               | It's a meme: https://knowyourmeme.com/memes/my-wifes-son
        
               | cycomanic wrote:
               | 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.
        
               | thaumasiotes wrote:
               | > 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.
        
               | dragonwriter wrote:
               | > 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.
        
               | jsiaajdsdaa wrote:
               | 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.
        
               | dragonwriter wrote:
               | Not sure why you are comparing police _killings_ to non-
               | police _assaults_ , except to make sure that the
               | comparison is as irrelevant as possible.
        
               | thaumasiotes wrote:
               | 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_.
        
               | jsiaajdsdaa wrote:
               | >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.
        
               | moomin wrote:
               | 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.
        
               | jwolfe wrote:
               | 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.
        
               | jsiaajdsdaa wrote:
        
               | jsiaajdsdaa wrote:
               | 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.
        
       | prepend wrote:
       | It's weird that GitHub makes me log in to view gists. I would
       | prefer to view them anonymously.
        
         | thaumasiotes wrote:
         | > It's weird that GitHub makes me log in to view gists.
         | 
         | It doesn't.
        
           | mkj wrote:
           | It does for me too. (Also surprised that I'm logged out,
           | guess it does that after a 2 week break)
        
             | tehbeard wrote:
             | Just tried in chrome and Firefox both in and out of
             | incognito mode. Worked without any login.
             | 
             | On a VPN perhaps?
        
               | thaumasiotes wrote:
               | > 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.
        
         | djbusby wrote:
         | I'm able to view with out authentication.
        
         | dmd wrote:
         | It doesn't. Which you can prove to yourself in incognito mode,
         | or even just using curl.
        
         | btdmaster wrote:
         | https://web.archive.org/web/20220206233623/https://gist.gith...
        
       | rambojazz wrote:
       | Would love to read an explanation of this.
        
         | throwoutway wrote:
         | https://news.ycombinator.com/item?id=32128387
        
       | Gaelan wrote:
       | Perhaps even more evil:
       | 
       | kill -SEGV $1
        
       | iasay wrote:
       | I see this like a cartoon black hole painted on the ground.
        
       | sph wrote:
       | What's at 0x050f? Looks like they set the rip register to that
       | value.
        
         | josephcsible wrote:
         | 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;".
        
         | tux3 wrote:
         | 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}`
        
           | pxeger1 wrote:
           | So would this not work if the program's code is mapped read-
           | only?
        
             | saagarjha wrote:
             | Debuggers typically bypass normal memory permissions.
        
               | josephcsible wrote:
               | "typically" being important. Here's an example of where
               | they can't: https://gist.github.com/josephcsible/c8ce72a6
               | 084634fe56928c4...
        
         | [deleted]
        
       | Sebb767 wrote:
       | Wouldn't this technically be a suicide? The process calls exit
       | itself, after all.
        
         | dylan604 wrote:
         | Maybe it should call \x0988 for advice first?
        
           | Godel_unicode wrote:
           | Call not connected, foiled again by hex...
        
         | EUROCARE wrote:
         | The kind of suicide where you fall on a knife, several times...
        
           | formerkrogemp wrote:
           | 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?
        
             | yellowapple wrote:
             | > 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.
        
           | WJW wrote:
           | Nono, it calls `exit(0)` only once. :)
           | 
           | (I love the cell block tango)
        
             | RedShift1 wrote:
             | Involuntary euthanasia
        
           | iso1631 wrote:
           | It had it coming
        
             | gubby wrote:
             | It only had itself to blame
        
               | iso1631 wrote:
               | If you'd have been there, if you'd have seen it, I bet ya
               | you would have done the same
        
         | OJFord wrote:
         | Involuntary assisted suicide, I suppose!
        
       | justaj wrote:
       | 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
        
         | mynameisvlad wrote:
         | I don't think I've _ever_ seen a script use a.bash extension,
         | so I wouldn 't put any weight on that.
        
           | jasonhansel wrote:
           | 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.
        
             | mynameisvlad wrote:
             | Downloaded scripts _do_ generally have extensions, and they
             | are almost exclusively .eh, which was the point of my
             | comment.
        
               | flatiron wrote:
               | Only if they are Canadian scripts.
        
           | justaj wrote:
           | 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.
        
           | vbezhenar wrote:
           | 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.
        
       | norom wrote:
       | epstein.sh
        
         | vntok wrote:
         | Has anybody claimed that his death, by hanging, was an
         | accident?
        
       | revskill wrote:
       | So we can use this to kill hanging process ? Or must wait till
       | it's not hanging to kill it ?
        
         | josephcsible wrote:
         | 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.
        
       | Vogtinator wrote:
       | Wouldn't just "p exit(0)" do the same, just with gdb doing the
       | heavy lifting?
        
         | Hello71 wrote:
         | not if the program is statically linked and stripped.
        
           | Vogtinator wrote:
           | I'm sure there's a way to do syscalls like that from gdb as
           | well
        
       | moyix wrote:
       | 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...
        
       | tomas789 wrote:
       | To be honest I was expecting different kind of content.
        
       | gyon wrote:
       | What is the purpose of this?
        
         | iasay wrote:
         | A way to annoy developers. This and cron + sleep + rand could
         | be fun.
        
           | sva_ wrote:
           | I think it would be better to cause an exception or even a
           | segfault for that
        
           | bigiain wrote:
           | You are evil. Wanna get a beer sometime?
        
         | junon wrote:
         | Fun!
        
           | gyon wrote:
        
         | GuB-42 wrote:
         | 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.
        
         | flatiron wrote:
         | 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.
        
         | staticassertion wrote:
         | 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 :)
        
       | gigatexal wrote:
        
       | z3c0 wrote:
       | May not be as portable, but "exit(1)" would probably make it seem
       | more like an accident.
        
         | jgtrosh wrote:
         | That would make it look like suicide and not an accident
        
           | dylan604 wrote:
           | Yeah, but was the suicide done to it?
        
             | moffkalast wrote:
             | Two shots to the back of the head.
        
               | ta988 wrote:
               | Two shots to the back of the thread
        
               | moffkalast wrote:
               | HA, yes that's the real joke right there.
        
               | yellowapple wrote:
               | And it managed to throw() itself out of the window.
        
           | SnowHill9902 wrote:
           | Suicided.
        
       | js2 wrote:
       | 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
        
       ___________________________________________________________________
       (page generated 2022-07-17 23:02 UTC)