CopyPastor

Detecting plagiarism made easy.

Score: 1; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2020-12-29
by Abdelrahman Gamal

Original Post

Original - Posted on 2010-10-08
by Martin



            
Present in both answers; Present only in the new answer; Present only in the old answer;

Sounds like you want to rebuild the second assembly and sign it with a different key, which would be easy if you had the source so I guess you don't?
I think it would be easier to rebuild the first assembly so that it references the second assembly you have, using the public key token that is present on the second assembly. Easier, but not entirely straightforward.
I think you should be able to achieve it by running the first assembly through `ildasm.exe`, change the public key token on the reference to the second assembly, and then run the result through `ilasm.exe`, to produce a new version of the first assembly.
A rough outline of the steps involved...
1. Run `ildasm.exe /out=first.il first.dll` (or `first.exe`) 2. Edit `first.il` and find the **.assembly** extern block for the reference to `second.dll` 3. Change the public key token in that block 4. Run `ilasm.exe first.il` to produce `first.dll` (or `first.exe`)
Be warned, I haven't used these tools for a long time, and *never* to manipulate public key tokens in this way, so you will probably have to add some ingenuity of your own. But on the other hand, I can't think of a reason for this approach not to work.


Sounds like you want to rebuild the second assembly and sign it with a different key, which would be easy if you had the source so I guess you don't?
I think it would be easier to rebuild the first assembly so that it references the second assembly you have, using the public key token that is present on the second assembly. Easier, but not entirely straightforward.
I think you should be able to achieve it by running the first assembly through `ildasm.exe`, change the public key token on the reference to the second assembly, and then run the result through `ilasm.exe`, to produce a new version of the first assembly.
A rough outline of the steps involved...
1. Run `ildasm.exe /out=first.il first.dll` (or `first.exe`) 2. Edit `first.il` and find the **.assembly** extern block for the reference to `second.dll` 3. Change the public key token in that block 4. Run `ilasm.exe first.il` to produce `first.dll` (or `first.exe`)
Be warned, I haven't used these tools for a long time, and *never* to manipulate public key tokens in this way, so you will probably have to add some ingenuity of your own. But on the other hand, I can't think of a reason for this approach not to work.



        
Present in both answers; Present only in the new answer; Present only in the old answer;