mirror of
https://github.com/jakobadam/RDSFactor.git
synced 2025-08-04 23:31:29 +02:00
Imported Claus Isager's CICRadarR
This commit is contained in:
commit
249ae5818b
156 changed files with 10807 additions and 0 deletions
20
Console/CICRadarRConfig/CICRadarRConfig.sln
Normal file
20
Console/CICRadarRConfig/CICRadarRConfig.sln
Normal file
|
@ -0,0 +1,20 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "CICRadarRConfig", "CICRadarRConfig\CICRadarRConfig.vbproj", "{698299A4-5778-4EE0-9C46-445A9B66F645}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{698299A4-5778-4EE0-9C46-445A9B66F645}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{698299A4-5778-4EE0-9C46-445A9B66F645}.Debug|x86.Build.0 = Debug|x86
|
||||
{698299A4-5778-4EE0-9C46-445A9B66F645}.Release|x86.ActiveCfg = Release|x86
|
||||
{698299A4-5778-4EE0-9C46-445A9B66F645}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
BIN
Console/CICRadarRConfig/CICRadarRConfig.suo
Normal file
BIN
Console/CICRadarRConfig/CICRadarRConfig.suo
Normal file
Binary file not shown.
177
Console/CICRadarRConfig/CICRadarRConfig/CICRadarRConfig.vbproj
Normal file
177
Console/CICRadarRConfig/CICRadarRConfig/CICRadarRConfig.vbproj
Normal file
|
@ -0,0 +1,177 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProductVersion>
|
||||
</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{698299A4-5778-4EE0-9C46-445A9B66F645}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<StartupObject>CICRadarRConfig.My.MyApplication</StartupObject>
|
||||
<RootNamespace>CICRadarRConfig</RootNamespace>
|
||||
<AssemblyName>CICRadarRConfig</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>WindowsForms</MyType>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>
|
||||
</TargetFrameworkProfile>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>CICRadarRConfig.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>CICRadarRConfig.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>lock.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.ServiceProcess" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Collections.Generic" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Drawing" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Windows.Forms" />
|
||||
<Import Include="System.Linq" />
|
||||
<Import Include="System.Xml.Linq" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Crypto.vb" />
|
||||
<Compile Include="IniFileVb.vb" />
|
||||
<Compile Include="Main.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Main.Designer.vb">
|
||||
<DependentUpon>Main.vb</DependentUpon>
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Resources.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Settings.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<Compile Include="SmsClass.vb" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Main.resx">
|
||||
<DependentUpon>Main.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="My Project\Application.myapp">
|
||||
<Generator>MyApplicationCodeGenerator</Generator>
|
||||
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="My Project\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<CustomToolNamespace>My</CustomToolNamespace>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="lock.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Microsoft .NET Framework 4 Client Profile %28x86 and x64%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Windows Installer 3.1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.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>
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PublishUrlHistory>publish\</PublishUrlHistory>
|
||||
<InstallUrlHistory />
|
||||
<SupportUrlHistory />
|
||||
<UpdateUrlHistory />
|
||||
<BootstrapperUrlHistory />
|
||||
<ErrorReportUrlHistory />
|
||||
<FallbackCulture>en-US</FallbackCulture>
|
||||
<VerifyUploadedFiles>false</VerifyUploadedFiles>
|
||||
</PropertyGroup>
|
||||
</Project>
|
344
Console/CICRadarRConfig/CICRadarRConfig/Crypto.vb
Normal file
344
Console/CICRadarRConfig/CICRadarRConfig/Crypto.vb
Normal file
|
@ -0,0 +1,344 @@
|
|||
Imports System
|
||||
Imports System.IO
|
||||
Imports System.Security.Cryptography
|
||||
|
||||
'
|
||||
' encrypt/decrypt functions
|
||||
' Parameter checks and error handling
|
||||
' are ommited for better readability
|
||||
'
|
||||
|
||||
Public Class EncDec
|
||||
' Encrypt a byte array into a byte array using a key and an IV
|
||||
Public Shared Function Encrypt(ByVal clearData As Byte(), ByVal Key As Byte(), ByVal IV As Byte()) As Byte()
|
||||
' Create a MemoryStream to accept the encrypted bytes
|
||||
Dim ms As New MemoryStream()
|
||||
|
||||
' Create a symmetric algorithm.
|
||||
' We are going to use Rijndael because it is strong and
|
||||
' available on all platforms.
|
||||
' You can use other algorithms, to do so substitute the
|
||||
' next line with something like
|
||||
' TripleDES alg = TripleDES.Create();
|
||||
Dim alg As Rijndael = Rijndael.Create()
|
||||
|
||||
' Now set the key and the IV.
|
||||
' We need the IV (Initialization Vector) because
|
||||
' the algorithm is operating in its default
|
||||
' mode called CBC (Cipher Block Chaining).
|
||||
' The IV is XORed with the first block (8 byte)
|
||||
' of the data before it is encrypted, and then each
|
||||
' encrypted block is XORed with the
|
||||
' following block of plaintext.
|
||||
' This is done to make encryption more secure.
|
||||
|
||||
' There is also a mode called ECB which does not need an IV,
|
||||
' but it is much less secure.
|
||||
alg.Key = Key
|
||||
alg.IV = IV
|
||||
|
||||
' Create a CryptoStream through which we are going to be
|
||||
' pumping our data.
|
||||
' CryptoStreamMode.Write means that we are going to be
|
||||
' writing data to the stream and the output will be written
|
||||
' in the MemoryStream we have provided.
|
||||
Dim cs As New CryptoStream(ms, alg.CreateEncryptor(), CryptoStreamMode.Write)
|
||||
|
||||
' Write the data and make it do the encryption
|
||||
cs.Write(clearData, 0, clearData.Length)
|
||||
|
||||
' Close the crypto stream (or do FlushFinalBlock).
|
||||
' This will tell it that we have done our encryption and
|
||||
' there is no more data coming in,
|
||||
' and it is now a good time to apply the padding and
|
||||
' finalize the encryption process.
|
||||
cs.Close()
|
||||
|
||||
' Now get the encrypted data from the MemoryStream.
|
||||
' Some people make a mistake of using GetBuffer() here,
|
||||
' which is not the right way.
|
||||
Dim encryptedData As Byte() = ms.ToArray()
|
||||
|
||||
Return encryptedData
|
||||
End Function
|
||||
|
||||
' Encrypt a string into a string using a password
|
||||
' Uses Encrypt(byte[], byte[], byte[])
|
||||
|
||||
Public Shared Function Encrypt(ByVal clearText As String, ByVal Password As String) As String
|
||||
' First we need to turn the input string into a byte array.
|
||||
Dim clearBytes As Byte() = System.Text.Encoding.Unicode.GetBytes(clearText)
|
||||
|
||||
' Then, we need to turn the password into Key and IV
|
||||
' We are using salt to make it harder to guess our key
|
||||
' using a dictionary attack -
|
||||
' trying to guess a password by enumerating all possible words.
|
||||
Dim pdb As New PasswordDeriveBytes(Password, New Byte() {&H49, &H76, &H61, &H6E, &H20, &H4D, _
|
||||
&H65, &H64, &H76, &H65, &H64, &H65, _
|
||||
&H76})
|
||||
|
||||
' Now get the key/IV and do the encryption using the
|
||||
' function that accepts byte arrays.
|
||||
' Using PasswordDeriveBytes object we are first getting
|
||||
' 32 bytes for the Key
|
||||
' (the default Rijndael key length is 256bit = 32bytes)
|
||||
' and then 16 bytes for the IV.
|
||||
' IV should always be the block size, which is by default
|
||||
' 16 bytes (128 bit) for Rijndael.
|
||||
' If you are using DES/TripleDES/RC2 the block size is
|
||||
' 8 bytes and so should be the IV size.
|
||||
' You can also read KeySize/BlockSize properties off
|
||||
' the algorithm to find out the sizes.
|
||||
Dim encryptedData As Byte() = Encrypt(clearBytes, pdb.GetBytes(32), pdb.GetBytes(16))
|
||||
|
||||
' Now we need to turn the resulting byte array into a string.
|
||||
' A common mistake would be to use an Encoding class for that.
|
||||
'It does not work because not all byte values can be
|
||||
' represented by characters.
|
||||
' We are going to be using Base64 encoding that is designed
|
||||
'exactly for what we are trying to do.
|
||||
Return Convert.ToBase64String(encryptedData)
|
||||
|
||||
End Function
|
||||
|
||||
' Encrypt bytes into bytes using a password
|
||||
' Uses Encrypt(byte[], byte[], byte[])
|
||||
|
||||
Public Shared Function Encrypt(ByVal clearData As Byte(), ByVal Password As String) As Byte()
|
||||
' We need to turn the password into Key and IV.
|
||||
' We are using salt to make it harder to guess our key
|
||||
' using a dictionary attack -
|
||||
' trying to guess a password by enumerating all possible words.
|
||||
Dim pdb As New PasswordDeriveBytes(Password, New Byte() {&H49, &H76, &H61, &H6E, &H20, &H4D, _
|
||||
&H65, &H64, &H76, &H65, &H64, &H65, _
|
||||
&H76})
|
||||
|
||||
' Now get the key/IV and do the encryption using the function
|
||||
' that accepts byte arrays.
|
||||
' Using PasswordDeriveBytes object we are first getting
|
||||
' 32 bytes for the Key
|
||||
' (the default Rijndael key length is 256bit = 32bytes)
|
||||
' and then 16 bytes for the IV.
|
||||
' IV should always be the block size, which is by default
|
||||
' 16 bytes (128 bit) for Rijndael.
|
||||
' If you are using DES/TripleDES/RC2 the block size is 8
|
||||
' bytes and so should be the IV size.
|
||||
' You can also read KeySize/BlockSize properties off the
|
||||
' algorithm to find out the sizes.
|
||||
Return Encrypt(clearData, pdb.GetBytes(32), pdb.GetBytes(16))
|
||||
|
||||
End Function
|
||||
|
||||
' Encrypt a file into another file using a password
|
||||
Public Shared Sub Encrypt(ByVal fileIn As String, ByVal fileOut As String, ByVal Password As String)
|
||||
|
||||
' First we are going to open the file streams
|
||||
Dim fsIn As New FileStream(fileIn, FileMode.Open, FileAccess.Read)
|
||||
Dim fsOut As New FileStream(fileOut, FileMode.OpenOrCreate, FileAccess.Write)
|
||||
|
||||
' Then we are going to derive a Key and an IV from the
|
||||
' Password and create an algorithm
|
||||
Dim pdb As New PasswordDeriveBytes(Password, New Byte() {&H49, &H76, &H61, &H6E, &H20, &H4D, _
|
||||
&H65, &H64, &H76, &H65, &H64, &H65, _
|
||||
&H76})
|
||||
|
||||
Dim alg As Rijndael = Rijndael.Create()
|
||||
alg.Key = pdb.GetBytes(32)
|
||||
alg.IV = pdb.GetBytes(16)
|
||||
|
||||
' Now create a crypto stream through which we are going
|
||||
' to be pumping data.
|
||||
' Our fileOut is going to be receiving the encrypted bytes.
|
||||
Dim cs As New CryptoStream(fsOut, alg.CreateEncryptor(), CryptoStreamMode.Write)
|
||||
|
||||
' Now will will initialize a buffer and will be processing
|
||||
' the input file in chunks.
|
||||
' This is done to avoid reading the whole file (which can
|
||||
' be huge) into memory.
|
||||
Dim bufferLen As Integer = 4096
|
||||
Dim buffer As Byte() = New Byte(bufferLen - 1) {}
|
||||
Dim bytesRead As Integer
|
||||
|
||||
Do
|
||||
' read a chunk of data from the input file
|
||||
bytesRead = fsIn.Read(buffer, 0, bufferLen)
|
||||
|
||||
' encrypt it
|
||||
cs.Write(buffer, 0, bytesRead)
|
||||
Loop While bytesRead <> 0
|
||||
|
||||
' close everything
|
||||
|
||||
' this will also close the unrelying fsOut stream
|
||||
cs.Close()
|
||||
fsIn.Close()
|
||||
End Sub
|
||||
|
||||
' Decrypt a byte array into a byte array using a key and an IV
|
||||
Public Shared Function Decrypt(ByVal cipherData As Byte(), ByVal Key As Byte(), ByVal IV As Byte()) As Byte()
|
||||
' Create a MemoryStream that is going to accept the
|
||||
' decrypted bytes
|
||||
Dim ms As New MemoryStream()
|
||||
|
||||
' Create a symmetric algorithm.
|
||||
' We are going to use Rijndael because it is strong and
|
||||
' available on all platforms.
|
||||
' You can use other algorithms, to do so substitute the next
|
||||
' line with something like
|
||||
' TripleDES alg = TripleDES.Create();
|
||||
Dim alg As Rijndael = Rijndael.Create()
|
||||
|
||||
' Now set the key and the IV.
|
||||
' We need the IV (Initialization Vector) because the algorithm
|
||||
' is operating in its default
|
||||
' mode called CBC (Cipher Block Chaining). The IV is XORed with
|
||||
' the first block (8 byte)
|
||||
' of the data after it is decrypted, and then each decrypted
|
||||
' block is XORed with the previous
|
||||
' cipher block. This is done to make encryption more secure.
|
||||
' There is also a mode called ECB which does not need an IV,
|
||||
' but it is much less secure.
|
||||
alg.Key = Key
|
||||
alg.IV = IV
|
||||
|
||||
' Create a CryptoStream through which we are going to be
|
||||
' pumping our data.
|
||||
' CryptoStreamMode.Write means that we are going to be
|
||||
' writing data to the stream
|
||||
' and the output will be written in the MemoryStream
|
||||
' we have provided.
|
||||
Dim cs As New CryptoStream(ms, alg.CreateDecryptor(), CryptoStreamMode.Write)
|
||||
|
||||
' Write the data and make it do the decryption
|
||||
cs.Write(cipherData, 0, cipherData.Length)
|
||||
|
||||
' Close the crypto stream (or do FlushFinalBlock).
|
||||
' This will tell it that we have done our decryption
|
||||
' and there is no more data coming in,
|
||||
' and it is now a good time to remove the padding
|
||||
' and finalize the decryption process.
|
||||
cs.Close()
|
||||
|
||||
' Now get the decrypted data from the MemoryStream.
|
||||
' Some people make a mistake of using GetBuffer() here,
|
||||
' which is not the right way.
|
||||
Dim decryptedData As Byte() = ms.ToArray()
|
||||
|
||||
Return decryptedData
|
||||
End Function
|
||||
|
||||
' Decrypt a string into a string using a password
|
||||
' Uses Decrypt(byte[], byte[], byte[])
|
||||
|
||||
Public Shared Function Decrypt(ByVal cipherText As String, ByVal Password As String) As String
|
||||
' First we need to turn the input string into a byte array.
|
||||
' We presume that Base64 encoding was used
|
||||
Dim cipherBytes As Byte() = Convert.FromBase64String(cipherText)
|
||||
|
||||
' Then, we need to turn the password into Key and IV
|
||||
' We are using salt to make it harder to guess our key
|
||||
' using a dictionary attack -
|
||||
' trying to guess a password by enumerating all possible words.
|
||||
Dim pdb As New PasswordDeriveBytes(Password, New Byte() {&H49, &H76, &H61, &H6E, &H20, &H4D, _
|
||||
&H65, &H64, &H76, &H65, &H64, &H65, _
|
||||
&H76})
|
||||
|
||||
' Now get the key/IV and do the decryption using
|
||||
' the function that accepts byte arrays.
|
||||
' Using PasswordDeriveBytes object we are first
|
||||
' getting 32 bytes for the Key
|
||||
' (the default Rijndael key length is 256bit = 32bytes)
|
||||
' and then 16 bytes for the IV.
|
||||
' IV should always be the block size, which is by
|
||||
' default 16 bytes (128 bit) for Rijndael.
|
||||
' If you are using DES/TripleDES/RC2 the block size is
|
||||
' 8 bytes and so should be the IV size.
|
||||
' You can also read KeySize/BlockSize properties off
|
||||
' the algorithm to find out the sizes.
|
||||
Dim decryptedData As Byte() = Decrypt(cipherBytes, pdb.GetBytes(32), pdb.GetBytes(16))
|
||||
|
||||
' Now we need to turn the resulting byte array into a string.
|
||||
' A common mistake would be to use an Encoding class for that.
|
||||
' It does not work
|
||||
' because not all byte values can be represented by characters.
|
||||
' We are going to be using Base64 encoding that is
|
||||
' designed exactly for what we are trying to do.
|
||||
Return System.Text.Encoding.Unicode.GetString(decryptedData)
|
||||
End Function
|
||||
|
||||
' Decrypt bytes into bytes using a password
|
||||
' Uses Decrypt(byte[], byte[], byte[])
|
||||
|
||||
Public Shared Function Decrypt(ByVal cipherData As Byte(), ByVal Password As String) As Byte()
|
||||
' We need to turn the password into Key and IV.
|
||||
' We are using salt to make it harder to guess our key
|
||||
' using a dictionary attack -
|
||||
' trying to guess a password by enumerating all possible words.
|
||||
Dim pdb As New PasswordDeriveBytes(Password, New Byte() {&H49, &H76, &H61, &H6E, &H20, &H4D, _
|
||||
&H65, &H64, &H76, &H65, &H64, &H65, _
|
||||
&H76})
|
||||
|
||||
' Now get the key/IV and do the Decryption using the
|
||||
'function that accepts byte arrays.
|
||||
' Using PasswordDeriveBytes object we are first getting
|
||||
' 32 bytes for the Key
|
||||
' (the default Rijndael key length is 256bit = 32bytes)
|
||||
' and then 16 bytes for the IV.
|
||||
' IV should always be the block size, which is by default
|
||||
' 16 bytes (128 bit) for Rijndael.
|
||||
' If you are using DES/TripleDES/RC2 the block size is
|
||||
' 8 bytes and so should be the IV size.
|
||||
|
||||
' You can also read KeySize/BlockSize properties off the
|
||||
' algorithm to find out the sizes.
|
||||
Return Decrypt(cipherData, pdb.GetBytes(32), pdb.GetBytes(16))
|
||||
End Function
|
||||
|
||||
' Decrypt a file into another file using a password
|
||||
Public Shared Sub Decrypt(ByVal fileIn As String, ByVal fileOut As String, ByVal Password As String)
|
||||
|
||||
' First we are going to open the file streams
|
||||
Dim fsIn As New FileStream(fileIn, FileMode.Open, FileAccess.Read)
|
||||
Dim fsOut As New FileStream(fileOut, FileMode.OpenOrCreate, FileAccess.Write)
|
||||
|
||||
' Then we are going to derive a Key and an IV from
|
||||
' the Password and create an algorithm
|
||||
Dim pdb As New PasswordDeriveBytes(Password, New Byte() {&H49, &H76, &H61, &H6E, &H20, &H4D, _
|
||||
&H65, &H64, &H76, &H65, &H64, &H65, _
|
||||
&H76})
|
||||
Dim alg As Rijndael = Rijndael.Create()
|
||||
|
||||
alg.Key = pdb.GetBytes(32)
|
||||
alg.IV = pdb.GetBytes(16)
|
||||
|
||||
' Now create a crypto stream through which we are going
|
||||
' to be pumping data.
|
||||
' Our fileOut is going to be receiving the Decrypted bytes.
|
||||
Dim cs As New CryptoStream(fsOut, alg.CreateDecryptor(), CryptoStreamMode.Write)
|
||||
|
||||
' Now will will initialize a buffer and will be
|
||||
' processing the input file in chunks.
|
||||
' This is done to avoid reading the whole file (which can be
|
||||
' huge) into memory.
|
||||
Dim bufferLen As Integer = 4096
|
||||
Dim buffer As Byte() = New Byte(bufferLen - 1) {}
|
||||
Dim bytesRead As Integer
|
||||
|
||||
Do
|
||||
' read a chunk of data from the input file
|
||||
bytesRead = fsIn.Read(buffer, 0, bufferLen)
|
||||
|
||||
' Decrypt it
|
||||
|
||||
cs.Write(buffer, 0, bytesRead)
|
||||
Loop While bytesRead <> 0
|
||||
|
||||
' close everything
|
||||
cs.Close()
|
||||
' this will also close the unrelying fsOut stream
|
||||
fsIn.Close()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
|
376
Console/CICRadarRConfig/CICRadarRConfig/IniFileVb.vb
Normal file
376
Console/CICRadarRConfig/CICRadarRConfig/IniFileVb.vb
Normal file
|
@ -0,0 +1,376 @@
|
|||
' Programmer: Ludvik Jerabek
|
||||
' Date: 08\23\2010
|
||||
' Purpose: Allow INI manipulation in .NET
|
||||
|
||||
Imports System.IO
|
||||
Imports System.Text.RegularExpressions
|
||||
Imports System.Collections
|
||||
Imports System.Diagnostics
|
||||
|
||||
' IniFile class used to read and write ini files by loading the file into memory
|
||||
Public Class IniFile
|
||||
' List of IniSection objects keeps track of all the sections in the INI file
|
||||
Private m_sections As Hashtable
|
||||
|
||||
' Public constructor
|
||||
Public Sub New()
|
||||
m_sections = New Hashtable(StringComparer.InvariantCultureIgnoreCase)
|
||||
End Sub
|
||||
|
||||
' Loads the Reads the data in the ini file into the IniFile object
|
||||
Public Sub Load(ByVal sFileName As String, Optional ByVal bMerge As Boolean = False)
|
||||
If Not bMerge Then
|
||||
RemoveAllSections()
|
||||
End If
|
||||
' Clear the object...
|
||||
Dim tempsection As IniSection = Nothing
|
||||
Dim oReader As New StreamReader(sFileName)
|
||||
Dim regexcomment As New Regex("^([\s]*#.*)", (RegexOptions.Singleline Or RegexOptions.IgnoreCase))
|
||||
' Broken but left for history
|
||||
'Dim regexsection As New Regex("\[[\s]*([^\[\s].*[^\s\]])[\s]*\]", (RegexOptions.Singleline Or RegexOptions.IgnoreCase))
|
||||
Dim regexsection As New Regex("^[\s]*\[[\s]*([^\[\s].*[^\s\]])[\s]*\][\s]*$", (RegexOptions.Singleline Or RegexOptions.IgnoreCase))
|
||||
Dim regexkey As New Regex("^\s*([^=\s]*)[^=]*=(.*)", (RegexOptions.Singleline Or RegexOptions.IgnoreCase))
|
||||
While Not oReader.EndOfStream
|
||||
Dim line As String = oReader.ReadLine()
|
||||
If line <> String.Empty Then
|
||||
Dim m As Match = Nothing
|
||||
If regexcomment.Match(line).Success Then
|
||||
m = regexcomment.Match(line)
|
||||
Trace.WriteLine(String.Format("Skipping Comment: {0}", m.Groups(0).Value))
|
||||
ElseIf regexsection.Match(line).Success Then
|
||||
m = regexsection.Match(line)
|
||||
Trace.WriteLine(String.Format("Adding section [{0}]", m.Groups(1).Value))
|
||||
tempsection = AddSection(m.Groups(1).Value)
|
||||
ElseIf regexkey.Match(line).Success AndAlso tempsection IsNot Nothing Then
|
||||
m = regexkey.Match(line)
|
||||
Trace.WriteLine(String.Format("Adding Key [{0}]=[{1}]", m.Groups(1).Value, m.Groups(2).Value))
|
||||
tempsection.AddKey(m.Groups(1).Value).Value = m.Groups(2).Value
|
||||
ElseIf tempsection IsNot Nothing Then
|
||||
' Handle Key without value
|
||||
Trace.WriteLine(String.Format("Adding Key [{0}]", line))
|
||||
tempsection.AddKey(line)
|
||||
Else
|
||||
' This should not occur unless the tempsection is not created yet...
|
||||
Trace.WriteLine(String.Format("Skipping unknown type of data: {0}", line))
|
||||
End If
|
||||
End If
|
||||
End While
|
||||
oReader.Close()
|
||||
End Sub
|
||||
|
||||
' Used to save the data back to the file or your choice
|
||||
Public Sub Save(ByVal sFileName As String)
|
||||
Dim oWriter As New StreamWriter(sFileName, False)
|
||||
For Each s As IniSection In Sections
|
||||
Trace.WriteLine(String.Format("Writing Section: [{0}]", s.Name))
|
||||
oWriter.WriteLine(String.Format("[{0}]", s.Name))
|
||||
For Each k As IniSection.IniKey In s.Keys
|
||||
If k.Value <> String.Empty Then
|
||||
Trace.WriteLine(String.Format("Writing Key: {0}={1}", k.Name, k.Value))
|
||||
oWriter.WriteLine(String.Format("{0}={1}", k.Name, k.Value))
|
||||
Else
|
||||
Trace.WriteLine(String.Format("Writing Key: {0}", k.Name))
|
||||
oWriter.WriteLine(String.Format("{0}", k.Name))
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
oWriter.Close()
|
||||
End Sub
|
||||
|
||||
' Gets all the sections
|
||||
Public ReadOnly Property Sections() As System.Collections.ICollection
|
||||
Get
|
||||
Return m_sections.Values
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Adds a section to the IniFile object, returns a IniSection object to the new or existing object
|
||||
Public Function AddSection(ByVal sSection As String) As IniSection
|
||||
Dim s As IniSection = Nothing
|
||||
sSection = sSection.Trim()
|
||||
' Trim spaces
|
||||
If m_sections.ContainsKey(sSection) Then
|
||||
s = DirectCast(m_sections(sSection), IniSection)
|
||||
Else
|
||||
s = New IniSection(Me, sSection)
|
||||
m_sections(sSection) = s
|
||||
End If
|
||||
Return s
|
||||
End Function
|
||||
|
||||
' Removes a section by its name sSection, returns trus on success
|
||||
Public Function RemoveSection(ByVal sSection As String) As Boolean
|
||||
sSection = sSection.Trim()
|
||||
Return RemoveSection(GetSection(sSection))
|
||||
End Function
|
||||
|
||||
' Removes section by object, returns trus on success
|
||||
Public Function RemoveSection(ByVal Section As IniSection) As Boolean
|
||||
If Section IsNot Nothing Then
|
||||
Try
|
||||
m_sections.Remove(Section.Name)
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Trace.WriteLine(ex.Message)
|
||||
End Try
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' Removes all existing sections, returns trus on success
|
||||
Public Function RemoveAllSections() As Boolean
|
||||
m_sections.Clear()
|
||||
Return (m_sections.Count = 0)
|
||||
End Function
|
||||
|
||||
' Returns an IniSection to the section by name, NULL if it was not found
|
||||
Public Function GetSection(ByVal sSection As String) As IniSection
|
||||
sSection = sSection.Trim()
|
||||
' Trim spaces
|
||||
If m_sections.ContainsKey(sSection) Then
|
||||
Return DirectCast(m_sections(sSection), IniSection)
|
||||
End If
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
' Returns a KeyValue in a certain section
|
||||
Public Function GetKeyValue(ByVal sSection As String, ByVal sKey As String) As String
|
||||
Dim s As IniSection = GetSection(sSection)
|
||||
If s IsNot Nothing Then
|
||||
Dim k As IniSection.IniKey = s.GetKey(sKey)
|
||||
If k IsNot Nothing Then
|
||||
Return k.Value
|
||||
End If
|
||||
End If
|
||||
Return String.Empty
|
||||
End Function
|
||||
|
||||
' Sets a KeyValuePair in a certain section
|
||||
Public Function SetKeyValue(ByVal sSection As String, ByVal sKey As String, ByVal sValue As String) As Boolean
|
||||
Dim s As IniSection = AddSection(sSection)
|
||||
If s IsNot Nothing Then
|
||||
Dim k As IniSection.IniKey = s.AddKey(sKey)
|
||||
If k IsNot Nothing Then
|
||||
k.Value = sValue
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' Renames an existing section returns true on success, false if the section didn't exist or there was another section with the same sNewSection
|
||||
Public Function RenameSection(ByVal sSection As String, ByVal sNewSection As String) As Boolean
|
||||
' Note string trims are done in lower calls.
|
||||
Dim bRval As Boolean = False
|
||||
Dim s As IniSection = GetSection(sSection)
|
||||
If s IsNot Nothing Then
|
||||
bRval = s.SetName(sNewSection)
|
||||
End If
|
||||
Return bRval
|
||||
End Function
|
||||
|
||||
' Renames an existing key returns true on success, false if the key didn't exist or there was another section with the same sNewKey
|
||||
Public Function RenameKey(ByVal sSection As String, ByVal sKey As String, ByVal sNewKey As String) As Boolean
|
||||
' Note string trims are done in lower calls.
|
||||
Dim s As IniSection = GetSection(sSection)
|
||||
If s IsNot Nothing Then
|
||||
Dim k As IniSection.IniKey = s.GetKey(sKey)
|
||||
If k IsNot Nothing Then
|
||||
Return k.SetName(sNewKey)
|
||||
End If
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' Remove a key by section name and key name
|
||||
Public Function RemoveKey(ByVal sSection As String, ByVal sKey As String) As Boolean
|
||||
Dim s As IniSection = GetSection(sSection)
|
||||
If s IsNot Nothing Then
|
||||
Return s.RemoveKey(sKey)
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' IniSection class
|
||||
Public Class IniSection
|
||||
' IniFile IniFile object instance
|
||||
Private m_pIniFile As IniFile
|
||||
' Name of the section
|
||||
Private m_sSection As String
|
||||
' List of IniKeys in the section
|
||||
Private m_keys As Hashtable
|
||||
|
||||
' Constuctor so objects are internally managed
|
||||
Protected Friend Sub New(ByVal parent As IniFile, ByVal sSection As String)
|
||||
m_pIniFile = parent
|
||||
m_sSection = sSection
|
||||
m_keys = New Hashtable(StringComparer.InvariantCultureIgnoreCase)
|
||||
End Sub
|
||||
|
||||
' Returns all the keys in a section
|
||||
Public ReadOnly Property Keys() As System.Collections.ICollection
|
||||
Get
|
||||
Return m_keys.Values
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Returns the section name
|
||||
Public ReadOnly Property Name() As String
|
||||
Get
|
||||
Return m_sSection
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Adds a key to the IniSection object, returns a IniKey object to the new or existing object
|
||||
Public Function AddKey(ByVal sKey As String) As IniKey
|
||||
sKey = sKey.Trim()
|
||||
Dim k As IniSection.IniKey = Nothing
|
||||
If sKey.Length <> 0 Then
|
||||
If m_keys.ContainsKey(sKey) Then
|
||||
k = DirectCast(m_keys(sKey), IniKey)
|
||||
Else
|
||||
k = New IniSection.IniKey(Me, sKey)
|
||||
m_keys(sKey) = k
|
||||
End If
|
||||
End If
|
||||
Return k
|
||||
End Function
|
||||
|
||||
' Removes a single key by string
|
||||
Public Function RemoveKey(ByVal sKey As String) As Boolean
|
||||
Return RemoveKey(GetKey(sKey))
|
||||
End Function
|
||||
|
||||
' Removes a single key by IniKey object
|
||||
Public Function RemoveKey(ByVal Key As IniKey) As Boolean
|
||||
If Key IsNot Nothing Then
|
||||
Try
|
||||
m_keys.Remove(Key.Name)
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Trace.WriteLine(ex.Message)
|
||||
End Try
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' Removes all the keys in the section
|
||||
Public Function RemoveAllKeys() As Boolean
|
||||
m_keys.Clear()
|
||||
Return (m_keys.Count = 0)
|
||||
End Function
|
||||
|
||||
' Returns a IniKey object to the key by name, NULL if it was not found
|
||||
Public Function GetKey(ByVal sKey As String) As IniKey
|
||||
sKey = sKey.Trim()
|
||||
If m_keys.ContainsKey(sKey) Then
|
||||
Return DirectCast(m_keys(sKey), IniKey)
|
||||
End If
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
' Sets the section name, returns true on success, fails if the section
|
||||
' name sSection already exists
|
||||
Public Function SetName(ByVal sSection As String) As Boolean
|
||||
sSection = sSection.Trim()
|
||||
If sSection.Length <> 0 Then
|
||||
' Get existing section if it even exists...
|
||||
Dim s As IniSection = m_pIniFile.GetSection(sSection)
|
||||
If s IsNot Me AndAlso s IsNot Nothing Then
|
||||
Return False
|
||||
End If
|
||||
Try
|
||||
' Remove the current section
|
||||
m_pIniFile.m_sections.Remove(m_sSection)
|
||||
' Set the new section name to this object
|
||||
m_pIniFile.m_sections(sSection) = Me
|
||||
' Set the new section name
|
||||
m_sSection = sSection
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Trace.WriteLine(ex.Message)
|
||||
End Try
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' Returns the section name
|
||||
Public Function GetName() As String
|
||||
Return m_sSection
|
||||
End Function
|
||||
|
||||
' IniKey class
|
||||
Public Class IniKey
|
||||
' Name of the Key
|
||||
Private m_sKey As String
|
||||
' Value associated
|
||||
Private m_sValue As String
|
||||
' Pointer to the parent CIniSection
|
||||
Private m_section As IniSection
|
||||
|
||||
' Constuctor so objects are internally managed
|
||||
Protected Friend Sub New(ByVal parent As IniSection, ByVal sKey As String)
|
||||
m_section = parent
|
||||
m_sKey = sKey
|
||||
End Sub
|
||||
|
||||
' Returns the name of the Key
|
||||
Public ReadOnly Property Name() As String
|
||||
Get
|
||||
Return m_sKey
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Sets or Gets the value of the key
|
||||
Public Property Value() As String
|
||||
Get
|
||||
Return m_sValue
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
m_sValue = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' Sets the value of the key
|
||||
Public Sub SetValue(ByVal sValue As String)
|
||||
m_sValue = sValue
|
||||
End Sub
|
||||
' Returns the value of the Key
|
||||
Public Function GetValue() As String
|
||||
Return m_sValue
|
||||
End Function
|
||||
|
||||
' Sets the key name
|
||||
' Returns true on success, fails if the section name sKey already exists
|
||||
Public Function SetName(ByVal sKey As String) As Boolean
|
||||
sKey = sKey.Trim()
|
||||
If sKey.Length <> 0 Then
|
||||
Dim k As IniKey = m_section.GetKey(sKey)
|
||||
If k IsNot Me AndAlso k IsNot Nothing Then
|
||||
Return False
|
||||
End If
|
||||
Try
|
||||
' Remove the current key
|
||||
m_section.m_keys.Remove(m_sKey)
|
||||
' Set the new key name to this object
|
||||
m_section.m_keys(sKey) = Me
|
||||
' Set the new key name
|
||||
m_sKey = sKey
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Trace.WriteLine(ex.Message)
|
||||
End Try
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' Returns the name of the Key
|
||||
Public Function GetName() As String
|
||||
Return m_sKey
|
||||
End Function
|
||||
End Class
|
||||
' End of IniKey class
|
||||
End Class
|
||||
' End of IniSection class
|
||||
End Class
|
||||
' End of IniFile class
|
1048
Console/CICRadarRConfig/CICRadarRConfig/Main.Designer.vb
generated
Normal file
1048
Console/CICRadarRConfig/CICRadarRConfig/Main.Designer.vb
generated
Normal file
File diff suppressed because it is too large
Load diff
1254
Console/CICRadarRConfig/CICRadarRConfig/Main.resx
Normal file
1254
Console/CICRadarRConfig/CICRadarRConfig/Main.resx
Normal file
File diff suppressed because it is too large
Load diff
529
Console/CICRadarRConfig/CICRadarRConfig/Main.vb
Normal file
529
Console/CICRadarRConfig/CICRadarRConfig/Main.vb
Normal file
|
@ -0,0 +1,529 @@
|
|||
Imports CICRadarRConfig.SMS
|
||||
Imports System.ServiceProcess
|
||||
Imports System.IO
|
||||
Imports System.Net.Mail
|
||||
Public Class CICRadiusRConfig
|
||||
Private ConfigFile As New IniFile
|
||||
Private encCode As String = "gewsyy#sjs2!"
|
||||
Private Sub CICRadiusRConfig_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
|
||||
Me.Height = 440
|
||||
Me.Width = 620
|
||||
|
||||
|
||||
PanelSetup.Location = New Point(136, 27)
|
||||
PanelSetup.Height = 357
|
||||
PanelSetup.Width = 470
|
||||
|
||||
PanelActiveDirectory.Location = New Point(136, 27)
|
||||
PanelActiveDirectory.Height = 357
|
||||
PanelActiveDirectory.Width = 470
|
||||
|
||||
PanelRadiusClients.Location = New Point(136, 27)
|
||||
PanelRadiusClients.Height = 357
|
||||
PanelRadiusClients.Width = 470
|
||||
|
||||
PanelSMSSetup.Location = New Point(136, 27)
|
||||
PanelSMSSetup.Height = 357
|
||||
PanelSMSSetup.Width = 470
|
||||
|
||||
PanelMailSetup.Location = New Point(136, 27)
|
||||
PanelMailSetup.Height = 357
|
||||
PanelMailSetup.Width = 470
|
||||
Try
|
||||
ConfigFile.Load(Application.StartupPath & "\CICRadarR.ini")
|
||||
txtNetBios.Text = ConfigFile.GetKeyValue("CICRadarR", "NetBiosDomain")
|
||||
txtLdapDomain.Text = ConfigFile.GetKeyValue("CICRadarR", "LDAPDomain")
|
||||
txtProvider.Text = ConfigFile.GetKeyValue("CICRadarR", "Provider")
|
||||
txtADField.Text = ConfigFile.GetKeyValue("CICRadarR", "ADField")
|
||||
txtADMailField.Text = ConfigFile.GetKeyValue("CICRadarR", "ADMailField")
|
||||
Dim ModemType As String
|
||||
ModemType = ConfigFile.GetKeyValue("CICRadarR", "USELOCALMODEM")
|
||||
If ModemType = "1" Then
|
||||
rbLocalSMS.Checked = True
|
||||
Else
|
||||
rbLocalSMS.Checked = False
|
||||
End If
|
||||
|
||||
Dim EnableOTP As String
|
||||
EnableOTP = ConfigFile.GetKeyValue("CICRadarR", "EnableOTP")
|
||||
If EnableOTP = "1" Then
|
||||
ckEnableOTP.Checked = True
|
||||
Dim EnableSMS As String
|
||||
Dim EnableEmail As String
|
||||
EnableSMS = ConfigFile.GetKeyValue("CICRadarR", "EnableSMS")
|
||||
EnableEmail = ConfigFile.GetKeyValue("CICRadarR", "EnableEmail")
|
||||
If EnableEmail = "1" Then
|
||||
ckEnableMail.Checked = True
|
||||
Else
|
||||
TestMailConfigurationToolStripMenuItem.Enabled = False
|
||||
lvConfig.Items.Item(3).ImageIndex = 6
|
||||
ckEnableMail.Checked = False
|
||||
|
||||
End If
|
||||
|
||||
If EnableSMS = "1" Then
|
||||
ckEnableSMS.Checked = True
|
||||
Else
|
||||
lvConfig.Items.Item(2).ImageIndex = 5
|
||||
ckEnableSMS.Checked = False
|
||||
TestModemConfigurationToolStripMenuItem.Enabled = False
|
||||
End If
|
||||
Else
|
||||
lvConfig.Items.Item(2).ImageIndex = 5
|
||||
lvConfig.Items.Item(3).ImageIndex = 6
|
||||
TestMailConfigurationToolStripMenuItem.Enabled = False
|
||||
TestModemConfigurationToolStripMenuItem.Enabled = False
|
||||
ckEnableSMS.Checked = False
|
||||
ckEnableMail.Checked = False
|
||||
ckEnableOTP.Checked = False
|
||||
End If
|
||||
|
||||
txtMailServer.Text = ConfigFile.GetKeyValue("CICRadarR", "MailServer")
|
||||
txtSenderEmail.Text = ConfigFile.GetKeyValue("CICRadarR", "SenderEmail")
|
||||
|
||||
txtComPort.Text = ConfigFile.GetKeyValue("CICRadarR", "COMPORT")
|
||||
txtSMSC.Text = ConfigFile.GetKeyValue("CICRadarR", "SMSC")
|
||||
Dim Debug As String
|
||||
Debug = ConfigFile.GetKeyValue("CICRadarR", "Debug")
|
||||
If Debug = "1" Then
|
||||
ckDebug.Checked = True
|
||||
Else
|
||||
ckDebug.Checked = False
|
||||
End If
|
||||
|
||||
Dim RDGateway As String
|
||||
RDGateway = ConfigFile.GetKeyValue("CICRadarR", "TSGW")
|
||||
If RDGateway = "1" Then
|
||||
rbRDGateway.Checked = True
|
||||
rbCitrixNetscaler.Checked = False
|
||||
Else
|
||||
rbRDGateway.Checked = False
|
||||
rbCitrixNetscaler.Checked = True
|
||||
End If
|
||||
|
||||
Dim ClientList() As String
|
||||
ClientList = Split(ConfigFile.GetKeyValue("CICRadarR", "ClientList"), ",")
|
||||
|
||||
For i As Integer = 0 To ClientList.Length - 1
|
||||
ListClients.Items.Add(ClientList(i) & " ( " & ConfigFile.GetKeyValue("Clients", ClientList(i)) & " )")
|
||||
Next
|
||||
|
||||
|
||||
|
||||
|
||||
Catch
|
||||
End Try
|
||||
|
||||
Dim tt As New ToolTip()
|
||||
|
||||
tt.ShowAlways = True
|
||||
|
||||
tt.SetToolTip(txtADField, "Type the Active Directory field where phonenumbers are stored." & vbCrLf & "Ex: mobile or telephoneNumber" & vbCrLf & "Use Adsiedit.msc to find the correct field.")
|
||||
tt.SetToolTip(txtSMSC, "See http://smsclist.com/downloads/default.txt for your provider" & vbCrLf & "Ex: +4540390999")
|
||||
tt.SetToolTip(txtComPort, "Ex: com1")
|
||||
tt.SetToolTip(txtProvider, "Type the https address of your SMS provider." & vbCrLf & "Replace the message field of the url with ***TEXTMESSAGE***" & vbCrLf & "Replace the recipient field of the url with ***NUMBER***" & vbCrLf & "Ex: https://www.cpsms.dk/sms/?username=myuser&password=mypassword&recipient=***NUMBER***&message=&from=CPSMS")
|
||||
tt.SetToolTip(txtNetBios, "Set NetBios Domain name" & vbCrLf & "Ex: MYDOMAIN")
|
||||
tt.SetToolTip(txtLdapDomain, "Set LDAP Domain" & vbCrLf & "Ex: test.lan")
|
||||
tt.SetToolTip(ckEnableOTP, "Enable SMS Magic.")
|
||||
|
||||
ToolStripStatusLabel1.Text = "Status: " & "Configuration loaded"
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub btnRemoveClient_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs)
|
||||
If ListClients.SelectedIndex > -1 Then
|
||||
|
||||
ListClients.Items.RemoveAt(ListClients.SelectedIndex)
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub btnAddClient_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs)
|
||||
If Not ListClients.Items.Contains(txtClient.Text & " ( " & EncDec.Encrypt(txtSecret.Text, encCode) & " )") Then
|
||||
ListClients.Items.Add(txtClient.Text & " ( " & EncDec.Encrypt(txtSecret.Text, encCode) & " )")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub btnRestart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRestart.Click
|
||||
Dim ok As MsgBoxResult
|
||||
btnRestart.Enabled = False
|
||||
ok = MsgBox("Restart CICRadiusR Service?", MsgBoxStyle.YesNo, "Restart Service")
|
||||
If ok = vbYes Then
|
||||
ToolStripStatusLabel1.Text = "Status: " & "Radius server restarting..."
|
||||
Dim controller As New ServiceController("CICRadiusR")
|
||||
controller.Stop()
|
||||
controller.WaitForStatus(ServiceControllerStatus.Stopped)
|
||||
ToolStripStatusLabel1.Text = "Status: " & "Radius server stopped"
|
||||
controller.Start()
|
||||
controller.WaitForStatus(ServiceControllerStatus.Running)
|
||||
ToolStripStatusLabel1.Text = "Status: " & "Radius server started"
|
||||
MsgBox("CICRadiusR Service restarted", MsgBoxStyle.Information, "Information")
|
||||
End If
|
||||
btnRestart.Enabled = True
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub lvConfig_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles lvConfig.SelectedIndexChanged
|
||||
Dim ele As ListViewItem
|
||||
If lvConfig.SelectedIndices.Count > 0 Then
|
||||
Select lvConfig.SelectedItems(0).Text.ToUpper
|
||||
|
||||
Case "SETUP"
|
||||
PanelSetup.Visible = True
|
||||
PanelActiveDirectory.Visible = False
|
||||
PanelSMSSetup.Visible = False
|
||||
PanelMailSetup.Visible = False
|
||||
PanelRadiusClients.Visible = False
|
||||
Case "ACTIVE DIRECTORY"
|
||||
PanelSetup.Visible = False
|
||||
PanelActiveDirectory.Visible = True
|
||||
PanelSMSSetup.Visible = False
|
||||
PanelMailSetup.Visible = False
|
||||
PanelRadiusClients.Visible = False
|
||||
Case "SMS SETUP"
|
||||
If ckEnableSMS.Checked = True Then
|
||||
PanelSetup.Visible = False
|
||||
PanelActiveDirectory.Visible = False
|
||||
PanelSMSSetup.Visible = True
|
||||
PanelMailSetup.Visible = False
|
||||
PanelRadiusClients.Visible = False
|
||||
End If
|
||||
Case "MAIL SETUP"
|
||||
If ckEnableMail.Checked = True Then
|
||||
PanelSetup.Visible = False
|
||||
PanelActiveDirectory.Visible = False
|
||||
PanelSMSSetup.Visible = False
|
||||
PanelMailSetup.Visible = True
|
||||
PanelRadiusClients.Visible = False
|
||||
End If
|
||||
Case "RADIUS CLIENTS"
|
||||
PanelSetup.Visible = False
|
||||
PanelActiveDirectory.Visible = False
|
||||
PanelSMSSetup.Visible = False
|
||||
PanelMailSetup.Visible = False
|
||||
PanelRadiusClients.Visible = True
|
||||
Panel1.AutoScrollPosition = New Point(0, 130)
|
||||
End Select
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub rbRDGateway_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles rbRDGateway.CheckedChanged
|
||||
If rbRDGateway.Checked = True Then
|
||||
rbCitrixNetscaler.Checked = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub rbCitrixNetscaler_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles rbCitrixNetscaler.CheckedChanged
|
||||
If rbCitrixNetscaler.Checked = True Then
|
||||
rbRDGateway.Checked = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub rbOnlineSMS_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles rbOnlineSMS.CheckedChanged
|
||||
If rbOnlineSMS.Checked = True Then
|
||||
rbLocalSMS.Checked = False
|
||||
txtComPort.Enabled = False
|
||||
txtSMSC.Enabled = False
|
||||
txtProvider.Enabled = True
|
||||
txtSMSC.BackColor = Color.White
|
||||
txtComPort.BackColor = Color.White
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub rbLocalSMS_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles rbLocalSMS.CheckedChanged
|
||||
If rbLocalSMS.Checked = True Then
|
||||
rbOnlineSMS.Checked = False
|
||||
txtComPort.Enabled = True
|
||||
txtSMSC.Enabled = True
|
||||
txtProvider.Enabled = False
|
||||
txtProvider.BackColor = Color.White
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub btnTestModem_Click(sender As System.Object, e As System.EventArgs) Handles btnTestModem.Click
|
||||
Call TestModem()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ckEnableOTP_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles ckEnableOTP.CheckedChanged
|
||||
If ckEnableOTP.Checked = True Then
|
||||
ckEnableMail.Enabled = True
|
||||
ckEnableSMS.Enabled = True
|
||||
'If ckEnableSMS.Checked = True Then
|
||||
' lvConfig.Items.Item(2).ImageIndex = 2
|
||||
'Else
|
||||
' lvConfig.Items.Item(2).ImageIndex = 5
|
||||
'End If
|
||||
'If ckEnableMail.Checked = True Then
|
||||
' lvConfig.Items.Item(3).ImageIndex = 3
|
||||
'Else
|
||||
' lvConfig.Items.Item(3).ImageIndex = 6
|
||||
'End If
|
||||
|
||||
'txtADField.Enabled = True
|
||||
'txtComPort.Enabled = True
|
||||
'txtSMSC.Enabled = True
|
||||
'If rbLocalSMS.Checked = True Then
|
||||
' txtComPort.Enabled = True
|
||||
' txtSMSC.Enabled = True
|
||||
' txtProvider.Enabled = False
|
||||
|
||||
'Else
|
||||
' txtComPort.Enabled = False
|
||||
' txtSMSC.Enabled = False
|
||||
' txtProvider.Enabled = True
|
||||
|
||||
'End If
|
||||
'btnTestModem.Enabled = True
|
||||
Else
|
||||
ckEnableMail.Enabled = False
|
||||
ckEnableSMS.Enabled = False
|
||||
lvConfig.Items.Item(2).ImageIndex = 5
|
||||
lvConfig.Items.Item(3).ImageIndex = 6
|
||||
'txtADField.Enabled = False
|
||||
'txtComPort.Enabled = False
|
||||
'txtSMSC.Enabled = False
|
||||
'txtProvider.Enabled = False
|
||||
'btnTestModem.Enabled = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ckEnableSMS_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles ckEnableSMS.CheckedChanged
|
||||
If ckEnableSMS.Checked = True Then
|
||||
lvConfig.Items.Item(2).ImageIndex = 2
|
||||
TestModemConfigurationToolStripMenuItem.Enabled = True
|
||||
Else
|
||||
TestModemConfigurationToolStripMenuItem.Enabled = False
|
||||
lvConfig.Items.Item(2).ImageIndex = 5
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ckEnableMail_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles ckEnableMail.CheckedChanged
|
||||
If ckEnableMail.Checked = True Then
|
||||
lvConfig.Items.Item(3).ImageIndex = 3
|
||||
TestMailConfigurationToolStripMenuItem.Enabled = True
|
||||
Else
|
||||
lvConfig.Items.Item(3).ImageIndex = 6
|
||||
TestMailConfigurationToolStripMenuItem.Enabled = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub SaveConfigurationToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles SaveConfigurationToolStripMenuItem.Click
|
||||
Call save()
|
||||
End Sub
|
||||
|
||||
Private Sub RestartRadiusServerToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles RestartRadiusServerToolStripMenuItem.Click
|
||||
Dim ok As MsgBoxResult
|
||||
RestartRadiusServerToolStripMenuItem.Enabled = False
|
||||
ok = MsgBox("Restart CICRadiusR Service?", MsgBoxStyle.YesNo + MsgBoxStyle.Information, "Restart Service")
|
||||
If ok = vbYes Then
|
||||
|
||||
Dim controller As New ServiceController("CICRadiusR")
|
||||
controller.Stop()
|
||||
controller.WaitForStatus(ServiceControllerStatus.Stopped)
|
||||
controller.Start()
|
||||
controller.WaitForStatus(ServiceControllerStatus.Running)
|
||||
MsgBox("CICRadiusR Service restarted", MsgBoxStyle.Information, "Information")
|
||||
End If
|
||||
RestartRadiusServerToolStripMenuItem.Enabled = True
|
||||
End Sub
|
||||
|
||||
Sub Save()
|
||||
ConfigFile.SetKeyValue("CICRadarR", "NetBiosDomain", txtNetBios.Text)
|
||||
ConfigFile.SetKeyValue("CICRadarR", "LDAPDomain", txtLdapDomain.Text)
|
||||
ConfigFile.SetKeyValue("CICRadarR", "Provider", txtProvider.Text)
|
||||
ConfigFile.SetKeyValue("CICRadarR", "ADField", txtADField.Text)
|
||||
ConfigFile.SetKeyValue("CICRadarR", "ADMailField", txtADMailField.Text)
|
||||
|
||||
ConfigFile.SetKeyValue("CICRadarR", "SenderEmail", txtSenderEmail.Text)
|
||||
ConfigFile.SetKeyValue("CICRadarR", "MailServer", txtMailServer.Text)
|
||||
|
||||
If rbLocalSMS.Checked = True Then
|
||||
ConfigFile.SetKeyValue("CICRadarR", "USELOCALMODEM", "1")
|
||||
Else
|
||||
ConfigFile.SetKeyValue("CICRadarR", "USELOCALMODEM", "0")
|
||||
End If
|
||||
|
||||
ConfigFile.SetKeyValue("CICRadarR", "COMPORT", txtComPort.Text)
|
||||
ConfigFile.SetKeyValue("CICRadarR", "SMSC", txtSMSC.Text)
|
||||
|
||||
If ckDebug.Checked = True Then
|
||||
ConfigFile.SetKeyValue("CICRadarR", "Debug", "1")
|
||||
Else
|
||||
ConfigFile.SetKeyValue("CICRadarR", "Debug", "0")
|
||||
End If
|
||||
|
||||
If ckEnableOTP.Checked = True Then
|
||||
ConfigFile.SetKeyValue("CICRadarR", "EnableOTP", "1")
|
||||
Else
|
||||
ConfigFile.SetKeyValue("CICRadarR", "EnableOTP", "0")
|
||||
End If
|
||||
|
||||
If rbRDGateway.Checked = True Then
|
||||
ConfigFile.SetKeyValue("CICRadarR", "TSGW", "1")
|
||||
Else
|
||||
ConfigFile.SetKeyValue("CICRadarR", "TSGW", "0")
|
||||
End If
|
||||
|
||||
If ckEnableMail.Checked = True Then
|
||||
ConfigFile.SetKeyValue("CICRadarR", "EnableEmail", "1")
|
||||
Else
|
||||
ConfigFile.SetKeyValue("CICRadarR", "EnableEmail", "0")
|
||||
End If
|
||||
|
||||
If ckEnableSMS.Checked = True Then
|
||||
ConfigFile.SetKeyValue("CICRadarR", "EnableSMS", "1")
|
||||
Else
|
||||
ConfigFile.SetKeyValue("CICRadarR", "EnableSMS", "0")
|
||||
End If
|
||||
ConfigFile.RemoveSection("Clients")
|
||||
Dim ClientList As String = ""
|
||||
For i As Integer = 0 To ListClients.Items.Count - 1
|
||||
Dim Client As String
|
||||
Dim Secret As String
|
||||
Client = Split(ListClients.Items(i), " ( ")(0)
|
||||
Secret = Replace(Split(ListClients.Items(i), " ( ")(1), " )", "")
|
||||
ConfigFile.SetKeyValue("Clients", Client, Secret)
|
||||
|
||||
If i = ListClients.Items.Count - 1 Then
|
||||
ClientList = ClientList & Client
|
||||
Else
|
||||
ClientList = ClientList & Client & ","
|
||||
End If
|
||||
|
||||
Next
|
||||
ConfigFile.SetKeyValue("CICRadarR", "ClientList", ClientList)
|
||||
|
||||
|
||||
ConfigFile.Save(Application.StartupPath & "\CICRadarR.ini")
|
||||
End Sub
|
||||
|
||||
Private Sub ExitToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles ExitToolStripMenuItem.Click
|
||||
|
||||
Select Case MsgBox("Save configuration before exit?", MsgBoxStyle.YesNoCancel + MsgBoxStyle.Information, "Configuration")
|
||||
Case vbYes
|
||||
Call Save()
|
||||
ToolStripStatusLabel1.Text = "Status: " & "Configuration saved"
|
||||
MsgBox("Configuration saved", vbOKOnly + MsgBoxStyle.Information, "Configuration")
|
||||
End
|
||||
Case vbNo
|
||||
End
|
||||
Case vbCancel
|
||||
End Select
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub AboutToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles AboutToolStripMenuItem.Click
|
||||
MsgBox("Configuration tool for CICRadar." & vbCrLf & vbCrLf & "Version 1.1", MsgBoxStyle.OkOnly + MsgBoxStyle.Information, "About")
|
||||
End Sub
|
||||
|
||||
Sub TestModem()
|
||||
Dim number As String
|
||||
number = InputBox("Type the phone number to send the test sms to" & vbCrLf & vbCrLf & "Ex: +4512345678", "Phone Number", "", Me.Left + 150, Me.Top + 100)
|
||||
If rbLocalSMS.Checked = True Then
|
||||
Dim testsms As New SmsClass(txtComPort.Text)
|
||||
testsms.Opens()
|
||||
testsms.sendSms(number, "Test SMS Service", txtSMSC.Text)
|
||||
testsms.Closes()
|
||||
Else
|
||||
Dim baseurl As String = txtProvider.Text.Split("?")(0)
|
||||
Dim client As New System.Net.WebClient()
|
||||
' Add a user agent header in case the requested URI contains a query.
|
||||
|
||||
client.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR1.0.3705;)")
|
||||
|
||||
Dim parameters As String = txtProvider.Text.Split("?")(1)
|
||||
Dim pary As String() = parameters.Split("&")
|
||||
|
||||
For i As Integer = 0 To pary.Length - 1
|
||||
If pary(i).IndexOf("***TEXTMESSAGE***") > 0 Then
|
||||
Dim qpar As String() = pary(i).Split("=")
|
||||
client.QueryString.Add(qpar(0), "Test SMS Service")
|
||||
ElseIf pary(i).IndexOf("***NUMBER***") > 0 Then
|
||||
Dim qpar As String() = pary(i).Split("=")
|
||||
client.QueryString.Add(qpar(0), number)
|
||||
Else
|
||||
|
||||
Dim qpar As String() = pary(i).Split("=")
|
||||
client.QueryString.Add(qpar(0), qpar(1))
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
Dim data As Stream = client.OpenRead(baseurl)
|
||||
Dim reader As New StreamReader(data)
|
||||
Dim s As String = reader.ReadToEnd()
|
||||
data.Close()
|
||||
reader.Close()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Sub TestEmail()
|
||||
Dim email As String
|
||||
email = InputBox("Type the email address to send the test email to" & vbCrLf & vbCrLf & "Ex: test@my.mail.com", "Email", "", Me.Left + 150, Me.Top + 100)
|
||||
Dim mail As New MailMessage()
|
||||
mail.To.Add(email)
|
||||
mail.From = New MailAddress(txtSenderEmail.Text)
|
||||
mail.Subject = "Test mail from CICRadar"
|
||||
mail.Body = "Just a test."
|
||||
mail.IsBodyHtml = False
|
||||
Dim smtp As New SmtpClient(txtMailServer.Text)
|
||||
|
||||
|
||||
Try
|
||||
smtp.Send(mail)
|
||||
|
||||
ToolStripStatusLabel1.Text = "Status: Mail send"
|
||||
Catch e As InvalidCastException
|
||||
|
||||
ToolStripStatusLabel1.Text = "Status: Failed to send mail"
|
||||
End Try
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub TestModemConfigurationToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles TestModemConfigurationToolStripMenuItem.Click
|
||||
Call TestModem()
|
||||
End Sub
|
||||
|
||||
Private Sub TestMailConfigurationToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles TestMailConfigurationToolStripMenuItem.Click
|
||||
Call TestEmail()
|
||||
End Sub
|
||||
|
||||
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
|
||||
Call TestEmail()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub btnRemoveClient_Click(sender As System.Object, e As System.EventArgs) Handles btnRemoveClient.Click
|
||||
If ListClients.SelectedIndex > -1 Then
|
||||
|
||||
ListClients.Items.RemoveAt(ListClients.SelectedIndex)
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub btnAddClient_Click(sender As System.Object, e As System.EventArgs) Handles btnAddClient.Click
|
||||
If Not ListClients.Items.Contains(txtClient.Text & " ( " & EncDec.Encrypt(txtSecret.Text, encCode) & " )") Then
|
||||
ListClients.Items.Add(txtClient.Text & " ( " & EncDec.Encrypt(txtSecret.Text, encCode) & " )")
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
38
Console/CICRadarRConfig/CICRadarRConfig/My Project/Application.Designer.vb
generated
Normal file
38
Console/CICRadarRConfig/CICRadarRConfig/My Project/Application.Designer.vb
generated
Normal file
|
@ -0,0 +1,38 @@
|
|||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.1008
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
'NOTE: This file is auto-generated; do not modify it directly. To make changes,
|
||||
' or if you encounter build errors in this file, go to the Project Designer
|
||||
' (go to Project Properties or double-click the My Project node in
|
||||
' Solution Explorer), and make changes on the Application tab.
|
||||
'
|
||||
Partial Friend Class MyApplication
|
||||
|
||||
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||
Public Sub New()
|
||||
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
|
||||
Me.IsSingleInstance = false
|
||||
Me.EnableVisualStyles = true
|
||||
Me.SaveMySettingsOnExit = true
|
||||
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||
Protected Overrides Sub OnCreateMainForm()
|
||||
Me.MainForm = Global.CICRadarRConfig.CICRadiusRConfig
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-16"?>
|
||||
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<MySubMain>true</MySubMain>
|
||||
<MainForm>CICRadiusRConfig</MainForm>
|
||||
<SingleInstance>false</SingleInstance>
|
||||
<ShutdownMode>0</ShutdownMode>
|
||||
<EnableVisualStyles>true</EnableVisualStyles>
|
||||
<AuthenticationMode>0</AuthenticationMode>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
|
@ -0,0 +1,35 @@
|
|||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports 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.
|
||||
|
||||
' Review the values of the assembly attributes
|
||||
|
||||
<Assembly: AssemblyTitle("CICRadarRConfig")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("Microsoft")>
|
||||
<Assembly: AssemblyProduct("CICRadarRConfig")>
|
||||
<Assembly: AssemblyCopyright("Copyright © Microsoft 2012")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
'The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
<Assembly: Guid("f0feb00f-1171-4cdf-b5d1-30cc01b75624")>
|
||||
|
||||
' 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.0.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
63
Console/CICRadarRConfig/CICRadarRConfig/My Project/Resources.Designer.vb
generated
Normal file
63
Console/CICRadarRConfig/CICRadarRConfig/My Project/Resources.Designer.vb
generated
Normal file
|
@ -0,0 +1,63 @@
|
|||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.1008
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports System
|
||||
|
||||
Namespace My.Resources
|
||||
|
||||
'This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
'class via a tool like ResGen or Visual Studio.
|
||||
'To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
'with the /str option, or rebuild your VS project.
|
||||
'''<summary>
|
||||
''' A strongly-typed resource class, for looking up localized strings, etc.
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||
Friend Module Resources
|
||||
|
||||
Private resourceMan As Global.System.Resources.ResourceManager
|
||||
|
||||
Private resourceCulture As Global.System.Globalization.CultureInfo
|
||||
|
||||
'''<summary>
|
||||
''' Returns the cached ResourceManager instance used by this class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
||||
Get
|
||||
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
||||
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("CICRadarRConfig.Resources", GetType(Resources).Assembly)
|
||||
resourceMan = temp
|
||||
End If
|
||||
Return resourceMan
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Overrides the current thread's CurrentUICulture property for all
|
||||
''' resource lookups using this strongly typed resource class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
|
@ -0,0 +1,117 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
73
Console/CICRadarRConfig/CICRadarRConfig/My Project/Settings.Designer.vb
generated
Normal file
73
Console/CICRadarRConfig/CICRadarRConfig/My Project/Settings.Designer.vb
generated
Normal file
|
@ -0,0 +1,73 @@
|
|||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.1008
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
|
||||
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
|
||||
|
||||
#Region "My.Settings Auto-Save Functionality"
|
||||
#If _MyType = "WindowsForms" Then
|
||||
Private Shared addedHandler As Boolean
|
||||
|
||||
Private Shared addedHandlerLockObject As New Object
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
|
||||
If My.Application.SaveMySettingsOnExit Then
|
||||
My.Settings.Save()
|
||||
End If
|
||||
End Sub
|
||||
#End If
|
||||
#End Region
|
||||
|
||||
Public Shared ReadOnly Property [Default]() As MySettings
|
||||
Get
|
||||
|
||||
#If _MyType = "WindowsForms" Then
|
||||
If Not addedHandler Then
|
||||
SyncLock addedHandlerLockObject
|
||||
If Not addedHandler Then
|
||||
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||
addedHandler = True
|
||||
End If
|
||||
End SyncLock
|
||||
End If
|
||||
#End If
|
||||
Return defaultInstance
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
|
||||
Friend Module MySettingsProperty
|
||||
|
||||
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||
Friend ReadOnly Property Settings() As Global.CICRadarRConfig.My.MySettings
|
||||
Get
|
||||
Return Global.CICRadarRConfig.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
66
Console/CICRadarRConfig/CICRadarRConfig/SmsClass.vb
Normal file
66
Console/CICRadarRConfig/CICRadarRConfig/SmsClass.vb
Normal file
|
@ -0,0 +1,66 @@
|
|||
Imports System
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Text
|
||||
Imports System.Threading
|
||||
Imports System.IO.Ports
|
||||
Imports System.Windows.Forms
|
||||
Namespace SMS
|
||||
Class SmsClass
|
||||
Private serialPort As SerialPort
|
||||
Public Sub New(ByVal comPort As String)
|
||||
Me.serialPort = New SerialPort()
|
||||
Me.serialPort.PortName = comPort
|
||||
Me.serialPort.BaudRate = 38400
|
||||
Me.serialPort.Parity = Parity.None
|
||||
Me.serialPort.DataBits = 8
|
||||
Me.serialPort.StopBits = StopBits.One
|
||||
Me.serialPort.Handshake = Handshake.RequestToSend
|
||||
Me.serialPort.DtrEnable = True
|
||||
Me.serialPort.RtsEnable = True
|
||||
Me.serialPort.NewLine = System.Environment.NewLine
|
||||
End Sub
|
||||
Public Function sendSms(ByVal cellNo As String, ByVal sms As String, ByVal SMSC As String) As Boolean
|
||||
Dim messages As String = Nothing
|
||||
messages = sms
|
||||
If Me.serialPort.IsOpen = True Then
|
||||
Try
|
||||
Me.serialPort.WriteLine("AT" + Chr(13))
|
||||
Thread.Sleep(4)
|
||||
Me.serialPort.WriteLine("AT+CSCA=""" + SMSC + """" + Chr(13))
|
||||
Thread.Sleep(30)
|
||||
Me.serialPort.WriteLine(Chr(13))
|
||||
Thread.Sleep(30)
|
||||
Me.serialPort.WriteLine("AT+CMGS=""" + cellNo + """")
|
||||
|
||||
Thread.Sleep(30)
|
||||
Me.serialPort.WriteLine(messages + Chr(26))
|
||||
Catch ex As Exception
|
||||
MessageBox.Show(ex.Source)
|
||||
End Try
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Sub Opens()
|
||||
|
||||
If Me.serialPort.IsOpen = False Then
|
||||
Try
|
||||
'bool ok =this.serialPort.IsOpen //does not work between 2 treads
|
||||
|
||||
Me.serialPort.Open()
|
||||
Catch
|
||||
Thread.Sleep(1000)
|
||||
'wait for the port to get ready if
|
||||
Opens()
|
||||
End Try
|
||||
End If
|
||||
End Sub
|
||||
Public Sub Closes()
|
||||
If Me.serialPort.IsOpen = True Then
|
||||
Me.serialPort.Close()
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
23
Console/CICRadarRConfig/CICRadarRConfig/app.config
Normal file
23
Console/CICRadarRConfig/CICRadarRConfig/app.config
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<system.diagnostics>
|
||||
<sources>
|
||||
<!-- This section defines the logging configuration for My.Application.Log -->
|
||||
<source name="DefaultSource" switchName="DefaultSwitch">
|
||||
<listeners>
|
||||
<add name="FileLog"/>
|
||||
<!-- Uncomment the below section to write to the Application Event Log -->
|
||||
<!--<add name="EventLog"/>-->
|
||||
</listeners>
|
||||
</source>
|
||||
</sources>
|
||||
<switches>
|
||||
<add name="DefaultSwitch" value="Information"/>
|
||||
</switches>
|
||||
<sharedListeners>
|
||||
<add name="FileLog" type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" initializeData="FileLogWriter"/>
|
||||
<!-- Uncomment the below section and replace APPLICATION_NAME with the name of your application to write to the Application Event Log -->
|
||||
<!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> -->
|
||||
</sharedListeners>
|
||||
</system.diagnostics>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
|
|
@ -0,0 +1,24 @@
|
|||
[CICRadarR]
|
||||
ClientList=10.10.10.47,192.168.1.139,192.168.1.101,192.168.1.61,192.168.1.44,188.244.24.22
|
||||
SenderEmail=noreply2@isager.dk
|
||||
EnableOTP=1
|
||||
Provider=https://www.cpsms.dk/sms/?username=myuser&password=mypassword&recipient=***NUMBER***&message=***TEXTMESSAGE***&from=CPSMS
|
||||
Debug=0
|
||||
EnableSMS=1
|
||||
ADField=telephoneNumber
|
||||
NetBiosDomain=isager
|
||||
TSGW=1
|
||||
LDAPDomain=isager.lan
|
||||
EnableEmail=1
|
||||
USELOCALMODEM=0
|
||||
SMSC=+4540390999
|
||||
COMPORT=com1
|
||||
MailServer=192.168.1.25
|
||||
ADMailfield=mail
|
||||
[Clients]
|
||||
188.244.24.22=/pkahxdoI69d+omeup3YZA==
|
||||
192.168.1.139=eXA0YJxFrgfaDtOFApCifbPtJYrEL0RjpDzymPKlw6c=
|
||||
10.10.10.47=iirseiKUQCWnjfg1ZLhF+w==
|
||||
192.168.1.101=eXA0YJxFrgfaDtOFApCifbPtJYrEL0RjpDzymPKlw6c=
|
||||
192.168.1.61=p2fyLMddDfH8aLYwMyDbhQ1l3MY9hAJxx6DyiUOhjXw=
|
||||
192.168.1.44=eXA0YJxFrgfaDtOFApCifbPtJYrEL0RjpDzymPKlw6c=
|
Binary file not shown.
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<system.diagnostics>
|
||||
<sources>
|
||||
<!-- This section defines the logging configuration for My.Application.Log -->
|
||||
<source name="DefaultSource" switchName="DefaultSwitch">
|
||||
<listeners>
|
||||
<add name="FileLog"/>
|
||||
<!-- Uncomment the below section to write to the Application Event Log -->
|
||||
<!--<add name="EventLog"/>-->
|
||||
</listeners>
|
||||
</source>
|
||||
</sources>
|
||||
<switches>
|
||||
<add name="DefaultSwitch" value="Information"/>
|
||||
</switches>
|
||||
<sharedListeners>
|
||||
<add name="FileLog" type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" initializeData="FileLogWriter"/>
|
||||
<!-- Uncomment the below section and replace APPLICATION_NAME with the name of your application to write to the Application Event Log -->
|
||||
<!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> -->
|
||||
</sharedListeners>
|
||||
</system.diagnostics>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<system.diagnostics>
|
||||
<sources>
|
||||
<!-- This section defines the logging configuration for My.Application.Log -->
|
||||
<source name="DefaultSource" switchName="DefaultSwitch">
|
||||
<listeners>
|
||||
<add name="FileLog"/>
|
||||
<!-- Uncomment the below section to write to the Application Event Log -->
|
||||
<!--<add name="EventLog"/>-->
|
||||
</listeners>
|
||||
</source>
|
||||
</sources>
|
||||
<switches>
|
||||
<add name="DefaultSwitch" value="Information"/>
|
||||
</switches>
|
||||
<sharedListeners>
|
||||
<add name="FileLog" type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" initializeData="FileLogWriter"/>
|
||||
<!-- Uncomment the below section and replace APPLICATION_NAME with the name of your application to write to the Application Event Log -->
|
||||
<!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> -->
|
||||
</sharedListeners>
|
||||
</system.diagnostics>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>
|
||||
CICRadarRConfig
|
||||
</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="P:CICRadarRConfig.My.Resources.Resources.ResourceManager">
|
||||
<summary>
|
||||
Returns the cached ResourceManager instance used by this class.
|
||||
</summary>
|
||||
</member><member name="P:CICRadarRConfig.My.Resources.Resources.Culture">
|
||||
<summary>
|
||||
Overrides the current thread's CurrentUICulture property for all
|
||||
resource lookups using this strongly typed resource class.
|
||||
</summary>
|
||||
</member><member name="T:CICRadarRConfig.My.Resources.Resources">
|
||||
<summary>
|
||||
A strongly-typed resource class, for looking up localized strings, etc.
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>
|
||||
CICRadarRConfig
|
||||
</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="P:CICRadarRConfig.My.Resources.Resources.ResourceManager">
|
||||
<summary>
|
||||
Returns the cached ResourceManager instance used by this class.
|
||||
</summary>
|
||||
</member><member name="P:CICRadarRConfig.My.Resources.Resources.Culture">
|
||||
<summary>
|
||||
Overrides the current thread's CurrentUICulture property for all
|
||||
resource lookups using this strongly typed resource class.
|
||||
</summary>
|
||||
</member><member name="T:CICRadarRConfig.My.Resources.Resources">
|
||||
<summary>
|
||||
A strongly-typed resource class, for looking up localized strings, etc.
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
BIN
Console/CICRadarRConfig/CICRadarRConfig/lock.ico
Normal file
BIN
Console/CICRadarRConfig/CICRadarRConfig/lock.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,12 @@
|
|||
C:\CICRadarR\Console\CICRadarRConfig\CICRadarRConfig\bin\Debug\CICRadarRConfig.exe
|
||||
C:\CICRadarR\Console\CICRadarRConfig\CICRadarRConfig\bin\Debug\CICRadarRConfig.pdb
|
||||
C:\CICRadarR\Console\CICRadarRConfig\CICRadarRConfig\bin\Debug\CICRadarRConfig.xml
|
||||
C:\CICRadarR\Console\CICRadarRConfig\CICRadarRConfig\obj\x86\Debug\ResolveAssemblyReference.cache
|
||||
C:\CICRadarR\Console\CICRadarRConfig\CICRadarRConfig\obj\x86\Debug\CICRadarRConfig.CICRadiusRConfig.resources
|
||||
C:\CICRadarR\Console\CICRadarRConfig\CICRadarRConfig\obj\x86\Debug\CICRadarRConfig.Resources.resources
|
||||
C:\CICRadarR\Console\CICRadarRConfig\CICRadarRConfig\obj\x86\Debug\GenerateResource.read.1.tlog
|
||||
C:\CICRadarR\Console\CICRadarRConfig\CICRadarRConfig\obj\x86\Debug\GenerateResource.write.1.tlog
|
||||
C:\CICRadarR\Console\CICRadarRConfig\CICRadarRConfig\obj\x86\Debug\CICRadarRConfig.exe
|
||||
C:\CICRadarR\Console\CICRadarRConfig\CICRadarRConfig\obj\x86\Debug\CICRadarRConfig.xml
|
||||
C:\CICRadarR\Console\CICRadarRConfig\CICRadarRConfig\obj\x86\Debug\CICRadarRConfig.pdb
|
||||
C:\CICRadarR\Console\CICRadarRConfig\CICRadarRConfig\bin\Debug\CICRadarRConfig.exe.config
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>
|
||||
CICRadarRConfig
|
||||
</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="P:CICRadarRConfig.My.Resources.Resources.ResourceManager">
|
||||
<summary>
|
||||
Returns the cached ResourceManager instance used by this class.
|
||||
</summary>
|
||||
</member><member name="P:CICRadarRConfig.My.Resources.Resources.Culture">
|
||||
<summary>
|
||||
Overrides the current thread's CurrentUICulture property for all
|
||||
resource lookups using this strongly typed resource class.
|
||||
</summary>
|
||||
</member><member name="T:CICRadarRConfig.My.Resources.Resources">
|
||||
<summary>
|
||||
A strongly-typed resource class, for looking up localized strings, etc.
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,11 @@
|
|||
C:\CICRadarR\Console\CICRadarRConfig\CICRadarRConfig\bin\Release\CICRadarRConfig.exe
|
||||
C:\CICRadarR\Console\CICRadarRConfig\CICRadarRConfig\bin\Release\CICRadarRConfig.pdb
|
||||
C:\CICRadarR\Console\CICRadarRConfig\CICRadarRConfig\bin\Release\CICRadarRConfig.xml
|
||||
C:\CICRadarR\Console\CICRadarRConfig\CICRadarRConfig\obj\x86\Release\ResolveAssemblyReference.cache
|
||||
C:\CICRadarR\Console\CICRadarRConfig\CICRadarRConfig\obj\x86\Release\CICRadarRConfig.CICRadiusRConfig.resources
|
||||
C:\CICRadarR\Console\CICRadarRConfig\CICRadarRConfig\obj\x86\Release\CICRadarRConfig.Resources.resources
|
||||
C:\CICRadarR\Console\CICRadarRConfig\CICRadarRConfig\obj\x86\Release\GenerateResource.read.1.tlog
|
||||
C:\CICRadarR\Console\CICRadarRConfig\CICRadarRConfig\obj\x86\Release\GenerateResource.write.1.tlog
|
||||
C:\CICRadarR\Console\CICRadarRConfig\CICRadarRConfig\obj\x86\Release\CICRadarRConfig.exe
|
||||
C:\CICRadarR\Console\CICRadarRConfig\CICRadarRConfig\obj\x86\Release\CICRadarRConfig.xml
|
||||
C:\CICRadarR\Console\CICRadarRConfig\CICRadarRConfig\obj\x86\Release\CICRadarRConfig.pdb
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>
|
||||
CICRadarRConfig
|
||||
</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="P:CICRadarRConfig.My.Resources.Resources.ResourceManager">
|
||||
<summary>
|
||||
Returns the cached ResourceManager instance used by this class.
|
||||
</summary>
|
||||
</member><member name="P:CICRadarRConfig.My.Resources.Resources.Culture">
|
||||
<summary>
|
||||
Overrides the current thread's CurrentUICulture property for all
|
||||
resource lookups using this strongly typed resource class.
|
||||
</summary>
|
||||
</member><member name="T:CICRadarRConfig.My.Resources.Resources">
|
||||
<summary>
|
||||
A strongly-typed resource class, for looking up localized strings, etc.
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue