A court has heard how a badger baiting ring was discovered after a teenager posted pictures of an animal being attacked by a dog on the internet.
Police moved in after Dodds posted images on the internet
Police obtained warrants and searched several houses in Hawick in the Borders after viewing the images.
Two members of the gang appeared at Jedburgh Sheriff Court on Thursday and admitted digging at badger setts.
Sentence on Sean Dodds, 17, of McLagan Drive, and Kyle Lawrie, 19, of Church Lane, both Hawick, was deferred.
Dodds, who had downloaded images of a badger being killed as a profile on his Bebo page, pleaded guilty to wilfully killing a badger.
It is the first time someone in Scotland has been convicted of deliberately killing a badger with a dog.
Under current legislation the maximum penalty for the offence is six months in custody, compared to three years for digging around a sett.
This anomaly was highlighted by Sheriff Kevin Drummond who hinted that the law needed to be re-examined.
Both men admitted digging for a badger at a sett at Acreknowe reservoir near their home town in October 2006.
Lawrie pleaded guilty to a similar offence at woodland near Wilton Dean, Hawick, on 15 November 2006, while Dodds admitted wilfully allowing a dog to attack and kill a badger on that occasion.
Wildlife prosecutor John Barclay described how Pc Mark Rafferty was given information in January 2007 about the badger-baiting gang.
"He was told Dodds and Lawrie were involved in digging for badgers and that images of these activities were posted on an internet site," he said.
"Investigations were carried out and there were pictures of dogs attacking a badger on Dodds' Bebo website.
"As a result of seeing this, warrants were obtained to search their homes and a number of dogs were seized by police - a mixture of lurchers, terriers and mongrels."
Dodds' lawyer, Rhona MacLeod, described her client as "immature".
She insisted he had downloaded the badger-killing images from another website.
"He regrets the whole incident," she said.
"He is ashamed of what he did.
"As bizarre as it may sound he has always been seen as a dog lover."
Lawrie's lawyer, Alison Marshall, added that the pair had been influenced by others.
"The two accused were not the only people involved in these activities," she said.