Initial commit.

This commit is contained in:
2018-02-06 20:59:53 +00:00
commit c51ad0ba54
13 changed files with 2168 additions and 0 deletions

370
.gitignore vendored Normal file
View File

@@ -0,0 +1,370 @@
# Created by .ignore support plugin (hsz.mobi)
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff:
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/dictionaries
# Sensitive or high-churn files:
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.xml
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
# Gradle:
.idea/**/gradle.xml
.idea/**/libraries
# CMake
cmake-build-debug/
# Mongo Explorer plugin:
.idea/**/mongoSettings.xml
## File-based project format:
*.iws
## Plugin-specific files:
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
### VisualStudioCode template
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
### VisualStudio template
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
**/Properties/launchSettings.json
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Typescript v1 declaration files
typings/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush
.cr/
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
### MonoDevelop template
#User Specific
*.usertasks
#Mono Project Files
*.resources
test-results/

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ContentModelStore">
<e p="$USER_HOME$/.Rider2017.3/system/resharper-host/local/Transient/ReSharperHost/v11/SolutionCaches/_BurnOutSharp.820868347.00" t="ExcludeRecursive" />
<e p="$PROJECT_DIR$" t="IncludeFlat">
<e p="BurnOutSharp" t="IncludeRecursive">
<e p="BurnOutSharp.csproj" t="IncludeRecursive" />
<e p="Program.cs" t="Include" />
<e p="Properties" t="Include">
<e p="AssemblyInfo.cs" t="Include" />
</e>
<e p="ProtectionFind.cs" t="Include" />
<e p="README.md" t="Include" />
<e p="bin" t="ExcludeRecursive" />
<e p="obj" t="ExcludeRecursive" />
</e>
<e p="BurnOutSharp.sln" t="IncludeFlat" />
<e p="packages" t="ExcludeRecursive" />
</e>
</component>
</project>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ContentModelUserStore">
<explicitIncludes />
<explicitExcludes />
</component>
</project>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/.idea.BurnOutSharp/riderModule.iml" filepath="$PROJECT_DIR$/.idea/.idea.BurnOutSharp/riderModule.iml" />
</modules>
</component>
</project>

6
.idea/.idea.BurnOutSharp/.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="RIDER_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$/../.." />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

16
BurnOutSharp.sln Normal file
View File

@@ -0,0 +1,16 @@

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BurnOutSharp", "BurnOutSharp\BurnOutSharp.csproj", "{94FA0AF5-9FCB-4BDB-BB9B-F0D636EA842B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{94FA0AF5-9FCB-4BDB-BB9B-F0D636EA842B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{94FA0AF5-9FCB-4BDB-BB9B-F0D636EA842B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{94FA0AF5-9FCB-4BDB-BB9B-F0D636EA842B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{94FA0AF5-9FCB-4BDB-BB9B-F0D636EA842B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{94FA0AF5-9FCB-4BDB-BB9B-F0D636EA842B}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BurnOutSharp</RootNamespace>
<AssemblyName>BurnOutSharp</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ProtectionFind.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="README.md" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

183
BurnOutSharp/Program.cs Normal file
View File

@@ -0,0 +1,183 @@
/* this file is part of BurnOut
*Copyright (C)2005-2010 Gernot Knippen
* Copyright (C) 2018 Natalia Portillo
*
*This program is free software; you can redistribute it and/or
*modify it under the terms of the GNU General Public License
*as published by the Free Software Foundation; either
*version 2 of the License, or (at your option) any later version.
*
*This program is distributed in the hope that it will be useful,
*but WITHOUT ANY WARRANTY; without even the implied warranty of
*MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
*GNU General Public License for more details.
*
*You can get a copy of the GNU General Public License
*by writing to the Free Software
*Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
using System;
using System.IO;
using System.Linq;
using System.Text;
namespace BurnOutSharp
{
static class BurnOut
{
public const int Filesizelimit = 20971520;
public static void Main(string[] args)
{
bool advancedscan = false;
Console.WriteLine("BurnOut " + typeof(BurnOut).Assembly.GetName().Version);
Console.WriteLine("© 2005-2010, Gernot Knippen alias GF7");
Console.WriteLine("© 2018, Natalia Portillo");
for(int i = 0; i < args.Length; i++)
{
if(args[i].ToLower() == "/?" || args[i].ToLower() == "/help" || args[i].ToLower() == "-?" ||
args[i].ToLower() == "--help")
{
Console.WriteLine("usage: BurnOut.exe [-advancedscan] [-scan Filename/Drive]");
return;
}
if(args[i].ToLower() == "-advancedscan" || args[i] == "/advancedscan")
advancedscan = true;
else if(args[i].ToLower() == "-scan" || args[i] == "/scan")
{
string strprotection;
if(Directory.Exists(args[i + 1]))
{
Console.WriteLine("Scanning " + args[i + 1]);
strprotection = ProtectionFind.Scan(args[i + 1], advancedscan);
if(!string.IsNullOrEmpty(strprotection)) Console.WriteLine(strprotection);
else if(ProtectionFind.IsCdCheck)
Console.WriteLine("could be " + "CD/DVD-Check");
else if(ProtectionFind.IsDummyfiles)
Console.WriteLine("could be " + "Dummyfiles");
}
else if(File.Exists(args[i + 1]))
{
Console.WriteLine("Scanning " + args[i + 1]);
strprotection = ProtectionFind.ScaninFile(args[i + 1], advancedscan);
if(!string.IsNullOrEmpty(strprotection)) Console.WriteLine(strprotection);
else if(ProtectionFind.IsCdCheck)
Console.WriteLine("could be " + "CD/DVD-Check");
}
else
Console.WriteLine("Directory/File does not exist!");
return;
}
}
}
public static string[] GetAllFiles(string path, string filter = "*")
{
string[] files;
string[] tempfilter = filter.Split('|');
try
{
files = Directory.GetFiles(path, tempfilter[0]);
string[] newfiles;
int i;
if(tempfilter.Length > 1)
for(i = 1; i < tempfilter.Length; i++)
{
newfiles = Directory.GetFiles(path, tempfilter[i]);
files = files.Concat(newfiles).ToArray();
}
string[] directories = Directory.GetDirectories(path);
for(i = 0; i < directories.Length; i++)
{
newfiles = GetAllFiles(directories[i], filter);
if(newfiles != null) files = files.Concat(newfiles).ToArray();
}
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
return null;
}
return files;
}
public static int FileExists(string filename, FileInfo[] files)
{
int i;
filename = filename.ToLower();
for(i = 0; i <= files.Length - 1; i++)
if(files[i].Name.ToLower() == filename)
return i;
return -1;
}
public static int PrefixInArray(byte[] string1, byte[] string2, byte[] prefix1, byte[] prefix2)
{
int rtn = 0;
while(rtn != -1)
{
rtn = InArray(string1, string2, rtn + 1);
if(rtn == -1) continue;
byte[] sub1 = new byte[prefix1.Length];
Array.Copy(string1, rtn - prefix1.Length, sub1, 0, prefix1.Length);
if(sub1.SequenceEqual(prefix1)) return rtn - prefix1.Length - 1;
byte[] sub2 = new byte[prefix2.Length];
Array.Copy(string1, rtn - prefix2.Length, sub2, 0, prefix2.Length);
if(sub2.SequenceEqual(prefix2)) return rtn - prefix1.Length - 1;
}
return -1;
}
public static int SuffixInArray(byte[] string1, byte[] string2, byte[] suffix1, byte[] suffix2)
{
int rtn = 0;
while(rtn != -1)
{
rtn = InArray(string1, string2, rtn + 1);
if(rtn == -1) continue;
byte[] sub1 = new byte[suffix1.Length];
byte[] sub2 = new byte[suffix2.Length];
Array.Copy(string1, rtn + string2.Length, sub1, 0, suffix1.Length);
Array.Copy(string1, rtn + string2.Length, sub2, 0, suffix2.Length);
if(sub1.SequenceEqual(suffix1) ||
sub2.SequenceEqual(suffix2)) return rtn;
}
return -1;
}
public static bool IsNumeric(byte Char)
{
return Char >= 0x30 && Char <= 0x39;
}
public static int InArray(byte[] array1, byte[] array2, int position = 0)
{
if(array1 == null || array2 == null) return -1;
byte[] sliding = new byte[array2.Length];
while(position + array2.Length <= array1.Length)
{
Array.Copy(array1, position, sliding, 0, array2.Length);
if(sliding.SequenceEqual(array2)) return position;
position++;
}
return -1;
}
}
}

View File

@@ -0,0 +1,35 @@
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("BurnOutSharp - protection scanner")]
[assembly: AssemblyDescription("open source protection scanner")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("BurnOutSharp")]
[assembly: AssemblyCopyright("Copyright © 2018 Natalia Portillo")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("94FA0AF5-9FCB-4BDB-BB9B-F0D636EA842B")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.04")]
[assembly: AssemblyFileVersion("1.04")]

File diff suppressed because it is too large Load Diff

5
BurnOutSharp/README.md Normal file
View File

@@ -0,0 +1,5 @@
BurnOutSharp
============
This is a fork of [BurnOut](https://sourceforge.net/projects/burnout), an opensource copy protection.
License is GPLv2.

1
codealike.json Normal file
View File

@@ -0,0 +1 @@
{"projectId":"c39339b9-8cf9-4167-97ff-42ae09237806","projectName":"BurnOutSharp"}