In my early backpacking days, I did just that when a bear got my poorly hung bag out of a tree. I used the small Chinese firecrackers that come woven together in little packets. I had separated a packet to use individually and had an unbroken packet in reserve. When I heard my bag hit the ground, I came out of the tent with a flashlight in my mouth, a baggie of firecrackers and a Bic in one hand and a loose firecracker in my throwing hand. Lit the firecracker and tossed it at the feet of the bear, which was crouched down with my bag about 20 feet away. That got his attention. I reached into the bag and repeated the process, at which point he got to his feet and backed a few feet away from the bag. I threw a third one about halfway between him and the bag and he backed a little further away and I inched closer to the food. This process was repeated until I was in possession of the food bag and he was maybe 25-30 feet away, pacing back and forth and growling. It became crystal clear at that point that he was debating whether or not to rip me a new one and in desperation I lit the full pack of firecrackers that I had in reserve and tossed it right at him. They exploded over a relatively extended period of time and that seemed to make up his mind, because he retreated out of flashlight range, but my buddy and I could hear him in the darkness, so we quickly built a fire(Coleman fuel for a starter-desperate times call for desperate measures) and stayed real close to it, WIDE AWAKE, for the rest of the night. Upon reflection, I realized: 1) I had been very lucky; 2) I was underarmed; 3) I needed to get a lot smarter about my choice of food(post incident analysis revealed he'd gone straight for some highly odiferous chocolate heavy trail mix in a separate sub-bag, which allowed me to save my main supply of food, and therefore, the trip), how I stored it(pre Alok Sack OP days-1978), and where I set up camp. Regarding points number 2 & 3, I upgraded to M-80's, and did a number of things to address point number 3, successfully enough that the M-80's never got used, which is a good thing since 9/11 has made it riskier than facing a bear to carry them in my backpack on an airline. I know there will probably be some doubters about this story, but it is true. It helped that I had rehearsed what I was going to do a number of times before I actually ended up having to do it because I knew there were a lot of bears in the Bubbs Creek drainage, especially in the Vidette Meadows area where this incident occurred. Anyway, for what it's worth, the little firecrackers did work, at least on that one occasion, but I would heartily recommend M-80's to those inclined to go that route, based on my experience.