search in pokesav forums or download mine (not mine, just uploaded by me) but i'm not sure if it works with HG/SS i think it need to be updated
http://www.mediafire.com/?2nawyjmvucm
it comes with legality checker (the one you want, right?) and trash bytes checker + a readme, with copyright or...