Buying a $30 lens for a nikon d3100?

Okay so i bought a nikon d3100 body only and i need a lens and i found lenses on ebay for around 30 dollars, are these lenses good? Will they get the job done?
Added (1). The lenses didn't have a brand
Added (2). Also if i buy one of this small telephoto lens things do i need a tube ring to go with it?

Yes it will get the job done! Well, it depends what brand of lens, of course the Nikon ones are best for Nikon but other brands are good too. Do some research.
But just make sure you take a look at the sellers account, see their feedback etc… Because most of the time you can't refund it!
But normally ebay is very good!

Http://www.kenrockwell.com/nikon/compatibility-lens.htm#dslr
Your camera needs AF-S and AF-I lenses specifically to be able to autofocus. Other F-mount lenses will work manually. I suggest you buy the 18-55mm lens for shooting most everything or the 50mm f/1.8 lens for portrait work.
http://www.bhphotovideo.com/...ED_II.html
http://www.bhphotovideo.com/..._50mm.html
Additional answers:
All lenses have brands.
What tube ring?

AW Boater is correct. Why put a hunk of junk on a decent camera?