Reverse Engineering RET Homepage RET Members Reverse Engineering Projects Reverse Engineering Papers Reversing Challenges Reverser Tools RET Re-Search Engine Reverse Engineering Forum Reverse Engineering Links

Go Back   Reverse Engineering Team Board > Reverse Engineering Board > .NET Reverse Engineering
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Thread Tools Display Modes
Old 01-24-2012, 08:29 AM
DotNetResearcher2 DotNetResearcher2 is offline
Join Date: Sep 2011
Posts: 6
Default Mass flag reset

If I want to whizz down the TypeDef table in an Assembly (and possibly the Method table) and reset the Flags on each type to make them all public, is there a tool in existence that would let me do it?

There's a pretty good post on the Assembly structure here:

And I'm sure given enough time I could knock something up, but rather than yak shaving I was wondering if a tool already existed.

Many thanks,

Reply With Quote
Old 01-24-2012, 09:09 AM
kao kao is offline
Senior Member
Join Date: Sep 2007
Posts: 184

I'm not aware of any ready-made tool. Most obvious choice would be to use Mono.Cecil and write ~20 line utility for that purpose.
Reply With Quote
Old 01-24-2012, 09:22 AM
DotNetResearcher2 DotNetResearcher2 is offline
Join Date: Sep 2011
Posts: 6

OK, thanks. There are hundred of types...and I'm lazy

Will post back when I have something working.


Wish I'd seen Cecil sooner I mean, I'd heard about it, but not really understood it. Turns out my problem was trivial to solve:

class Program
static void Main(string[] args)
AssemblyDefinition assembly =

foreach (TypeDefinition typeDefinition in assembly.MainModule.Types)
typeDefinition.IsPublic = true;


Thanks again Kao

Last edited by DotNetResearcher2 : 01-24-2012 at 09:41 AM.
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.