Skip to content

Commit

Permalink
Use NETFRAMEWORK
Browse files Browse the repository at this point in the history
  • Loading branch information
wtfsck committed Nov 14, 2018
1 parent 13358a4 commit 5109679
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion AssemblyData/AssemblyServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License
along with de4dot. If not, see <http://www.gnu.org/licenses/>.
*/

#if NET35
#if NETFRAMEWORK
using System;
using System.Collections;
using System.Runtime.Remoting;
Expand Down
3 changes: 1 addition & 2 deletions De4DotCommon.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<De4DotNetFramework>false</De4DotNetFramework>
Expand Down
2 changes: 1 addition & 1 deletion de4dot.code/AssemblyClient/AssemblyClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ You should have received a copy of the GNU General Public License
using System.Threading;
using AssemblyData;

#if !NET35
#if !NETFRAMEWORK
namespace System.Runtime.Remoting {
class RemotingException : SystemException {
}
Expand Down
6 changes: 3 additions & 3 deletions de4dot.code/AssemblyClient/AssemblyClientFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class SameAppDomainAssemblyClientFactory : IAssemblyClientFactory {

public class NewAppDomainAssemblyClientFactory : IAssemblyClientFactory {
public IAssemblyClient Create(AssemblyServiceType serviceType) =>
#if NET35
#if NETFRAMEWORK
new AssemblyClient(new NewAppDomainAssemblyServerLoader(serviceType));
#else
new AssemblyClient(new SameAppDomainAssemblyServerLoader(serviceType));
Expand All @@ -45,14 +45,14 @@ public class NewProcessAssemblyClientFactory : IAssemblyClientFactory {
public NewProcessAssemblyClientFactory(ServerClrVersion serverVersion) => this.serverVersion = serverVersion;

public IAssemblyClient Create(AssemblyServiceType serviceType, ModuleDef module) =>
#if NET35
#if NETFRAMEWORK
new AssemblyClient(new NewProcessAssemblyServerLoader(serviceType, GetServerClrVersion(module)));
#else
new AssemblyClient(new SameAppDomainAssemblyServerLoader(serviceType));
#endif

public IAssemblyClient Create(AssemblyServiceType serviceType) =>
#if NET35
#if NETFRAMEWORK
new AssemblyClient(new NewProcessAssemblyServerLoader(serviceType, serverVersion));
#else
new AssemblyClient(new SameAppDomainAssemblyServerLoader(serviceType));
Expand Down
2 changes: 1 addition & 1 deletion de4dot.code/AssemblyClient/IpcAssemblyServerLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License
along with de4dot. If not, see <http://www.gnu.org/licenses/>.
*/

#if NET35
#if NETFRAMEWORK
using System;
using AssemblyData;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License
along with de4dot. If not, see <http://www.gnu.org/licenses/>.
*/

#if NET35
#if NETFRAMEWORK
using System;
using System.Threading;
using AssemblyData;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License
along with de4dot. If not, see <http://www.gnu.org/licenses/>.
*/

#if NET35
#if NETFRAMEWORK
using System;
using System.Diagnostics;
using AssemblyData;
Expand Down
2 changes: 1 addition & 1 deletion de4dot.code/deobfuscators/CodeFort/AssemblyData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ void InitializeTypes() {
void CreateTypes() {
foreach (var info in enumInfos) {
var builder = enumBuilders[info.name];
#if NET35
#if NETFRAMEWORK
var type = builder.CreateType();
#else
var type = builder.CreateTypeInfo();
Expand Down
2 changes: 1 addition & 1 deletion de4dot.code/deobfuscators/CodeFort/PasswordFinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ static List<Obj> ConvertList(System.Collections.IList inList) {
public void Find(out PasswordInfo mainAsmPassword, out PasswordInfo embedPassword) {
var asmName = new AssemblyName("asm");
const AssemblyBuilderAccess BuilderAccess = AssemblyBuilderAccess.Run;
#if NET35
#if NETFRAMEWORK
var asmBuilder = AppDomain.CurrentDomain.DefineDynamicAssembly(asmName, BuilderAccess);
#else
var asmBuilder = AssemblyBuilder.DefineDynamicAssembly(asmName, BuilderAccess);
Expand Down

0 comments on commit 5109679

Please sign in to comment.