├── .gitattributes ├── .github ├── FUNDING.yml └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── .gitignore ├── Be.Windows.Forms.HexBox ├── AssemblyInfo.cs ├── Be.Windows.Forms.HexBox.csproj ├── Be.Windows.Forms.HexBox.xml ├── BuiltInContextMenu.cs ├── ByteCharConverters.cs ├── ByteCollection.cs ├── BytePositionInfo.cs ├── DataBlock.cs ├── DataMap.cs ├── DynamicByteProvider.cs ├── DynamicFileByteProvider.cs ├── FileByteProvider.cs ├── FileDataBlock.cs ├── FindOptions.cs ├── HexBox.bmp ├── HexBox.cs ├── HexBox.resx ├── HexBox.snk ├── HexCasing.cs ├── Highlight.cs ├── HighlightCollection.cs ├── IByteProvider.cs ├── MemoryDataBlock.cs ├── NativeMethods.cs ├── Properties │ ├── Resources.Designer.cs │ └── Resources.resx ├── Util.cs └── license.txt ├── CHANGELOG.md ├── ChameleonMiniGUI.sln ├── ChameleonMiniGUI ├── App.config ├── Attacks │ └── MfKeyAttacks.cs ├── ChameleonMiniGUI.csproj ├── Communications │ └── Command.cs ├── Comparers │ └── KeyComparer.cs ├── Crc │ └── Crc.cs ├── Dump │ ├── BinaryDumpStrategy.cs │ ├── DumpFileByteProvider.cs │ ├── DumpStrategy.cs │ ├── DumpStrategyFactory.cs │ ├── DumpType.cs │ ├── EmlDumpStrategy.cs │ ├── JsonDumpStrategy.cs │ └── MctDumpStrategy.cs ├── Extras │ ├── BOOT_LOADER_EXE.exe │ ├── Chameleon-RevG.eep │ ├── Chameleon-RevG.hex │ ├── avrdude.conf │ ├── avrdude.exe │ ├── myfile.bin │ └── myfilee.bin ├── FrmMain.Designer.cs ├── FrmMain.cs ├── FrmMain.resx ├── GroupBoxEnhanced.cs ├── Json │ ├── BlockSurrogate.cs │ ├── MifareCardInfo.cs │ ├── MifareClassicCardInfo.cs │ ├── MifareClassicModel.cs │ ├── MifareClassicSectorKey.cs │ ├── MifareDataContractResolver.cs │ ├── MifareModel.cs │ ├── MifareUltralightCardInfo.cs │ └── MifareUltralightModel.cs ├── Languages │ ├── Chinese.txt │ ├── Dutch.txt │ ├── English.txt │ ├── Français.txt │ ├── German.txt │ ├── Greek.txt │ ├── Italiano.txt │ ├── Spanish.txt │ └── Svenska.txt ├── Legend │ ├── IlegendItem.cs │ ├── Legend.cs │ ├── UcLegend.Designer.cs │ ├── UcLegend.cs │ └── UcLegend.resx ├── Log │ ├── LogEntryType.cs │ └── LogEntryUtils.cs ├── MultiLanguage.cs ├── Program.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ ├── Settings.settings │ └── app.manifest ├── Resources │ ├── cdrom.ico │ ├── chamRevE.png │ ├── chamRevG1.png │ ├── chameleon.png │ ├── folder-close.ico │ ├── folder-open.ico │ ├── hard-drive.ico │ ├── network-drive.ico │ ├── usb-warning.jpg │ └── warning.png ├── SplashScreen.Designer.cs ├── SplashScreen.cs ├── SplashScreen.resx ├── SuspendUpdate.cs ├── Templates │ ├── MIfare-S20-320b-Black.txt │ ├── MIfare-S20-320b.txt │ ├── MIfare-S50-1k-Black.txt │ ├── MIfare-S50-1k.txt │ ├── Ultralight-EV1-164B-Black.txt │ ├── Ultralight-EV1-164B.txt │ └── iClass-Black.txt ├── Templating.cs ├── ThreadHelperClass.cs ├── UserControls │ ├── UcExplorer.Designer.cs │ ├── UcExplorer.cs │ ├── UcExplorer.resx │ ├── UcTextFlow.Designer.cs │ ├── UcTextFlow.cs │ └── UcTextFlow.resx ├── XMODEM.cs ├── chameleon.ico └── packages.config ├── ChameleonTest ├── ChameleonTest.sln └── ChameleonTest │ ├── ChameleonTest.csproj │ ├── ChameleonUnitTest.cs │ ├── Properties │ └── AssemblyInfo.cs │ └── packages.config ├── LICENSE ├── README.md └── appveyor.yml /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: iceman1001 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: ["https://www.paypal.me/iceman1001"] 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug, help wanted 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.suo 8 | *.user 9 | *.userosscache 10 | *.sln.docstates 11 | 12 | # User-specific files (MonoDevelop/Xamarin Studio) 13 | *.userprefs 14 | 15 | # Build results 16 | [Dd]ebug/ 17 | [Dd]ebugPublic/ 18 | [Rr]elease/ 19 | [Rr]eleases/ 20 | x64/ 21 | x86/ 22 | bld/ 23 | [Bb]in/ 24 | [Oo]bj/ 25 | [Ll]og/ 26 | 27 | # Visual Studio 2015 cache/options directory 28 | .vs/ 29 | # Uncomment if you have tasks that create the project's static files in wwwroot 30 | #wwwroot/ 31 | 32 | # MSTest test Results 33 | [Tt]est[Rr]esult*/ 34 | [Bb]uild[Ll]og.* 35 | 36 | # NUNIT 37 | *.VisualState.xml 38 | TestResult.xml 39 | 40 | # Build Results of an ATL Project 41 | [Dd]ebugPS/ 42 | [Rr]eleasePS/ 43 | dlldata.c 44 | 45 | # .NET Core 46 | project.lock.json 47 | project.fragment.lock.json 48 | artifacts/ 49 | **/Properties/launchSettings.json 50 | 51 | *_i.c 52 | *_p.c 53 | *_i.h 54 | *.ilk 55 | *.meta 56 | *.obj 57 | *.pch 58 | *.pdb 59 | *.pgc 60 | *.pgd 61 | *.rsp 62 | *.sbr 63 | *.tlb 64 | *.tli 65 | *.tlh 66 | *.tmp 67 | *.tmp_proj 68 | *.log 69 | *.vspscc 70 | *.vssscc 71 | .builds 72 | *.pidb 73 | *.svclog 74 | *.scc 75 | 76 | # Chutzpah Test files 77 | _Chutzpah* 78 | 79 | # Visual C++ cache files 80 | ipch/ 81 | *.aps 82 | *.ncb 83 | *.opendb 84 | *.opensdf 85 | *.sdf 86 | *.cachefile 87 | *.VC.db 88 | *.VC.VC.opendb 89 | 90 | # Visual Studio profiler 91 | *.psess 92 | *.vsp 93 | *.vspx 94 | *.sap 95 | 96 | # TFS 2012 Local Workspace 97 | $tf/ 98 | 99 | # Guidance Automation Toolkit 100 | *.gpState 101 | 102 | # ReSharper is a .NET coding add-in 103 | _ReSharper*/ 104 | *.[Rr]e[Ss]harper 105 | *.DotSettings.user 106 | 107 | # JustCode is a .NET coding add-in 108 | .JustCode 109 | 110 | # TeamCity is a build add-in 111 | _TeamCity* 112 | 113 | # DotCover is a Code Coverage Tool 114 | *.dotCover 115 | 116 | # Visual Studio code coverage results 117 | *.coverage 118 | *.coveragexml 119 | 120 | # NCrunch 121 | _NCrunch_* 122 | .*crunch*.local.xml 123 | nCrunchTemp_* 124 | 125 | # MightyMoose 126 | *.mm.* 127 | AutoTest.Net/ 128 | 129 | # Web workbench (sass) 130 | .sass-cache/ 131 | 132 | # Installshield output folder 133 | [Ee]xpress/ 134 | 135 | # DocProject is a documentation generator add-in 136 | DocProject/buildhelp/ 137 | DocProject/Help/*.HxT 138 | DocProject/Help/*.HxC 139 | DocProject/Help/*.hhc 140 | DocProject/Help/*.hhk 141 | DocProject/Help/*.hhp 142 | DocProject/Help/Html2 143 | DocProject/Help/html 144 | 145 | # Click-Once directory 146 | publish/ 147 | 148 | # Publish Web Output 149 | *.[Pp]ublish.xml 150 | *.azurePubxml 151 | # TODO: Comment the next line if you want to checkin your web deploy settings 152 | # but database connection strings (with potential passwords) will be unencrypted 153 | *.pubxml 154 | *.publishproj 155 | 156 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 157 | # checkin your Azure Web App publish settings, but sensitive information contained 158 | # in these scripts will be unencrypted 159 | PublishScripts/ 160 | 161 | # NuGet Packages 162 | *.nupkg 163 | # The packages folder can be ignored because of Package Restore 164 | **/packages/* 165 | # except build/, which is used as an MSBuild target. 166 | !**/packages/build/ 167 | # Uncomment if necessary however generally it will be regenerated when needed 168 | #!**/packages/repositories.config 169 | # NuGet v3's project.json files produces more ignorable files 170 | *.nuget.props 171 | *.nuget.targets 172 | 173 | # Microsoft Azure Build Output 174 | csx/ 175 | *.build.csdef 176 | 177 | # Microsoft Azure Emulator 178 | ecf/ 179 | rcf/ 180 | 181 | # Windows Store app package directories and files 182 | AppPackages/ 183 | BundleArtifacts/ 184 | Package.StoreAssociation.xml 185 | _pkginfo.txt 186 | 187 | # Visual Studio cache files 188 | # files ending in .cache can be ignored 189 | *.[Cc]ache 190 | # but keep track of directories ending in .cache 191 | !*.[Cc]ache/ 192 | 193 | # Others 194 | ClientBin/ 195 | ~$* 196 | *~ 197 | *.dbmdl 198 | *.dbproj.schemaview 199 | *.jfm 200 | *.pfx 201 | *.publishsettings 202 | orleans.codegen.cs 203 | 204 | # Since there are multiple workflows, uncomment next line to ignore bower_components 205 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 206 | #bower_components/ 207 | 208 | # RIA/Silverlight projects 209 | Generated_Code/ 210 | 211 | # Backup & report files from converting an old project file 212 | # to a newer Visual Studio version. Backup files are not needed, 213 | # because we have git ;-) 214 | _UpgradeReport_Files/ 215 | Backup*/ 216 | UpgradeLog*.XML 217 | UpgradeLog*.htm 218 | 219 | # SQL Server files 220 | *.mdf 221 | *.ldf 222 | *.ndf 223 | 224 | # Business Intelligence projects 225 | *.rdl.data 226 | *.bim.layout 227 | *.bim_*.settings 228 | 229 | # Microsoft Fakes 230 | FakesAssemblies/ 231 | 232 | # GhostDoc plugin setting file 233 | *.GhostDoc.xml 234 | 235 | # Node.js Tools for Visual Studio 236 | .ntvs_analysis.dat 237 | node_modules/ 238 | 239 | # Typescript v1 declaration files 240 | typings/ 241 | 242 | # Visual Studio 6 build log 243 | *.plg 244 | 245 | # Visual Studio 6 workspace options file 246 | *.opt 247 | 248 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 249 | *.vbw 250 | 251 | # Visual Studio LightSwitch build output 252 | **/*.HTMLClient/GeneratedArtifacts 253 | **/*.DesktopClient/GeneratedArtifacts 254 | **/*.DesktopClient/ModelManifest.xml 255 | **/*.Server/GeneratedArtifacts 256 | **/*.Server/ModelManifest.xml 257 | _Pvt_Extensions 258 | 259 | # Paket dependency manager 260 | .paket/paket.exe 261 | paket-files/ 262 | 263 | # FAKE - F# Make 264 | .fake/ 265 | 266 | # JetBrains Rider 267 | .idea/ 268 | *.sln.iml 269 | 270 | # CodeRush 271 | .cr/ 272 | 273 | # Python Tools for Visual Studio (PTVS) 274 | __pycache__/ 275 | *.pyc 276 | 277 | # Cake - Uncomment if you are using it 278 | # tools/** 279 | # !tools/packages.config 280 | 281 | # Telerik's JustMock configuration file 282 | *.jmconfig 283 | 284 | # BizTalk build output 285 | *.btp.cs 286 | *.btm.cs 287 | *.odx.cs 288 | *.xsd.cs 289 | -------------------------------------------------------------------------------- /Be.Windows.Forms.HexBox/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using System.Runtime.CompilerServices; 4 | using System.Security.Permissions; 5 | using System.Runtime.InteropServices; 6 | 7 | // 8 | // General Information about an assembly is controlled through the following 9 | // set of attributes. Change these attribute values to modify the information 10 | // associated with an assembly. 11 | // 12 | [assembly: AssemblyTitle("Be.Windows.Forms.HexBox")] 13 | [assembly: AssemblyDescription("hex edit control (C# DOTNET)")] 14 | [assembly: AssemblyConfiguration("")] 15 | [assembly: AssemblyCompany("Be")] 16 | [assembly: AssemblyProduct("Be.Windows.Forms.HexBox")] 17 | [assembly: AssemblyCopyright("")] 18 | [assembly: AssemblyTrademark("")] 19 | [assembly: AssemblyCulture("")] 20 | 21 | // 22 | // Version information for an assembly consists of the following four values: 23 | // 24 | // Major Version 25 | // Minor Version 26 | // Build Number 27 | // Revision 28 | // 29 | // You can specify all the values or you can default the Revision and Build Numbers 30 | // by using the '*' as shown below: 31 | 32 | [assembly: AssemblyVersion("1.6.0.*")] 33 | 34 | // 35 | // In order to sign your assembly you must specify a key to use. Refer to the 36 | // Microsoft .NET Framework documentation for more information on assembly signing. 37 | // 38 | // Use the attributes below to control which key is used for signing. 39 | // 40 | // Notes: 41 | // (*) If no key is specified, the assembly is not signed. 42 | // (*) KeyName refers to a key that has been installed in the Crypto Service 43 | // Provider (CSP) on your machine. KeyFile refers to a file which contains 44 | // a key. 45 | // (*) If the KeyFile and the KeyName values are both specified, the 46 | // following processing occurs: 47 | // (1) If the KeyName can be found in the CSP, that key is used. 48 | // (2) If the KeyName does not exist and the KeyFile does exist, the key 49 | // in the KeyFile is installed into the CSP and used. 50 | // (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. 51 | // When specifying the KeyFile, the location of the KeyFile should be 52 | // relative to the project output directory which is 53 | // %Project Directory%\obj\. For example, if your KeyFile is 54 | // located in the project directory, you would specify the AssemblyKeyFile 55 | // attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] 56 | // (*) Delay Signing is an advanced option - see the Microsoft .NET Framework 57 | // documentation for more information on this. 58 | // 59 | [assembly: AssemblyDelaySign(false)] 60 | 61 | //[assembly: AssemblyKeyFile("../../HexBox.snk")] 62 | //[assembly: AssemblyKeyName("")] 63 | 64 | //[assembly:IsolatedStorageFilePermission(SecurityAction.RequestRefuse, UserQuota=1048576)] 65 | //[assembly:SecurityPermission(SecurityAction.RequestRefuse, UnmanagedCode=true)] 66 | //[assembly:FileIOPermission(SecurityAction.RequestOptional, Unrestricted=true)] 67 | 68 | [assembly:CLSCompliant(true)] 69 | 70 | [assembly:ComVisible(false)] -------------------------------------------------------------------------------- /Be.Windows.Forms.HexBox/ByteCharConverters.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Be.Windows.Forms 6 | { 7 | /// 8 | /// The interface for objects that can translate between characters and bytes. 9 | /// 10 | public interface IByteCharConverter 11 | { 12 | /// 13 | /// Returns the character to display for the byte passed across. 14 | /// 15 | /// 16 | /// 17 | char ToChar(byte b); 18 | 19 | /// 20 | /// Returns the byte to use when the character passed across is entered during editing. 21 | /// 22 | /// 23 | /// 24 | byte ToByte(char c); 25 | } 26 | 27 | /// 28 | /// The default implementation. 29 | /// 30 | public class DefaultByteCharConverter : IByteCharConverter 31 | { 32 | /// 33 | /// Returns the character to display for the byte passed across. 34 | /// 35 | /// 36 | /// 37 | public virtual char ToChar(byte b) 38 | { 39 | return b > 0x1F && !(b > 0x7E && b < 0xA0) ? (char)b : '.'; 40 | } 41 | 42 | /// 43 | /// Returns the byte to use for the character passed across. 44 | /// 45 | /// 46 | /// 47 | public virtual byte ToByte(char c) 48 | { 49 | return (byte)c; 50 | } 51 | 52 | /// 53 | /// Returns a description of the byte char provider. 54 | /// 55 | /// 56 | public override string ToString() 57 | { 58 | return "ANSI (Default)"; 59 | } 60 | } 61 | 62 | /// 63 | /// A byte char provider that can translate bytes encoded in codepage 500 EBCDIC 64 | /// 65 | public class EbcdicByteCharProvider : IByteCharConverter 66 | { 67 | /// 68 | /// The IBM EBCDIC code page 500 encoding. Note that this is not always supported by .NET, 69 | /// the underlying platform has to provide support for it. 70 | /// 71 | private Encoding _ebcdicEncoding = Encoding.GetEncoding(500); 72 | 73 | /// 74 | /// Returns the EBCDIC character corresponding to the byte passed across. 75 | /// 76 | /// 77 | /// 78 | public virtual char ToChar(byte b) 79 | { 80 | string encoded = _ebcdicEncoding.GetString(new byte[] { b }); 81 | return encoded.Length > 0 ? encoded[0] : '.'; 82 | } 83 | 84 | /// 85 | /// Returns the byte corresponding to the EBCDIC character passed across. 86 | /// 87 | /// 88 | /// 89 | public virtual byte ToByte(char c) 90 | { 91 | byte[] decoded = _ebcdicEncoding.GetBytes(new char[] { c }); 92 | return decoded.Length > 0 ? decoded[0] : (byte)0; 93 | } 94 | 95 | /// 96 | /// Returns a description of the byte char provider. 97 | /// 98 | /// 99 | public override string ToString() 100 | { 101 | return "EBCDIC (Code Page 500)"; 102 | } 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /Be.Windows.Forms.HexBox/ByteCollection.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | using System.Collections; 4 | 5 | namespace Be.Windows.Forms 6 | { 7 | /// 8 | /// Represents a collection of bytes. 9 | /// 10 | public class ByteCollection : CollectionBase 11 | { 12 | /// 13 | /// Initializes a new instance of ByteCollection class. 14 | /// 15 | public ByteCollection() { } 16 | 17 | /// 18 | /// Initializes a new instance of ByteCollection class. 19 | /// 20 | /// an array of bytes to add to collection 21 | public ByteCollection(byte[] bs) 22 | { AddRange(bs); } 23 | 24 | /// 25 | /// Gets or sets the value of a byte 26 | /// 27 | public byte this[int index] 28 | { 29 | get { return (byte)List[index]; } 30 | set { List[index] = value; } 31 | } 32 | 33 | /// 34 | /// Adds a byte into the collection. 35 | /// 36 | /// the byte to add 37 | public void Add(byte b) 38 | { List.Add(b); } 39 | 40 | /// 41 | /// Adds a range of bytes to the collection. 42 | /// 43 | /// the bytes to add 44 | public void AddRange(byte[] bs) 45 | { InnerList.AddRange(bs); } 46 | 47 | /// 48 | /// Removes a byte from the collection. 49 | /// 50 | /// the byte to remove 51 | public void Remove(byte b) 52 | { List.Remove(b); } 53 | 54 | /// 55 | /// Removes a range of bytes from the collection. 56 | /// 57 | /// the index of the start byte 58 | /// the count of the bytes to remove 59 | public void RemoveRange(int index, int count) 60 | { InnerList.RemoveRange(index, count); } 61 | 62 | /// 63 | /// Inserts a range of bytes to the collection. 64 | /// 65 | /// the index of start byte 66 | /// an array of bytes to insert 67 | public void InsertRange(int index, byte[] bs) 68 | { InnerList.InsertRange(index, bs); } 69 | 70 | /// 71 | /// Gets all bytes in the array 72 | /// 73 | /// an array of bytes. 74 | public byte[] GetBytes() 75 | { 76 | byte[] bytes = new byte[Count]; 77 | InnerList.CopyTo(0, bytes, 0, bytes.Length); 78 | return bytes; 79 | } 80 | 81 | /// 82 | /// Inserts a byte to the collection. 83 | /// 84 | /// the index 85 | /// a byte to insert 86 | public void Insert(int index, byte b) 87 | { 88 | InnerList.Insert(index, b); 89 | } 90 | 91 | /// 92 | /// Returns the index of the given byte. 93 | /// 94 | public int IndexOf(byte b) 95 | { 96 | return InnerList.IndexOf(b); 97 | } 98 | 99 | /// 100 | /// Returns true, if the byte exists in the collection. 101 | /// 102 | public bool Contains(byte b) 103 | { 104 | return InnerList.Contains(b); 105 | } 106 | 107 | /// 108 | /// Copies the content of the collection into the given array. 109 | /// 110 | public void CopyTo(byte[] bs, int index) 111 | { 112 | InnerList.CopyTo(bs, index); 113 | } 114 | 115 | /// 116 | /// Copies the content of the collection into an array. 117 | /// 118 | /// the array containing all bytes. 119 | public byte[] ToArray() 120 | { 121 | byte[] data = new byte[this.Count]; 122 | this.CopyTo(data, 0); 123 | return data; 124 | } 125 | 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /Be.Windows.Forms.HexBox/BytePositionInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Be.Windows.Forms 6 | { 7 | /// 8 | /// Represents a position in the HexBox control 9 | /// 10 | struct BytePositionInfo 11 | { 12 | public BytePositionInfo(long index, int characterPosition) 13 | { 14 | _index = index; 15 | _characterPosition = characterPosition; 16 | } 17 | 18 | public int CharacterPosition 19 | { 20 | get { return _characterPosition; } 21 | } int _characterPosition; 22 | 23 | public long Index 24 | { 25 | get { return _index; } 26 | } long _index; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Be.Windows.Forms.HexBox/DataBlock.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Be.Windows.Forms 4 | { 5 | internal abstract class DataBlock 6 | { 7 | internal DataMap _map; 8 | internal DataBlock _nextBlock; 9 | internal DataBlock _previousBlock; 10 | 11 | public abstract long Length 12 | { 13 | get; 14 | } 15 | 16 | public DataMap Map 17 | { 18 | get 19 | { 20 | return _map; 21 | } 22 | } 23 | 24 | public DataBlock NextBlock 25 | { 26 | get 27 | { 28 | return _nextBlock; 29 | } 30 | } 31 | 32 | public DataBlock PreviousBlock 33 | { 34 | get 35 | { 36 | return _previousBlock; 37 | } 38 | } 39 | 40 | public abstract void RemoveBytes(long position, long count); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Be.Windows.Forms.HexBox/DynamicByteProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Be.Windows.Forms 5 | { 6 | /// 7 | /// Byte provider for a small amount of data. 8 | /// 9 | public class DynamicByteProvider : IByteProvider 10 | { 11 | /// 12 | /// Contains information about changes. 13 | /// 14 | bool _hasChanges; 15 | /// 16 | /// Contains a byte collection. 17 | /// 18 | List _bytes; 19 | 20 | /// 21 | /// Initializes a new instance of the DynamicByteProvider class. 22 | /// 23 | /// 24 | public DynamicByteProvider(byte[] data) : this(new List(data)) 25 | { 26 | } 27 | 28 | /// 29 | /// Initializes a new instance of the DynamicByteProvider class. 30 | /// 31 | /// 32 | public DynamicByteProvider(List bytes) 33 | { 34 | _bytes = bytes; 35 | } 36 | 37 | /// 38 | /// Raises the Changed event. 39 | /// 40 | void OnChanged(EventArgs e) 41 | { 42 | _hasChanges = true; 43 | 44 | if(Changed != null) 45 | Changed(this, e); 46 | } 47 | 48 | /// 49 | /// Raises the LengthChanged event. 50 | /// 51 | void OnLengthChanged(EventArgs e) 52 | { 53 | if(LengthChanged != null) 54 | LengthChanged(this, e); 55 | } 56 | 57 | /// 58 | /// Gets the byte collection. 59 | /// 60 | public List Bytes 61 | { 62 | get { return _bytes; } 63 | } 64 | 65 | #region IByteProvider Members 66 | /// 67 | /// True, when changes are done. 68 | /// 69 | public bool HasChanges() 70 | { 71 | return _hasChanges; 72 | } 73 | 74 | /// 75 | /// Applies changes. 76 | /// 77 | public void ApplyChanges() 78 | { 79 | _hasChanges = false; 80 | } 81 | 82 | /// 83 | /// Occurs, when the write buffer contains new changes. 84 | /// 85 | public event EventHandler Changed; 86 | 87 | /// 88 | /// Occurs, when InsertBytes or DeleteBytes method is called. 89 | /// 90 | public event EventHandler LengthChanged; 91 | 92 | /// 93 | /// Occurs after the WriteByte method call 94 | /// 95 | public event EventHandler WriteFinished; 96 | 97 | /// 98 | /// Reads a byte from the byte collection. 99 | /// 100 | /// the index of the byte to read 101 | /// the byte 102 | public byte ReadByte(long index) 103 | { return _bytes[(int)index]; } 104 | 105 | /// 106 | /// Write a byte into the byte collection. 107 | /// 108 | /// the index of the byte to write. 109 | /// the byte 110 | public void WriteByte(long index, byte value) 111 | { 112 | _bytes[(int)index] = value; 113 | OnChanged(EventArgs.Empty); 114 | } 115 | 116 | /// 117 | /// Deletes bytes from the byte collection. 118 | /// 119 | /// the start index of the bytes to delete. 120 | /// the length of bytes to delete. 121 | public void DeleteBytes(long index, long length) 122 | { 123 | int internal_index = (int)Math.Max(0, index); 124 | int internal_length = (int)Math.Min((int)Length, length); 125 | _bytes.RemoveRange(internal_index, internal_length); 126 | 127 | OnLengthChanged(EventArgs.Empty); 128 | OnChanged(EventArgs.Empty); 129 | } 130 | 131 | /// 132 | /// Inserts byte into the byte collection. 133 | /// 134 | /// the start index of the bytes in the byte collection 135 | /// the byte array to insert 136 | public void InsertBytes(long index, byte[] bs) 137 | { 138 | _bytes.InsertRange((int)index, bs); 139 | 140 | OnLengthChanged(EventArgs.Empty); 141 | OnChanged(EventArgs.Empty); 142 | } 143 | 144 | /// 145 | /// Gets the length of the bytes in the byte collection. 146 | /// 147 | public long Length 148 | { 149 | get 150 | { 151 | return _bytes.Count; 152 | } 153 | } 154 | 155 | /// 156 | /// Returns true 157 | /// 158 | public bool SupportsWriteByte() 159 | { 160 | return true; 161 | } 162 | 163 | /// 164 | /// Returns true 165 | /// 166 | public bool SupportsInsertBytes() 167 | { 168 | return true; 169 | } 170 | 171 | /// 172 | /// Returns true 173 | /// 174 | public bool SupportsDeleteBytes() 175 | { 176 | return true; 177 | } 178 | #endregion 179 | 180 | } 181 | } 182 | -------------------------------------------------------------------------------- /Be.Windows.Forms.HexBox/FileDataBlock.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Be.Windows.Forms 4 | { 5 | internal sealed class FileDataBlock : DataBlock 6 | { 7 | long _length; 8 | long _fileOffset; 9 | 10 | public FileDataBlock(long fileOffset, long length) 11 | { 12 | _fileOffset = fileOffset; 13 | _length = length; 14 | } 15 | 16 | public long FileOffset 17 | { 18 | get 19 | { 20 | return _fileOffset; 21 | } 22 | } 23 | 24 | public override long Length 25 | { 26 | get 27 | { 28 | return _length; 29 | } 30 | } 31 | 32 | public void SetFileOffset(long value) 33 | { 34 | _fileOffset = value; 35 | } 36 | 37 | public void RemoveBytesFromEnd(long count) 38 | { 39 | if (count > _length) 40 | { 41 | throw new ArgumentOutOfRangeException("count"); 42 | } 43 | 44 | _length -= count; 45 | } 46 | 47 | public void RemoveBytesFromStart(long count) 48 | { 49 | if (count > _length) 50 | { 51 | throw new ArgumentOutOfRangeException("count"); 52 | } 53 | 54 | _fileOffset += count; 55 | _length -= count; 56 | } 57 | 58 | public override void RemoveBytes(long position, long count) 59 | { 60 | if (position > _length) 61 | { 62 | throw new ArgumentOutOfRangeException("position"); 63 | } 64 | 65 | if (position + count > _length) 66 | { 67 | throw new ArgumentOutOfRangeException("count"); 68 | } 69 | 70 | long prefixLength = position; 71 | long prefixFileOffset = _fileOffset; 72 | 73 | long suffixLength = _length - count - prefixLength; 74 | long suffixFileOffset = _fileOffset + position + count; 75 | 76 | if (prefixLength > 0 && suffixLength > 0) 77 | { 78 | _fileOffset = prefixFileOffset; 79 | _length = prefixLength; 80 | _map.AddAfter(this, new FileDataBlock(suffixFileOffset, suffixLength)); 81 | return; 82 | } 83 | 84 | if (prefixLength > 0) 85 | { 86 | _fileOffset = prefixFileOffset; 87 | _length = prefixLength; 88 | } 89 | else 90 | { 91 | _fileOffset = suffixFileOffset; 92 | _length = suffixLength; 93 | } 94 | } 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /Be.Windows.Forms.HexBox/FindOptions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Be.Windows.Forms 6 | { 7 | /// 8 | /// Defines the type of the Find operation. 9 | /// 10 | public enum FindType 11 | { 12 | /// 13 | /// Used for Text Find operations 14 | /// 15 | Text, 16 | /// 17 | /// Used for Hex Find operations 18 | /// 19 | Hex 20 | } 21 | 22 | /// 23 | /// Defines all state information nee 24 | /// 25 | public class FindOptions 26 | { 27 | /// 28 | /// Gets or sets whether the Find options are valid 29 | /// 30 | public bool IsValid { get; set; } 31 | /// 32 | /// Gets the Find buffer used for case insensitive Find operations. This is the binary representation of Text. 33 | /// 34 | internal byte[] FindBuffer { get; private set; } 35 | /// 36 | /// Gets the Find buffer used for case sensitive Find operations. This is the binary representation of Text in lower case format. 37 | /// 38 | internal byte[] FindBufferLowerCase { get; private set; } 39 | /// 40 | /// Gets the Find buffer used for case sensitive Find operations. This is the binary representation of Text in upper case format. 41 | /// 42 | internal byte[] FindBufferUpperCase { get; private set; } 43 | /// 44 | /// Contains the MatchCase value 45 | /// 46 | bool _matchCase; 47 | /// 48 | /// Gets or sets the value, whether the Find operation is case sensitive or not. 49 | /// 50 | public bool MatchCase 51 | { 52 | get { return _matchCase; } 53 | set 54 | { 55 | _matchCase = value; 56 | UpdateFindBuffer(); 57 | } 58 | } 59 | /// 60 | /// Contains the text that should be found. 61 | /// 62 | string _text; 63 | /// 64 | /// Gets or sets the text that should be found. Only used, when Type is FindType.Hex. 65 | /// 66 | public string Text 67 | { 68 | get { return _text; } 69 | set 70 | { 71 | _text = value; 72 | UpdateFindBuffer(); 73 | } 74 | } 75 | /// 76 | /// Gets or sets the hex buffer that should be found. Only used, when Type is FindType.Hex. 77 | /// 78 | public byte[] Hex { get; set; } 79 | /// 80 | /// Gets or sets the type what should be searched. 81 | /// 82 | public FindType Type { get; set; } 83 | /// 84 | /// Updates the find buffer. 85 | /// 86 | void UpdateFindBuffer() 87 | { 88 | string text = this.Text != null ? this.Text : string.Empty; 89 | FindBuffer = ASCIIEncoding.ASCII.GetBytes(text); 90 | FindBufferLowerCase = ASCIIEncoding.ASCII.GetBytes(text.ToLower()); 91 | FindBufferUpperCase = ASCIIEncoding.ASCII.GetBytes(text.ToUpper()); 92 | } 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /Be.Windows.Forms.HexBox/HexBox.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceman1001/ChameleonMini-rebootedGUI/6be26794ce6f93bd5091b9ae10d9eebf4c18f7ce/Be.Windows.Forms.HexBox/HexBox.bmp -------------------------------------------------------------------------------- /Be.Windows.Forms.HexBox/HexBox.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceman1001/ChameleonMini-rebootedGUI/6be26794ce6f93bd5091b9ae10d9eebf4c18f7ce/Be.Windows.Forms.HexBox/HexBox.snk -------------------------------------------------------------------------------- /Be.Windows.Forms.HexBox/HexCasing.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Be.Windows.Forms 6 | { 7 | /// 8 | /// Specifies the case of hex characters in the HexBox control 9 | /// 10 | public enum HexCasing 11 | { 12 | /// 13 | /// Converts all characters to uppercase. 14 | /// 15 | Upper = 0, 16 | /// 17 | /// Converts all characters to lowercase. 18 | /// 19 | Lower = 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Be.Windows.Forms.HexBox/Highlight.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Drawing; 5 | 6 | namespace Be.Windows.Forms 7 | { 8 | class Highlight 9 | { 10 | public long Position; 11 | public long EndPosition; 12 | public long Length; 13 | public Brush ForeBrush; 14 | public Brush BackBrush; 15 | 16 | public Highlight(long position, long length, Color foreColor, Color backColor) 17 | { 18 | this.Position = position; 19 | this.Length = length; 20 | this.ForeBrush = new SolidBrush(foreColor); 21 | this.BackBrush = new SolidBrush(backColor); 22 | this.EndPosition = position + length - 1; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Be.Windows.Forms.HexBox/HighlightCollection.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Drawing; 5 | 6 | namespace Be.Windows.Forms 7 | { 8 | class HighlightCollection : Dictionary 9 | { 10 | public void Add(long position, long length, Color foreColor, Color backColor) 11 | { 12 | base.Add(position, new Highlight(position, length, foreColor, backColor)); 13 | } 14 | 15 | public Highlight getHighlight(long position) 16 | { 17 | Highlight retval = null; 18 | 19 | foreach (int pos in this.Keys) 20 | { 21 | if (position < pos) 22 | continue; 23 | if (position >= this[pos].Position && position <= this[pos].EndPosition && (retval == null || this[pos].Position > retval.Position)) 24 | retval = this[pos]; 25 | } 26 | 27 | return retval; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Be.Windows.Forms.HexBox/IByteProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Be.Windows.Forms 4 | { 5 | /// 6 | /// Defines a byte provider for HexBox control 7 | /// 8 | public interface IByteProvider 9 | { 10 | /// 11 | /// Reads a byte from the provider 12 | /// 13 | /// the index of the byte to read 14 | /// the byte to read 15 | byte ReadByte(long index); 16 | /// 17 | /// Writes a byte into the provider 18 | /// 19 | /// the index of the byte to write 20 | /// the byte to write 21 | void WriteByte(long index, byte value); 22 | /// 23 | /// Inserts bytes into the provider 24 | /// 25 | /// 26 | /// 27 | /// This method must raise the LengthChanged event. 28 | void InsertBytes(long index, byte[] bs); 29 | /// 30 | /// Deletes bytes from the provider 31 | /// 32 | /// the start index of the bytes to delete 33 | /// the length of the bytes to delete 34 | /// This method must raise the LengthChanged event. 35 | void DeleteBytes(long index, long length); 36 | 37 | /// 38 | /// Returns the total length of bytes the byte provider is providing. 39 | /// 40 | long Length { get; } 41 | /// 42 | /// Occurs, when the Length property changed. 43 | /// 44 | event EventHandler LengthChanged; 45 | 46 | /// 47 | /// True, when changes are done. 48 | /// 49 | bool HasChanges(); 50 | /// 51 | /// Applies changes. 52 | /// 53 | void ApplyChanges(); 54 | /// 55 | /// Occurs, when bytes are changed. 56 | /// 57 | event EventHandler Changed; 58 | 59 | /// 60 | /// Occurs, after the WriteByte method. 61 | /// 62 | event EventHandler WriteFinished; 63 | 64 | /// 65 | /// Returns a value if the WriteByte methods is supported by the provider. 66 | /// 67 | /// True, when it΄s supported. 68 | bool SupportsWriteByte(); 69 | /// 70 | /// Returns a value if the InsertBytes methods is supported by the provider. 71 | /// 72 | /// True, when it΄s supported. 73 | bool SupportsInsertBytes(); 74 | /// 75 | /// Returns a value if the DeleteBytes methods is supported by the provider. 76 | /// 77 | /// True, when it΄s supported. 78 | bool SupportsDeleteBytes(); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /Be.Windows.Forms.HexBox/MemoryDataBlock.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Be.Windows.Forms 4 | { 5 | internal sealed class MemoryDataBlock : DataBlock 6 | { 7 | byte[] _data; 8 | 9 | public MemoryDataBlock(byte data) 10 | { 11 | _data = new byte[] { data }; 12 | } 13 | 14 | public MemoryDataBlock(byte[] data) 15 | { 16 | if (data == null) 17 | { 18 | throw new ArgumentNullException("data"); 19 | } 20 | 21 | _data = (byte[])data.Clone(); 22 | } 23 | 24 | public override long Length 25 | { 26 | get 27 | { 28 | return _data.LongLength; 29 | } 30 | } 31 | 32 | public byte[] Data 33 | { 34 | get 35 | { 36 | return _data; 37 | } 38 | } 39 | 40 | public void AddByteToEnd(byte value) 41 | { 42 | byte[] newData = new byte[_data.LongLength + 1]; 43 | _data.CopyTo(newData, 0); 44 | newData[newData.LongLength - 1] = value; 45 | _data = newData; 46 | } 47 | 48 | public void AddByteToStart(byte value) 49 | { 50 | byte[] newData = new byte[_data.LongLength + 1]; 51 | newData[0] = value; 52 | _data.CopyTo(newData, 1); 53 | _data = newData; 54 | } 55 | 56 | public void InsertBytes(long position, byte[] data) 57 | { 58 | byte[] newData = new byte[_data.LongLength + data.LongLength]; 59 | if (position > 0) 60 | { 61 | Array.Copy(_data, 0, newData, 0, position); 62 | } 63 | Array.Copy(data, 0, newData, position, data.LongLength); 64 | if (position < _data.LongLength) 65 | { 66 | Array.Copy(_data, position, newData, position + data.LongLength, _data.LongLength - position); 67 | } 68 | _data = newData; 69 | } 70 | 71 | public override void RemoveBytes(long position, long count) 72 | { 73 | byte[] newData = new byte[_data.LongLength - count]; 74 | 75 | if (position > 0) 76 | { 77 | Array.Copy(_data, 0, newData, 0, position); 78 | } 79 | if (position + count < _data.LongLength) 80 | { 81 | Array.Copy(_data, position + count, newData, position, newData.LongLength - position); 82 | } 83 | 84 | _data = newData; 85 | } 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /Be.Windows.Forms.HexBox/NativeMethods.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Drawing; 3 | using System.Runtime.InteropServices; 4 | 5 | namespace Be.Windows.Forms 6 | { 7 | internal static class NativeMethods 8 | { 9 | // Caret definitions 10 | [DllImport("user32.dll", SetLastError=true)] 11 | public static extern bool CreateCaret(IntPtr hWnd, IntPtr hBitmap, int nWidth, int nHeight); 12 | 13 | [DllImport("user32.dll", SetLastError=true)] 14 | public static extern bool ShowCaret(IntPtr hWnd); 15 | 16 | [DllImport("user32.dll", SetLastError=true)] 17 | public static extern bool DestroyCaret(); 18 | 19 | [DllImport("user32.dll", SetLastError=true)] 20 | public static extern bool SetCaretPos(int X, int Y); 21 | 22 | // Key definitions 23 | public const int WM_KEYDOWN = 0x100; 24 | public const int WM_KEYUP = 0x101; 25 | public const int WM_CHAR = 0x102; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Be.Windows.Forms.HexBox/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Be.Windows.Forms.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Be.Windows.Forms.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Be.Windows.Forms.HexBox/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /Be.Windows.Forms.HexBox/Util.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Be.Windows.Forms 6 | { 7 | static class Util 8 | { 9 | /// 10 | /// Contains true, if we are in design mode of Visual Studio 11 | /// 12 | private static bool _designMode; 13 | 14 | /// 15 | /// Initializes an instance of Util class 16 | /// 17 | static Util() 18 | { 19 | // design mode is true if host process is: Visual Studio, Visual Studio Express Versions (C#, VB, C++) or SharpDevelop 20 | var designerHosts = new List() { "devenv", "vcsexpress", "vbexpress", "vcexpress", "sharpdevelop" }; 21 | using (var process = System.Diagnostics.Process.GetCurrentProcess()) 22 | { 23 | var processName = process.ProcessName.ToLower(); 24 | _designMode = designerHosts.Contains(processName); 25 | } 26 | } 27 | 28 | /// 29 | /// Gets true, if we are in design mode of Visual Studio 30 | /// 31 | /// 32 | /// In Visual Studio 2008 SP1 the designer is crashing sometimes on windows forms. 33 | /// The DesignMode property of Control class is buggy and cannot be used, so use our own implementation instead. 34 | /// 35 | public static bool DesignMode 36 | { 37 | get 38 | { 39 | return _designMode; 40 | } 41 | } 42 | 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Be.Windows.Forms.HexBox/license.txt: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2011 Bernhard Elbl 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | All notable changes to this project will be documented in this file. 3 | This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log... 4 | 5 | ## [unreleased] 6 | 7 | ## [1.3.0.5] - 2020-09-08 8 | - Update of French language translation (@loupetre) 9 | - Bug fix where devices with Official RevG fw get a truncated output ( #129 ) (@loupetre) 10 | 11 | ## [1.3.0.4] - 2020-09-08 12 | - mfkey32 button now works for RevG RDV20 with latest fw from the RRG repository (@iceman1001) 13 | - mfkey32 button now skips faulty nonces for RevE rebooted devices (@iceman1001) 14 | - Textual instruction to inform that the load default button fw is targetted for RevE rebooted devices (@iceman1001) 15 | 16 | ## [1.3.0.3] - 2020-05-19 17 | - Enable mfkey32 key recovery for RevG rev2 / Chameleon Tiny (@grspy) 18 | - Support for RevG - rev2 / Chameleon Tiny 's mfkey data format (@grspy) 19 | 20 | ## [1.3.0.2] - 2020-03-10 21 | - tab serial: sorted command list, use a arrow pointer, a light background color (@iceman1001) 22 | 23 | ## [1.3.0.1] - 2020-03-10 24 | - rectified minimum version error introduced in 1.3.0.0 (@iceman1001) 25 | 26 | ## [1.3.0.0] - 2020-03-10 27 | - Enable mfkey key recovery button for RevG devices if the firmware supports it (@iceman1001) 28 | 29 | ## [1.2.2.1] - 2019-12-23 30 | - tab serial: select all text option (@grspy) 31 | 32 | ## [1.2.2] - 2019-12-20 33 | - Smooth updaste of slot graphics (@iceman) 34 | 35 | ## [1.2.1.10] - 2019-12-17 36 | - speedups (@grspy) 37 | - log textbox scrolls to end when appending. (@grspy , @iceman1001) 38 | 39 | ## [1.2.1.9] - 2019-12-11 40 | - Increase default "keep alive" setting to 10sec (@grspy) 41 | 42 | ## [1.2.1.8] - 2019-12-11 43 | - Download / saving dump now uses unique naming. aka. uid_{counter}.bin format (@grspy) 44 | 45 | ## [1.2.1.7] - 2019-12-09 46 | - Upload one dump to several slots (@grspy) 47 | 48 | ## [1.2.1.6] - 2019-12-03 49 | - Annotate RevG log output (@grspy) 50 | 51 | ## [1.2.1.4] - 2019-11-11 52 | - New logo and icons (@grspy) 53 | 54 | ## [1.2.1.3] - 2019-11-05 55 | - Fixed various serial commands bugs and delays (@shinhub) 56 | - Fixed mfkey32 data reception from current firmware (@shinhub) 57 | - Changed UID behavior so they are read back from memory when what is set in GUI is invalid (@shinhub) 58 | 59 | ## [1.2.1.0] - 2019-09-17 60 | - extended timeouts (@shinhub) 61 | - 4k allowed on all slots (@shinhub) 62 | - remember old UID when swapping sizes (@shinhub) 63 | - fix mfkey32 (@shinhub) 64 | - Support new NTAG/Ev dump format (@mceloff) 65 | - 7byte uid identification from dump (@mceloff) 66 | - Fixed application crash (@uspilot) 67 | 68 | ## [1.2.0.19] - 2019-03-12 69 | - added scrollbars / resizeing of gui possible (@bogito) 70 | 71 | ## [1.2.0.18] - 2019-03-11 72 | - moved legend to font 73 | 74 | ## [1.2.0.17] - 2019-03-11 75 | - support for RevE firmware with or without MY-extensions. (@bogito) 76 | - ultralight/ntag download dump now should not add extra empty header every time. (@iceman1001) 77 | 78 | ## [1.2.0.13] - 2019-02-22 79 | - selected language in combobox (@iceman1001) 80 | 81 | ## [1.2.0.10] - 2019-02-22 82 | - Spanish translations (@neijpass) 83 | - Tablelayout adaptive regarding device (@bogito) 84 | 85 | ## [1.2.0.9] - 2019-02-01 86 | - German translations (@vrumfondel) 87 | 88 | ## [1.2.0.8] - 2018-12-17 89 | - General stability bug fixes 90 | - New iClass dark template (@iceman1001) 91 | - Bugfix - mf_detection (@kgamecarter) 92 | - Highlighted active tagslot (@vrumfondel) 93 | - Splash screen (@vrumfondel) 94 | - Massive speedups in comport identification (@vrumfondel) 95 | - RevG identify function (@vrumfondel) 96 | - Serial tab doesn't crash on download/upload 97 | - Serial tab has enhances help text functionality with clickable text (@vrumfondel) 98 | - Support for RevG devices (@vrumfondel) 99 | - Increased dump formats (BIN/MCT/EML/JSON) (@kgamecarter) 100 | - Mf32 attack, in managed code and in parallell (@kgamecarter) 101 | - Dark themed templates (@hiwanz) 102 | 103 | ## [1.1.0.0] - 2018-xx-xx 104 | - Memory dump color templates (@iceman1001) 105 | - Multilanguage support (@iceman1001) 106 | (english, chinese, dutch, french, german, greek, italian, swedish) 107 | - Locked scrolling of dumpfiles 108 | - Serial interface tab, (@iceman1001) 109 | 110 | ## [1.0.0.8] - 2018-03-16 111 | - bindiff comparision (@bogition) 112 | - load / save of dumpfiles (@bogition) 113 | 114 | ## [1.0.0.7] - 2018-01-xx 115 | - first version of GUI (@iceman1001, @bogition) 116 | -------------------------------------------------------------------------------- /ChameleonMiniGUI.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 12.00 2 | # Visual Studio 14 3 | VisualStudioVersion = 14.0.25420.1 4 | MinimumVisualStudioVersion = 10.0.40219.1 5 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChameleonMiniGUI", "ChameleonMiniGUI\ChameleonMiniGUI.csproj", "{52CF6F3F-2092-48E1-BC7B-4D01B5EE2359}" 6 | EndProject 7 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Be.Windows.Forms.HexBox", "Be.Windows.Forms.HexBox\Be.Windows.Forms.HexBox.csproj", "{26C5F25F-B450-4CAF-AD8B-B8D11AE73457}" 8 | EndProject 9 | Global 10 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 11 | Debug|Any CPU = Debug|Any CPU 12 | Debug|x64 = Debug|x64 13 | Debug|x86 = Debug|x86 14 | Release|Any CPU = Release|Any CPU 15 | Release|x64 = Release|x64 16 | Release|x86 = Release|x86 17 | EndGlobalSection 18 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 19 | {52CF6F3F-2092-48E1-BC7B-4D01B5EE2359}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 20 | {52CF6F3F-2092-48E1-BC7B-4D01B5EE2359}.Debug|Any CPU.Build.0 = Debug|Any CPU 21 | {52CF6F3F-2092-48E1-BC7B-4D01B5EE2359}.Debug|x64.ActiveCfg = Debug|Any CPU 22 | {52CF6F3F-2092-48E1-BC7B-4D01B5EE2359}.Debug|x64.Build.0 = Debug|Any CPU 23 | {52CF6F3F-2092-48E1-BC7B-4D01B5EE2359}.Debug|x86.ActiveCfg = Debug|Any CPU 24 | {52CF6F3F-2092-48E1-BC7B-4D01B5EE2359}.Debug|x86.Build.0 = Debug|Any CPU 25 | {52CF6F3F-2092-48E1-BC7B-4D01B5EE2359}.Release|Any CPU.ActiveCfg = Release|Any CPU 26 | {52CF6F3F-2092-48E1-BC7B-4D01B5EE2359}.Release|Any CPU.Build.0 = Release|Any CPU 27 | {52CF6F3F-2092-48E1-BC7B-4D01B5EE2359}.Release|x64.ActiveCfg = Release|Any CPU 28 | {52CF6F3F-2092-48E1-BC7B-4D01B5EE2359}.Release|x64.Build.0 = Release|Any CPU 29 | {52CF6F3F-2092-48E1-BC7B-4D01B5EE2359}.Release|x86.ActiveCfg = Release|Any CPU 30 | {52CF6F3F-2092-48E1-BC7B-4D01B5EE2359}.Release|x86.Build.0 = Release|Any CPU 31 | {26C5F25F-B450-4CAF-AD8B-B8D11AE73457}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 32 | {26C5F25F-B450-4CAF-AD8B-B8D11AE73457}.Debug|Any CPU.Build.0 = Debug|Any CPU 33 | {26C5F25F-B450-4CAF-AD8B-B8D11AE73457}.Debug|x64.ActiveCfg = Debug|Any CPU 34 | {26C5F25F-B450-4CAF-AD8B-B8D11AE73457}.Debug|x64.Build.0 = Debug|Any CPU 35 | {26C5F25F-B450-4CAF-AD8B-B8D11AE73457}.Debug|x86.ActiveCfg = Debug|Any CPU 36 | {26C5F25F-B450-4CAF-AD8B-B8D11AE73457}.Debug|x86.Build.0 = Debug|Any CPU 37 | {26C5F25F-B450-4CAF-AD8B-B8D11AE73457}.Release|Any CPU.ActiveCfg = Release|Any CPU 38 | {26C5F25F-B450-4CAF-AD8B-B8D11AE73457}.Release|Any CPU.Build.0 = Release|Any CPU 39 | {26C5F25F-B450-4CAF-AD8B-B8D11AE73457}.Release|x64.ActiveCfg = Release|Any CPU 40 | {26C5F25F-B450-4CAF-AD8B-B8D11AE73457}.Release|x64.Build.0 = Release|Any CPU 41 | {26C5F25F-B450-4CAF-AD8B-B8D11AE73457}.Release|x86.ActiveCfg = Release|Any CPU 42 | {26C5F25F-B450-4CAF-AD8B-B8D11AE73457}.Release|x86.Build.0 = Release|Any CPU 43 | EndGlobalSection 44 | GlobalSection(SolutionProperties) = preSolution 45 | HideSolutionNode = FALSE 46 | EndGlobalSection 47 | EndGlobal 48 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | True 28 | 29 | 30 | English 31 | 32 | 33 | 4000 34 | 35 | 36 | v1.3.0.6 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/Communications/Command.cs: -------------------------------------------------------------------------------- 1 | namespace ChameleonMiniGUI 2 | { 3 | /** 4 | * Class to parse and decode messages from device 5 | */ 6 | public class Command 7 | { 8 | public string CmdText { get; set; } 9 | 10 | public Command() 11 | { 12 | } 13 | 14 | public Command TryParse(string cmdtext) 15 | { 16 | return new Command(); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /ChameleonMiniGUI/Comparers/KeyComparer.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ChameleonMiniGUI 4 | { 5 | public class KeyComparer : IComparer 6 | { 7 | public int Compare(MyKey x, MyKey y) 8 | { 9 | if (x.Sector > y.Sector) 10 | return 1; 11 | 12 | if (x.Sector < y.Sector) 13 | return -1; 14 | return 0; 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /ChameleonMiniGUI/Crc/Crc.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics.SymbolStore; 2 | 3 | namespace ChameleonMiniGUI 4 | { 5 | public class Crc 6 | { 7 | public const ushort CRC16_14443_A = 0x6363; 8 | public const ushort CRC16_14443_B = 0xFFFF; 9 | 10 | private static ushort UpdateCrc14443(byte b, ushort crc) 11 | { 12 | unchecked 13 | { 14 | byte ch = (byte) (b ^ (byte) (crc & 0x00ff)); 15 | ch = (byte) (ch ^ (ch << 4)); 16 | return (ushort) ((crc >> 8) ^ (ch << 8) ^ (ch << 3) ^ (ch >> 4)); 17 | } 18 | } 19 | 20 | public static void ComputeCrc14443(ushort crc_type, byte[] bytes, int len, out byte first, out byte second) 21 | { 22 | first = 0; 23 | second = 0; 24 | 25 | if (len < 2) 26 | return; 27 | 28 | byte b; 29 | var res = crc_type; 30 | 31 | for (int i = 0; i < len; i++) 32 | { 33 | b = bytes[i]; 34 | res = UpdateCrc14443(b, res); 35 | } 36 | 37 | 38 | if (crc_type == CRC16_14443_B) 39 | res = (ushort) ~res; /* ISO/IEC 13239 (formerly ISO/IEC 3309) */ 40 | 41 | 42 | first = (byte) (res & 0xFF); 43 | second = (byte) ((res >> 8) & 0xFF); 44 | } 45 | 46 | public static bool CheckCrc14443(ushort crc_type, byte[] bytes, int len) 47 | { 48 | byte b1, b2; 49 | if (len < 3) return false; 50 | 51 | ComputeCrc14443(crc_type, bytes, len - 2, out b1, out b2); 52 | if ((b1 == bytes[len - 2]) && (b2 == bytes[len - 1])) 53 | return true; 54 | return false; 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/Dump/BinaryDumpStrategy.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace ChameleonMiniGUI.Dump 9 | { 10 | public class BinaryDumpStrategy : DumpStrategy 11 | { 12 | public BinaryDumpStrategy(string fileName) 13 | { 14 | FileName = fileName; 15 | } 16 | 17 | public override string Extension => ".bin"; 18 | 19 | public override byte[] Read() => 20 | File.ReadAllBytes(FileName); 21 | 22 | public override void Save(byte[] data) => 23 | File.WriteAllBytes(FileName, data); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/Dump/DumpFileByteProvider.cs: -------------------------------------------------------------------------------- 1 | using Be.Windows.Forms; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Linq; 6 | using System.Runtime.Serialization.Json; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | 10 | namespace ChameleonMiniGUI.Dump 11 | { 12 | public class DumpFileByteProvider : IByteProvider 13 | { 14 | byte[] data; 15 | bool changed; 16 | DumpStrategy dumpStrategy; 17 | 18 | public DumpFileByteProvider(string fileName) 19 | { 20 | dumpStrategy = DumpStrategyFactory.Create(fileName); 21 | data = dumpStrategy.Read(); 22 | } 23 | 24 | public long Length => data.LongLength; 25 | 26 | public event EventHandler LengthChanged; 27 | public event EventHandler Changed; 28 | public event EventHandler WriteFinished; 29 | 30 | void OnChanged(EventArgs e) 31 | => Changed?.Invoke(this, e); 32 | 33 | void OnWriteFinished(EventArgs e) 34 | => WriteFinished?.Invoke(this, e); 35 | 36 | public void ApplyChanges() 37 | { 38 | dumpStrategy.Save(data); 39 | changed = false; 40 | } 41 | 42 | public void DeleteBytes(long index, long length) 43 | { 44 | throw new NotImplementedException(); 45 | } 46 | 47 | public bool HasChanges() 48 | { 49 | return changed; 50 | } 51 | 52 | public void InsertBytes(long index, byte[] bs) 53 | { 54 | throw new NotImplementedException(); 55 | } 56 | 57 | public byte ReadByte(long index) 58 | { 59 | return data[index]; 60 | } 61 | 62 | public bool SupportsDeleteBytes() 63 | { 64 | return false; 65 | } 66 | 67 | public bool SupportsInsertBytes() 68 | { 69 | return false; 70 | } 71 | 72 | public bool SupportsWriteByte() 73 | { 74 | return true; 75 | } 76 | 77 | public void WriteByte(long index, byte value) 78 | { 79 | data[index] = value; 80 | changed = true; 81 | OnChanged(EventArgs.Empty); 82 | OnWriteFinished(EventArgs.Empty); 83 | } 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/Dump/DumpStrategy.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace ChameleonMiniGUI.Dump 8 | { 9 | public abstract class DumpStrategy 10 | { 11 | public string FileName { get; set; } 12 | 13 | public abstract byte[] Read(); 14 | 15 | public abstract void Save(byte[] data); 16 | 17 | public abstract string Extension { get; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/Dump/DumpStrategyFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace ChameleonMiniGUI.Dump 9 | { 10 | public static class DumpStrategyFactory 11 | { 12 | public static DumpStrategy Create(DumpType type, string fileName = null) 13 | { 14 | switch (type) 15 | { 16 | case DumpType.Bin: 17 | return new BinaryDumpStrategy(fileName); 18 | case DumpType.Json: 19 | return new JsonDumpStrategy(fileName); 20 | case DumpType.Eml: 21 | return new EmlDumpStrategy(fileName); 22 | case DumpType.Mct: 23 | return new MctDumpStrategy(fileName); 24 | default: 25 | return new BinaryDumpStrategy(fileName); 26 | } 27 | } 28 | 29 | public static DumpStrategy Create(string fileName) 30 | { 31 | switch (Path.GetExtension(fileName).ToLower()) 32 | { 33 | case ".bin": 34 | case ".dump": 35 | case ".mfd": 36 | case ".hex": 37 | return new BinaryDumpStrategy(fileName); 38 | case ".json": 39 | return new JsonDumpStrategy(fileName); 40 | case ".eml": 41 | return new EmlDumpStrategy(fileName); 42 | case ".mct": 43 | return new MctDumpStrategy(fileName); 44 | default: 45 | return new BinaryDumpStrategy(fileName); 46 | } 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/Dump/DumpType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace ChameleonMiniGUI.Dump 8 | { 9 | public enum DumpType 10 | { 11 | Bin, 12 | Json, 13 | Eml, 14 | Mct 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/Dump/EmlDumpStrategy.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace ChameleonMiniGUI.Dump 9 | { 10 | public class EmlDumpStrategy : DumpStrategy 11 | { 12 | public EmlDumpStrategy(string fileName) 13 | { 14 | FileName = fileName; 15 | } 16 | 17 | public override string Extension 18 | { 19 | get 20 | { return ".eml"; } 21 | } 22 | 23 | public override byte[] Read() 24 | { 25 | var rows = File.ReadAllLines(FileName); 26 | using (var ms = new MemoryStream()) 27 | using (var bw = new BinaryWriter(ms)) 28 | { 29 | foreach (var row in rows) 30 | { 31 | var clean = row.Replace(":", "").Replace(" ", ""); 32 | 33 | if (string.IsNullOrWhiteSpace(clean)) 34 | continue; 35 | 36 | int pos = 0; 37 | var bytes = new byte[clean.Length >> 1]; 38 | for (int i = 0; i < clean.Length; i += 2) 39 | { 40 | var b = Convert.ToByte(clean.Substring(i, 2), 16); 41 | bytes[pos++] = b; 42 | } 43 | 44 | bw.Write(bytes); 45 | } 46 | bw.Flush(); 47 | return ms.ToArray(); 48 | } 49 | } 50 | 51 | public override void Save(byte[] data) 52 | { 53 | // read bytes & convert to ascii 54 | var bytesleft = data.Length; 55 | var pos = 0; 56 | var rows = new List(); 57 | while (bytesleft > 0) 58 | { 59 | var len = Math.Min(bytesleft, 16); 60 | rows.Add(BitConverter.ToString(data, pos, len).Replace("-", " ")); 61 | pos += len; 62 | bytesleft -= len; 63 | } 64 | 65 | // save text file 66 | File.WriteAllLines(FileName, rows, Encoding.ASCII); 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/Dump/JsonDumpStrategy.cs: -------------------------------------------------------------------------------- 1 | using ChameleonMiniGUI.Json; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Linq; 6 | using System.Runtime.Serialization; 7 | using System.Runtime.Serialization.Json; 8 | using System.Text; 9 | using System.Threading.Tasks; 10 | using System.Xml; 11 | using System.Xml.Linq; 12 | 13 | namespace ChameleonMiniGUI.Dump 14 | { 15 | public class JsonDumpStrategy : DumpStrategy 16 | { 17 | private static readonly DataContractJsonSerializerSettings Settings = new DataContractJsonSerializerSettings 18 | { 19 | DataContractSurrogate = new BlockSurrogate(), 20 | KnownTypes = new List 21 | { 22 | typeof(Dictionary) 23 | }, 24 | UseSimpleDictionaryFormat = true, 25 | EmitTypeInformation = EmitTypeInformation.Never, 26 | SerializeReadOnlyTypes = false 27 | }; 28 | 29 | public JsonDumpStrategy(string fileName) 30 | { 31 | FileName = fileName; 32 | } 33 | 34 | public override string Extension 35 | { 36 | get 37 | { return ".json"; } 38 | } 39 | 40 | public override byte[] Read() 41 | { 42 | using (var fs = File.OpenRead(FileName)) 43 | using (var reader = JsonReaderWriterFactory.CreateJsonReader(fs, new XmlDictionaryReaderQuotas())) 44 | { 45 | var root = XElement.Load(reader); 46 | var fileType = root.Element("FileType").Value; 47 | var type = typeof(MifareClassicModel); 48 | if (fileType == "mfu") 49 | type = typeof(MifareUltralightModel); 50 | var ser = new DataContractJsonSerializer(type, Settings); 51 | using (var reader2 = root.CreateReader()) 52 | { 53 | var mf = ser.ReadObject(reader2) as MifareModel; 54 | return mf.ToByteArray(); 55 | } 56 | } 57 | } 58 | 59 | public override void Save(byte[] data) 60 | { 61 | MifareModel mf = null; 62 | if (data.Length < 1024 && data.Length != 320) 63 | { 64 | mf = MifareUltralightModel.Parse(data); 65 | } 66 | else 67 | { 68 | mf = new MifareClassicModel() 69 | { 70 | Created = "ChameleonMiniGUI", 71 | Blocks = MifareClassicModel.ToNestedByteArray(data) 72 | }; 73 | } 74 | using (var fs = File.Open(FileName, FileMode.Create, FileAccess.Write, FileShare.ReadWrite)) 75 | using (var writer = JsonReaderWriterFactory.CreateJsonWriter(fs, Encoding.UTF8, true, true, " ")) 76 | { 77 | var ser = new DataContractJsonSerializer(mf.GetType(), Settings); 78 | ser.WriteObject(writer, mf); 79 | writer.Flush(); 80 | } 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/Dump/MctDumpStrategy.cs: -------------------------------------------------------------------------------- 1 | using ChameleonMiniGUI.Json; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Text.RegularExpressions; 8 | using System.Threading.Tasks; 9 | 10 | namespace ChameleonMiniGUI.Dump 11 | { 12 | public class MctDumpStrategy : DumpStrategy 13 | { 14 | public MctDumpStrategy(string fileName) 15 | { 16 | FileName = fileName; 17 | } 18 | 19 | public override string Extension 20 | { 21 | get 22 | { return ".mct"; } 23 | } 24 | 25 | public override byte[] Read() 26 | { 27 | var lines = File.ReadLines(FileName) 28 | .Where(line => line.Length == 32) 29 | .Select(line => line.Replace('-', 'F')); // fill unknown data 30 | return MifareClassicModel.StringToByteArray(string.Join("", lines)); 31 | } 32 | 33 | public override void Save(byte[] data) 34 | { 35 | var mfc = new MifareClassicModel(); 36 | mfc.Blocks = MifareClassicModel.ToNestedByteArray(data); 37 | var list = new List(); 38 | foreach (var sc in mfc.SectorKeys.Values) 39 | { 40 | list.Add($"+Sector: {sc.SectorNumber}"); 41 | for (int i = 0; i < sc.BlockCount; i++) 42 | list.Add(MifareClassicModel.ByteArrayToString(mfc.Blocks[sc.FirstBlockNumber + i])); 43 | } 44 | File.WriteAllText(FileName, string.Join("\n", list), Encoding.ASCII); // UNIX NewLine 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/Extras/BOOT_LOADER_EXE.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceman1001/ChameleonMini-rebootedGUI/6be26794ce6f93bd5091b9ae10d9eebf4c18f7ce/ChameleonMiniGUI/Extras/BOOT_LOADER_EXE.exe -------------------------------------------------------------------------------- /ChameleonMiniGUI/Extras/Chameleon-RevG.eep: -------------------------------------------------------------------------------- 1 | :100000000000912F0606080800000401320090014C 2 | :1000100006060808000004013200900106060808E0 3 | :1000200000000401320090010606080800000401E7 4 | :100030003200900106060808000004013200900119 5 | :1000400006060808000004013200900106060808B0 6 | :1000500000000401320090010606080800000401B7 7 | :0400600032009001D9 8 | :00000001FF 9 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/Extras/avrdude.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceman1001/ChameleonMini-rebootedGUI/6be26794ce6f93bd5091b9ae10d9eebf4c18f7ce/ChameleonMiniGUI/Extras/avrdude.exe -------------------------------------------------------------------------------- /ChameleonMiniGUI/Extras/myfile.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceman1001/ChameleonMini-rebootedGUI/6be26794ce6f93bd5091b9ae10d9eebf4c18f7ce/ChameleonMiniGUI/Extras/myfile.bin -------------------------------------------------------------------------------- /ChameleonMiniGUI/Extras/myfilee.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceman1001/ChameleonMini-rebootedGUI/6be26794ce6f93bd5091b9ae10d9eebf4c18f7ce/ChameleonMiniGUI/Extras/myfilee.bin -------------------------------------------------------------------------------- /ChameleonMiniGUI/Json/BlockSurrogate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.CodeDom; 3 | using System.Collections.Generic; 4 | using System.Collections.ObjectModel; 5 | using System.Linq; 6 | using System.Reflection; 7 | using System.Runtime.Serialization; 8 | using System.Text; 9 | using System.Threading.Tasks; 10 | 11 | namespace ChameleonMiniGUI.Json 12 | { 13 | public class BlockSurrogate : IDataContractSurrogate 14 | { 15 | 16 | public Type GetDataContractType(Type type) 17 | { 18 | if (type == typeof(byte[][])) 19 | return typeof(Dictionary); 20 | return type; 21 | } 22 | 23 | static byte[] StringToByteArray(string hex) 24 | { 25 | return Enumerable.Range(0, hex.Length) 26 | .Where(x => x % 2 == 0) 27 | .Select(x => Convert.ToByte(hex.Substring(x, 2), 16)) 28 | .ToArray(); 29 | } 30 | 31 | static string ByteArrayToString(byte[] bytes) 32 | { 33 | return string.Join("", bytes.Select(b => b.ToString("X2"))); 34 | } 35 | 36 | public object GetDeserializedObject(object obj, Type targetType) 37 | { 38 | if (obj.GetType() == typeof(Dictionary) && targetType == typeof(byte[][])) 39 | { 40 | var dic = obj as Dictionary; 41 | var bytes = new byte[dic.Count][]; 42 | for (int i = 0; i < dic.Count; i++) 43 | bytes[i] = StringToByteArray(dic[i.ToString()]); 44 | return bytes; 45 | } 46 | return obj; 47 | } 48 | 49 | public object GetObjectToSerialize(object obj, Type targetType) 50 | { 51 | if (obj.GetType() == typeof(byte[][]) && targetType == typeof(Dictionary)) 52 | { 53 | var bytes = obj as byte[][]; 54 | var dic = new Dictionary(); 55 | for (int i = 0; i < bytes.Length; i++) 56 | dic[i.ToString()] = ByteArrayToString(bytes[i]); 57 | return dic; 58 | } 59 | return obj; 60 | } 61 | 62 | // ------- The rest of these methods are not needed ------- 63 | public object GetCustomDataToExport(MemberInfo memberInfo, Type dataContractType) 64 | { 65 | throw new NotImplementedException(); 66 | } 67 | 68 | public object GetCustomDataToExport(Type clrType, Type dataContractType) 69 | { 70 | throw new NotImplementedException(); 71 | } 72 | 73 | public void GetKnownCustomDataTypes(Collection customDataTypes) 74 | { 75 | throw new NotImplementedException(); 76 | } 77 | 78 | public Type GetReferencedTypeOnImport(string typeName, string typeNamespace, object customData) 79 | { 80 | throw new NotImplementedException(); 81 | } 82 | 83 | public CodeTypeDeclaration ProcessImportedType(CodeTypeDeclaration typeDeclaration, CodeCompileUnit compileUnit) 84 | { 85 | throw new NotImplementedException(); 86 | } 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/Json/MifareCardInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.Serialization; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace ChameleonMiniGUI.Json 9 | { 10 | [DataContract] 11 | public abstract class MifareCardInfo 12 | { 13 | public MifareModel Mifare { get; set; } 14 | 15 | [DataMember(Name = "UID", Order = 0)] 16 | public abstract string Uid { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/Json/MifareClassicCardInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.Serialization; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace ChameleonMiniGUI.Json 9 | { 10 | [DataContract] 11 | public class MifareClassicCardInfo : MifareCardInfo 12 | { 13 | MifareClassicModel mfc 14 | { 15 | get { return Mifare as MifareClassicModel; } 16 | } 17 | 18 | public MifareClassicCardInfo() 19 | { } 20 | 21 | public MifareClassicCardInfo(MifareClassicModel mfc) 22 | { 23 | Mifare = mfc; 24 | } 25 | 26 | [DataMember(Name = "UID", Order = 0)] 27 | public override string Uid 28 | { 29 | get { return MifareClassicModel.ByteArrayToString(mfc.Blocks[0].Take(4)); } 30 | set { } 31 | } 32 | 33 | [DataMember(Name = "SAK", Order = 1)] 34 | public string Sak 35 | { 36 | get { return MifareClassicModel.ByteArrayToString(mfc.Blocks[0].Skip(5).Take(1)); } 37 | set { } 38 | } 39 | 40 | [DataMember(Name = "ATQA", Order = 2)] 41 | public string Atqa 42 | { 43 | get { return MifareClassicModel.ByteArrayToString(mfc.Blocks[0].Skip(6).Take(2)); } 44 | set { } 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/Json/MifareClassicModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | 5 | using System.Linq; 6 | using System.Runtime.Serialization; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | 10 | namespace ChameleonMiniGUI.Json 11 | { 12 | 13 | [DataContract] 14 | [KnownType(typeof(MifareClassicCardInfo))] 15 | public class MifareClassicModel : MifareModel 16 | { 17 | [DataMember(Order = 1)] 18 | public override string FileType 19 | { 20 | get { return "mfcard"; } 21 | set { } 22 | } 23 | 24 | [DataMember(Name = "blocks", Order = 2)] 25 | public byte[][] Blocks { get; set; } 26 | 27 | [DataMember(Order = 3)] 28 | public MifareClassicCardInfo Card 29 | { 30 | get { return new MifareClassicCardInfo(this); } 31 | set { } 32 | } 33 | 34 | [DataMember(Order = 4)] 35 | public Dictionary SectorKeys 36 | { 37 | get 38 | { 39 | return Enumerable 40 | .Range(0, Blocks.Length <= 128 ? Blocks.Length / 4 : 32 + (Blocks.Length - 128) / 16) 41 | .ToDictionary(i => i.ToString(), i => new MifareClassicSectorKey(this, i)); 42 | } 43 | set { } 44 | } 45 | 46 | public override byte[] ToByteArray() 47 | => Blocks.SelectMany(bytes => bytes).ToArray(); 48 | 49 | public static byte[] StringToByteArray(string hex) 50 | => Enumerable.Range(0, hex.Length) 51 | .Where(x => x % 2 == 0) 52 | .Select(x => Convert.ToByte(hex.Substring(x, 2), 16)) 53 | .ToArray(); 54 | 55 | public static string ByteArrayToString(IEnumerable bytes) 56 | => string.Join("", bytes.Select(b => b.ToString("X2"))); 57 | 58 | public static byte[][] ToNestedByteArray(byte[] data, int blockSize = 16) 59 | { 60 | return Enumerable.Range(0, data.Length / blockSize) 61 | .Select(i => data.Skip(i * blockSize).Take(blockSize).ToArray()) 62 | .ToArray(); 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/Json/MifareClassicSectorKey.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.Serialization; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace ChameleonMiniGUI.Json 9 | { 10 | [DataContract] 11 | public class MifareClassicSectorKey 12 | { 13 | MifareClassicModel mfc; 14 | 15 | public MifareClassicSectorKey() 16 | { } 17 | 18 | public MifareClassicSectorKey(MifareClassicModel mfc, int sector) 19 | { 20 | this.mfc = mfc; 21 | this.SectorNumber = sector; 22 | } 23 | 24 | public int SectorNumber { get; set; } 25 | 26 | public int FirstBlockNumber 27 | { 28 | get 29 | { 30 | if (SectorNumber < 32) 31 | return SectorNumber * 4; 32 | else 33 | return 32 * 4 + (SectorNumber - 32) * 16; 34 | } 35 | } 36 | 37 | int KeyBlockNumber 38 | { 39 | get 40 | { 41 | if (SectorNumber < 32) 42 | return SectorNumber * 4 + 3; 43 | else 44 | return 32 * 4 + (SectorNumber - 32) * 16 + 15; 45 | } 46 | } 47 | 48 | public int BlockCount 49 | { 50 | get 51 | { 52 | return SectorNumber < 32 ? 4 : 16; 53 | } 54 | } 55 | 56 | [DataMember(Order = 0)] 57 | public string KeyA 58 | { 59 | get 60 | { 61 | return MifareClassicModel.ByteArrayToString(mfc.Blocks[KeyBlockNumber].Take(6)); 62 | } 63 | set { } 64 | } 65 | 66 | [DataMember(Order = 1)] 67 | public string KeyB 68 | { 69 | get 70 | { 71 | return MifareClassicModel.ByteArrayToString(mfc.Blocks[KeyBlockNumber].Skip(10).Take(6)); 72 | } 73 | set { } 74 | } 75 | 76 | [DataMember(Order = 2)] 77 | public string AccessConditions 78 | { 79 | get 80 | { 81 | return MifareClassicModel.ByteArrayToString(mfc.Blocks[KeyBlockNumber].Skip(6).Take(4)); 82 | } 83 | set { } 84 | } 85 | 86 | string GetBlockNameByConditionNumber(int i) 87 | { 88 | var start = FirstBlockNumber; 89 | if (SectorNumber < 32) 90 | return "block" + (start + i); 91 | return $"block{start + i * 5}~block{start + i * 5 + 4}"; 92 | } 93 | 94 | [DataMember(Order = 3)] 95 | public Dictionary AccessConditionsText 96 | { 97 | get 98 | { 99 | var keyBlock = mfc.Blocks[KeyBlockNumber]; 100 | var conditions = keyBlock.Skip(6).Take(4).ToArray(); 101 | var dic = new Dictionary 102 | { 103 | [GetBlockNameByConditionNumber(0)] = GetAccessConditionsDesc(0, conditions), 104 | [GetBlockNameByConditionNumber(1)] = GetAccessConditionsDesc(1, conditions), 105 | [GetBlockNameByConditionNumber(2)] = GetAccessConditionsDesc(2, conditions), 106 | ["block" + KeyBlockNumber] = GetAccessConditionsDesc(3, conditions), 107 | ["UserData"] = MifareClassicModel.ByteArrayToString(keyBlock.Skip(9).Take(1)) 108 | }; 109 | return dic; 110 | } 111 | set { } 112 | } 113 | 114 | static readonly Dictionary MfAccessConditions = new Dictionary() 115 | { 116 | [0x00] = "rdAB wrAB incAB dectrAB", 117 | [0x01] = "rdAB dectrAB", 118 | [0x02] = "rdAB", 119 | [0x03] = "rdB wrB", 120 | [0x04] = "rdAB wrB", 121 | [0x05] = "rdB", 122 | [0x06] = "rdAB wrB incB dectrAB", 123 | [0x07] = "none" 124 | }; 125 | 126 | static readonly Dictionary MfAccessConditionsTrailer = new Dictionary() 127 | { 128 | [0x00] = "rdAbyA rdCbyA rdBbyA wrBbyA", 129 | [0x01] = "wrAbyA rdCbyA wrCbyA rdBbyA wrBbyA", 130 | [0x02] = "rdCbyA rdBbyA", 131 | [0x03] = "wrAbyB rdCbyAB wrCbyB wrBbyB", 132 | [0x04] = "wrAbyB rdCbyAB wrBbyB", 133 | [0x05] = "rdCbyAB wrCbyB", 134 | [0x06] = "rdCbyAB", 135 | [0x07] = "rdCbyAB" 136 | }; 137 | 138 | static string GetAccessConditionsDesc(int blockn, byte[] data) 139 | { 140 | byte data1 = (byte)(((data[1] >> 4) & 0x0f) >> blockn); 141 | byte data2 = (byte)(((data[2]) & 0x0f) >> blockn); 142 | byte data3 = (byte)(((data[2] >> 4) & 0x0f) >> blockn); 143 | 144 | byte cond = (byte)((data1 & 0x01) << 2 | (data2 & 0x01) << 1 | (data3 & 0x01)); 145 | 146 | if (blockn == 3) 147 | { 148 | if (MfAccessConditionsTrailer.ContainsKey(cond)) 149 | return MfAccessConditionsTrailer[cond]; 150 | } 151 | else 152 | { 153 | if (MfAccessConditions.ContainsKey(cond)) 154 | return MfAccessConditions[cond]; 155 | } 156 | return "none"; 157 | } 158 | } 159 | } 160 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/Json/MifareDataContractResolver.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.Serialization; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Xml; 8 | 9 | namespace ChameleonMiniGUI.Json 10 | { 11 | public class MifareDataContractResolver : DataContractResolver 12 | { 13 | public override Type ResolveName(string typeName, string typeNamespace, Type declaredType, DataContractResolver knownTypeResolver) 14 | { 15 | throw new NotImplementedException(); 16 | } 17 | 18 | public override bool TryResolveType(Type type, Type declaredType, DataContractResolver knownTypeResolver, out XmlDictionaryString typeName, out XmlDictionaryString typeNamespace) 19 | { 20 | throw new NotImplementedException(); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/Json/MifareModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.Serialization; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace ChameleonMiniGUI.Json 9 | { 10 | [DataContract] 11 | public abstract class MifareModel 12 | { 13 | [DataMember(Order = 0)] 14 | public string Created { get; set; } 15 | 16 | [DataMember(Order = 1)] 17 | public virtual string FileType { get; set; } 18 | 19 | public abstract byte[] ToByteArray(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/Json/MifareUltralightCardInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.Serialization; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace ChameleonMiniGUI.Json 9 | { 10 | [DataContract] 11 | public class MifareUltralightCardInfo : MifareCardInfo 12 | { 13 | public const int PrefixLength = 48; 14 | public const int NewPrefixLength = 56; 15 | 16 | MifareUltralightModel mfu { get { return Mifare as MifareUltralightModel; } } 17 | 18 | [DataMember(Name = "UID", Order = 0)] 19 | public override string Uid 20 | { 21 | get 22 | { return MifareClassicModel.ByteArrayToString(mfu.Blocks[0].Take(3).Concat(mfu.Blocks[1])); } 23 | set 24 | { } 25 | } 26 | 27 | [DataMember(Order = 1)] 28 | public string Version { get; set; } 29 | 30 | [DataMember(Order = 2)] 31 | public string TBO_0 { get; set; } 32 | 33 | [DataMember(Order = 3)] 34 | public string TBO_1 { get; set; } 35 | 36 | [DataMember(Order = 4)] 37 | public string Signature { get; set; } 38 | 39 | [DataMember(Order = 5)] 40 | public string Counter0 { get; set; } 41 | 42 | [DataMember(Order = 6)] 43 | public string Tearing0 { get; set; } 44 | 45 | [DataMember(Order = 7)] 46 | public string Counter1 { get; set; } 47 | 48 | [DataMember(Order = 8)] 49 | public string Tearing1 { get; set; } 50 | 51 | [DataMember(Order = 9)] 52 | public string Counter2 { get; set; } 53 | 54 | [DataMember(Order = 10)] 55 | public string Tearing2 { get; set; } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/Languages/Chinese.txt: -------------------------------------------------------------------------------- 1 | checkBox8.Text=卡位 8 2 | checkBox7.Text=卡位 7 3 | checkBox6.Text=卡位 6 4 | checkBox5.Text=卡位 5 5 | checkBox4.Text=卡位 4 6 | checkBox3.Text=卡位 3 7 | checkBox2.Text=卡位 2 8 | checkBox1.Text=卡位 1 9 | btn_setactive.Text=跳转卡位 10 | btn_selectnone.Text=取消全选 11 | btn_selectall.Text=全部选择 12 | btn_refresh.Text=刷新状态 13 | btn_clear.Text=清空数据 14 | btn_identify.Text=Identify 15 | btn_keycalc.Text=计算侦测结果 16 | btn_apply.Text=应用设置 17 | btn_download.Text=下载数据文件 18 | btn_upload.Text=上传数据文件 19 | gb_actions.Text=可用操作 20 | lbl_size6.Text=卡片大小 21 | lbl_button6.Text=按钮设置 22 | lbl_uid6.Text=UID卡号输入 23 | lbl_mode6.Text=模式选择 24 | lbl_mode1.Text=模式选择 25 | lbl_size1.Text=卡片大小 26 | lbl_uid1.Text=UID卡号输入 27 | lbl_button1.Text=按钮设置 28 | lbl_size2.Text=卡片大小 29 | lbl_button2.Text=按钮设置 30 | lbl_uid2.Text=UID卡号输入 31 | lbl_mode2.Text=模式选择 32 | lbl_size4.Text=卡片大小 33 | lbl_button4.Text=按钮设置 34 | lbl_uid4.Text=UID卡号输入 35 | lbl_mode4.Text=模式选择 36 | lbl_size3.Text=卡片大小 37 | lbl_button3.Text=按钮设置 38 | lbl_uid3.Text=UID卡号输入 39 | lbl_mode3.Text=模式选择 40 | lbl_size5.Text=卡片大小 41 | lbl_button5.Text=按钮设置 42 | lbl_uid5.Text=UID卡号输入 43 | lbl_mode5.Text=模式选择 44 | lbl_size7.Text=卡片大小 45 | lbl_button7.Text=按钮设置 46 | lbl_uid7.Text=UID卡号输入 47 | lbl_mode7.Text=模式选择 48 | lbl_size8.Text=卡片大小 49 | lbl_button8.Text=按钮设置 50 | lbl_uid8.Text=UID卡号输入 51 | lbl_mode8.Text=模式选择 52 | tpOperation.Text=功能 53 | chkSyncScroll.Text=左右同步 54 | lbl_hbfilename2.Text=无 55 | lbl_hbfilename1.Text=无 56 | rbtn_bytewidth16.Text=16字节一组 57 | rbtn_bytewidth08.Text=8字节一组 58 | rbtn_bytewidth04.Text=4字节一组 59 | lbl_bytewidth.Text=显示方式 60 | btn_save2.Text=保存 61 | btn_open2.Text=打开 62 | btn_save1.Text=保存 63 | btn_open1.Text=打开 64 | tpDump.Text=数据文件对比 65 | btn_setInterval.Text=应用 66 | lbl_interval.Text=间隔时间 (ms) 67 | chk_keepalive.Text=自动检测设备断开 68 | gb_keepalive.Text=断开检测 69 | btn_disconnect.Text=断开连接 70 | btn_connect.Text=连接设备 71 | gb_connectionSettings.Text=连接状态 72 | lbl_defaults.Text=开始刷入固件,再次之前需要进入刷机模式 73 | lbl_reset.Text=设备复位重启 74 | btn_reset.Text=重启设备 75 | lbl_upgrade.Text=进入固件升级模式 (需要单独安装DFU驱动) 76 | btn_bootmode.Text=进入刷机模式 77 | btn_exitboot.Text=开始刷机 78 | gb_bootloader.Text=复位以及刷机 79 | lbl_defaultdownload.Text=请选择输出的卡片数据文件,默认保存路径 80 | gb_defaultdownload.Text=默认保存位置 81 | btn_rssirefresh.Text=刷新 82 | lbl_rssi.Text=当前RSSI(天线电压) 83 | gb_rssi.Text=RSSI电压 84 | tpSettings.Text=设置 85 | gb_output.Text=输出 86 | gb_language.Text=语言设置 87 | lbl_buttonlong1.Text=按钮长按设置 88 | lbl_buttonlong2.Text=按钮长按设置 89 | lbl_buttonlong3.Text=按钮长按设置 90 | lbl_buttonlong4.Text=按钮长按设置 91 | lbl_buttonlong5.Text=按钮长按设置 92 | lbl_buttonlong6.Text=按钮长按设置 93 | lbl_buttonlong7.Text=按钮长按设置 94 | lbl_buttonlong8.Text=按钮长按设置 95 | btnStartlocation.Text=打开程序根目录 96 | lbl_template.Text=模板 97 | 98 | tpUtils.Text=工具 99 | # 100 | # tab Serial 101 | # 102 | tpSerial.Text=串口 103 | gbAvailableCmds.Text=可用命令 104 | gbSerial_interface.Text=串口指令 105 | btnClearCmd.Text=清除 106 | btnSerialSend.Text=发送 107 | # 108 | # tab Dumpmanagement context menu 109 | # 110 | toolStripMenuItem1.Text=左右同步 111 | toolStripMenuItem2.Text=关闭全部 112 | btn_close1.Text=关闭 113 | btn_close2.Text=关闭 -------------------------------------------------------------------------------- /ChameleonMiniGUI/Languages/Dutch.txt: -------------------------------------------------------------------------------- 1 | checkBox8.Text=Positie 8 2 | checkBox7.Text=Positie 7 3 | checkBox6.Text=Positie 6 4 | checkBox5.Text=Positie 5 5 | checkBox4.Text=Positie 4 6 | checkBox3.Text=Positie 3 7 | checkBox2.Text=Positie 2 8 | checkBox1.Text=Positie 1 9 | btn_setactive.Text=Zet Actief 10 | btn_selectnone.Text=Onselecteer Alles 11 | btn_selectall.Text=Selecteer Alles 12 | btn_refresh.Text=Ververs 13 | btn_clear.Text=Wissen 14 | btn_identify.Text=Identify 15 | btn_keycalc.Text=mfkey32 16 | btn_apply.Text=Toepassen 17 | btn_download.Text=Download Dump 18 | btn_upload.Text=Upload Dump 19 | gb_actions.Text=Beschikbare Acties 20 | lbl_size6.Text=Formaat 21 | lbl_button6.Text=Knop 22 | lbl_uid6.Text=UID 23 | lbl_mode6.Text=Modus 24 | lbl_mode1.Text=Modus 25 | lbl_size1.Text=Formaat 26 | lbl_uid1.Text=UID 27 | lbl_button1.Text=Knop 28 | lbl_size2.Text=Formaat 29 | lbl_button2.Text=Knop 30 | lbl_uid2.Text=UID 31 | lbl_mode2.Text=Modus 32 | lbl_size4.Text=Formaat 33 | lbl_button4.Text=Knop 34 | lbl_uid4.Text=UID 35 | lbl_mode4.Text=Modus 36 | lbl_size3.Text=Formaat 37 | lbl_button3.Text=Knop 38 | lbl_uid3.Text=UID 39 | lbl_mode3.Text=Modus 40 | lbl_size5.Text=Formaat 41 | lbl_button5.Text=Knop 42 | lbl_uid5.Text=UID 43 | lbl_mode5.Text=Modus 44 | lbl_size7.Text=Formaat 45 | lbl_button7.Text=Knop 46 | lbl_uid7.Text=UID 47 | lbl_mode7.Text=Modus 48 | lbl_size8.Text=Formaat 49 | lbl_button8.Text=Knop 50 | lbl_uid8.Text=UID 51 | lbl_mode8.Text=Modus 52 | tpOperation.Text=Operatie 53 | chkSyncScroll.Text=Synchroniseer scrollen 54 | lbl_hbfilename2.Text=N/A 55 | lbl_hbfilename1.Text=N/A 56 | rbtn_bytewidth16.Text=16-byte 57 | rbtn_bytewidth08.Text=8-byte 58 | rbtn_bytewidth04.Text=4-byte 59 | lbl_bytewidth.Text=Byte breedte 60 | btn_save2.Text=Bewaar 61 | btn_open2.Text=Open 62 | btn_save1.Text=Bewaar 63 | btn_open1.Text=Open 64 | tpDump.Text=Dump Management 65 | btn_setInterval.Text=Instelllen 66 | lbl_interval.Text=Interval (ms) 67 | chk_keepalive.Text=Stuur keep-alive (VERSION commando) 68 | gb_keepalive.Text=Keep Alive 69 | btn_disconnect.Text=Verbreken 70 | btn_connect.Text=Verbinden 71 | gb_connectionSettings.Text=Connectie status 72 | lbl_defaults.Text=Flashed de fabrieksfirmware van de ChameleonMini RevE Rebooted. Bootloader modus vereist. 73 | lbl_reset.Text=Herstart de Chameleon, dat is, uitzetten en meteen daarna opstarten 74 | btn_reset.Text=Reset 75 | lbl_upgrade.Text=Zet de Chameleon in firmware upgrade modus (DFU) 76 | btn_bootmode.Text=Upgrade 77 | btn_exitboot.Text=Standaardwaardes laden 78 | gb_bootloader.Text=Reset && Bootloader opties 79 | lbl_defaultdownload.Text=Kies de standaardmap voor gedownloadde dumps 80 | gb_defaultdownload.Text=Download Locatie 81 | btn_rssirefresh.Text=Ververs 82 | lbl_rssi.Text=Huidige RSSI 83 | gb_rssi.Text=RSSI Voltage 84 | tpSettings.Text=Instellingen 85 | gb_output.Text=Uitvoer 86 | gb_language.Text=Talen && Sjablonen 87 | lbl_buttonlong1.Text=Knp Lang 88 | lbl_buttonlong2.Text=Knp Lang 89 | lbl_buttonlong3.Text=Knp Lang 90 | lbl_buttonlong4.Text=Knp Lang 91 | lbl_buttonlong5.Text=Knp Lang 92 | lbl_buttonlong6.Text=Knp Lang 93 | lbl_buttonlong7.Text=Knp Lang 94 | lbl_buttonlong8.Text=Knp Lang 95 | btnStartlocation.Text=Open locatie 96 | lbl_template.Text=Sjabloon 97 | 98 | tpUtils.Text=Utils 99 | # 100 | # tab Serial 101 | # 102 | tpSerial.Text=Seriele 103 | gbAvailableCmds.Text=Beschikbare commandos 104 | gbSerial_interface.Text=Seriele interface 105 | btnClearCmd.Text=Wissen 106 | btnSerialSend.Text=Verzenden 107 | # 108 | # tab Dumpmanagement context menu 109 | # 110 | toolStripMenuItem1.Text=Toggle Sync Scroll 111 | toolStripMenuItem2.Text=Close All 112 | btn_close1.Text=Close 113 | btn_close2.Text=Close -------------------------------------------------------------------------------- /ChameleonMiniGUI/Languages/English.txt: -------------------------------------------------------------------------------- 1 | checkBox8.Text=Slot 8 2 | checkBox7.Text=Slot 7 3 | checkBox6.Text=Slot 6 4 | checkBox5.Text=Slot 5 5 | checkBox4.Text=Slot 4 6 | checkBox3.Text=Slot 3 7 | checkBox2.Text=Slot 2 8 | checkBox1.Text=Slot 1 9 | btn_setactive.Text=Set Active 10 | btn_selectnone.Text=Unselect All 11 | btn_selectall.Text=Select All 12 | btn_refresh.Text=Refresh 13 | btn_clear.Text=Clear 14 | btn_identify.Text=Identify 15 | btn_keycalc.Text=mfkey32 16 | btn_apply.Text=Apply 17 | btn_download.Text=Download Dump 18 | btn_upload.Text=Upload Dump 19 | gb_actions.Text=Available Actions 20 | lbl_size6.Text=Size 21 | lbl_button6.Text=Button 22 | lbl_uid6.Text=UID 23 | lbl_mode6.Text=Mode 24 | lbl_mode1.Text=Mode 25 | lbl_size1.Text=Size 26 | lbl_uid1.Text=UID 27 | lbl_button1.Text=Button 28 | lbl_size2.Text=Size 29 | lbl_button2.Text=Button 30 | lbl_uid2.Text=UID 31 | lbl_mode2.Text=Mode 32 | lbl_size4.Text=Size 33 | lbl_button4.Text=Button 34 | lbl_uid4.Text=UID 35 | lbl_mode4.Text=Mode 36 | lbl_size3.Text=Size 37 | lbl_button3.Text=Button 38 | lbl_uid3.Text=UID 39 | lbl_mode3.Text=Mode 40 | lbl_size5.Text=Size 41 | lbl_button5.Text=Button 42 | lbl_uid5.Text=UID 43 | lbl_mode5.Text=Mode 44 | lbl_size7.Text=Size 45 | lbl_button7.Text=Button 46 | lbl_uid7.Text=UID 47 | lbl_mode7.Text=Mode 48 | lbl_size8.Text=Size 49 | lbl_button8.Text=Button 50 | lbl_uid8.Text=UID 51 | lbl_mode8.Text=Mode 52 | tpOperation.Text=Operation 53 | chkSyncScroll.Text=Synchronize scrolling 54 | lbl_hbfilename2.Text=N/A 55 | lbl_hbfilename1.Text=N/A 56 | rbtn_bytewidth16.Text=16-byte 57 | rbtn_bytewidth08.Text=8-byte 58 | rbtn_bytewidth04.Text=4-byte 59 | lbl_bytewidth.Text=Byte width 60 | btn_save2.Text=Save 61 | btn_open2.Text=Open 62 | btn_save1.Text=Save 63 | btn_open1.Text=Open 64 | tpDump.Text=Dump Management 65 | btn_setInterval.Text=Set 66 | lbl_interval.Text=Interval (ms) 67 | chk_keepalive.Text=Send keep-alive (VERSION command) 68 | gb_keepalive.Text=Keep Alive 69 | btn_disconnect.Text=Disconnect 70 | btn_connect.Text=Connect 71 | gb_connectionSettings.Text=Connection status 72 | lbl_defaults.Text=Flashes the stock firmware of the ChameleonMini RevE rebooted. Needs to be in bootloader mode. 73 | lbl_reset.Text=Reboots the Chameleon, i.e., power down and subsequent power-up 74 | btn_reset.Text=Reset 75 | lbl_upgrade.Text=Sets the Chameleon into firmware upgrade mode (DFU) 76 | btn_bootmode.Text=Upgrade 77 | btn_exitboot.Text=Load Defaults 78 | gb_bootloader.Text=Reset && Bootloader options 79 | lbl_defaultdownload.Text=Choose the default directory for the downloaded dumps 80 | gb_defaultdownload.Text=Download Location 81 | btn_rssirefresh.Text=Refresh 82 | lbl_rssi.Text=Current RSSI 83 | gb_rssi.Text=RSSI Voltage 84 | tpSettings.Text=Settings 85 | gb_output.Text=Output 86 | gb_language.Text=Languages && Templates 87 | lbl_buttonlong1.Text=Btn Long 88 | lbl_buttonlong2.Text=Btn Long 89 | lbl_buttonlong3.Text=Btn Long 90 | lbl_buttonlong4.Text=Btn Long 91 | lbl_buttonlong5.Text=Btn Long 92 | lbl_buttonlong6.Text=Btn Long 93 | lbl_buttonlong7.Text=Btn Long 94 | lbl_buttonlong8.Text=Btn Long 95 | btnStartlocation.Text=Open location 96 | lbl_template.Text=Template 97 | 98 | tpUtils.Text=Utils 99 | # 100 | # tab Serial 101 | # 102 | tpSerial.Text=Serial 103 | gbAvailableCmds.Text=Available commands 104 | gbSerial_interface.Text=Serial interface 105 | btnClearCmd.Text=Clear 106 | btnSerialSend.Text=Send 107 | # 108 | # tab Dumpmanagement context menu 109 | # 110 | toolStripMenuItem1.Text=Toggle Sync Scroll 111 | toolStripMenuItem2.Text=Close All 112 | btn_close1.Text=Close 113 | btn_close2.Text=Close -------------------------------------------------------------------------------- /ChameleonMiniGUI/Languages/Français.txt: -------------------------------------------------------------------------------- 1 | checkBox8.Text=Tag 8 2 | checkBox7.Text=Tag 7 3 | checkBox6.Text=Tag 6 4 | checkBox5.Text=Tag 5 5 | checkBox4.Text=Tag 4 6 | checkBox3.Text=Tag 3 7 | checkBox2.Text=Tag 2 8 | checkBox1.Text=Tag 1 9 | btn_setactive.Text=Sélection Tag 10 | btn_selectnone.Text=Tout désélectionner 11 | btn_selectall.Text=Tout sélectionner 12 | btn_refresh.Text=Rafraîchir 13 | btn_clear.Text=Effacer 14 | btn_identify.Text=Identifier 15 | btn_keycalc.Text=mfkey32 16 | btn_apply.Text=Appliquer 17 | btn_download.Text=Downloader Dump 18 | btn_upload.Text=Uploader Dump 19 | gb_actions.Text=Actions Disponibles 20 | gb_connection.Text=Statut connexion 21 | lbl_size6.Text=Taille 22 | lbl_button6.Text=Bouton 23 | lbl_uid6.Text=UID 24 | lbl_mode6.Text=Mode 25 | lbl_mode1.Text=Mode 26 | lbl_size1.Text=Taille 27 | lbl_uid1.Text=UID 28 | lbl_button1.Text=Bouton 29 | lbl_size2.Text=Taille 30 | lbl_button2.Text=Bouton 31 | lbl_uid2.Text=UID 32 | lbl_mode2.Text=Mode 33 | lbl_size4.Text=Taille 34 | lbl_button4.Text=Bouton 35 | lbl_uid4.Text=UID 36 | lbl_mode4.Text=Mode 37 | lbl_size3.Text=Taille 38 | lbl_button3.Text=Bouton 39 | lbl_uid3.Text=UID 40 | lbl_mode3.Text=Mode 41 | lbl_size5.Text=Taille 42 | lbl_button5.Text=Bouton 43 | lbl_uid5.Text=UID 44 | lbl_mode5.Text=Mode 45 | lbl_size7.Text=Taille 46 | lbl_button7.Text=Bouton 47 | lbl_uid7.Text=UID 48 | lbl_mode7.Text=Mode 49 | lbl_size8.Text=Taille 50 | lbl_button8.Text=Bouton 51 | lbl_uid8.Text=UID 52 | lbl_mode8.Text=Mode 53 | tpOperation.Text=Opérations 54 | chkSyncScroll.Text=Synchro des 2 fenêtres 55 | lbl_hbfilename2.Text=Dossier vide ouvrez un fichier 56 | lbl_hbfilename1.Text=Dossier vide ouvrez un fichier 57 | rbtn_bytewidth16.Text=16-byte 58 | rbtn_bytewidth08.Text=8-byte 59 | rbtn_bytewidth04.Text=4-byte 60 | lbl_bytewidth.Text=Longueur 61 | btn_save2.Text=Sauver 62 | btn_open2.Text=Ouvrir 63 | btn_save1.Text=Sauver 64 | btn_open1.Text=Ouvrir 65 | tpDump.Text=Gestion des Dumps 66 | btn_setInterval.Text=Appliquer 67 | lbl_interval.Text=Intervale (ms) 68 | chk_keepalive.Text=Maintenir la connexion (commande VERSION) 69 | gb_keepalive.Text=Maintien de connexion 70 | btn_disconnect.Text=Déconnecter 71 | btn_connect.Text=Connecter 72 | btn_connected.Text=Non connecté 73 | gb_connectionSettings.Text=Statut de connexion 74 | lbl_defaults.Text=Flasher le firmware stock du ChameleonMini RevE rebooted. Nécessite d'être en bootloader mode. 75 | lbl_reset.Text=Rebootez le Chameleon, il va s'éteindre et redemarrer. 76 | btn_reset.Text=Remise à zéro 77 | lbl_upgrade.Text=Mettre le Chameleon en mode firmware upgrade (DFU) 78 | btn_bootmode.Text=Upgrade firmware 79 | btn_exitboot.Text=Firmware par défaut 80 | gb_bootloader.Text=Remise à zéro et options du Bootloader 81 | lbl_defaultdownload.Text=Choisir le répertoire par défaut pour les dumps downloadés 82 | gb_defaultdownload.Text=Emplacement des dumps downloadés 83 | btn_rssirefresh.Text=Rafraîchir 84 | lbl_rssi.Text=Tension RSSI courante 85 | gb_rssi.Text=Voltage RSSI 86 | tpSettings.Text=Réglages 87 | gb_output.Text=Sortie 88 | gb_language.Text=Langages & Modèles 89 | lbl_buttonlong1.Text=Btn Long 90 | lbl_buttonlong2.Text=Btn Long 91 | lbl_buttonlong3.Text=Btn Long 92 | lbl_buttonlong4.Text=Btn Long 93 | lbl_buttonlong5.Text=Btn Long 94 | lbl_buttonlong6.Text=Btn Long 95 | lbl_buttonlong7.Text=Btn Long 96 | lbl_buttonlong8.Text=Btn Long 97 | btnStartlocation.Text=Fichiers Modèles 98 | lbl_template.Text=Modèles 99 | 100 | tpUtils.Text=Outils 101 | # 102 | # tab Terminal 103 | # 104 | tpSerial.Text=Terminal 105 | gbAvailableCmds.Text=Commandes disponibles 106 | gbSerial_interface.Text=Terminal 107 | btnClearCmd.Text=Effacer 108 | btnSerialSend.Text=Envoyer 109 | # 110 | # tab Dumpmanagement context menu 111 | # 112 | toolStripMenuItem1.Text=Synchro des 2 fenêtres 113 | toolStripMenuItem2.Text=Fermer tout 114 | btn_close1.Text=Fermer 115 | btn_close2.Text=Fermer -------------------------------------------------------------------------------- /ChameleonMiniGUI/Languages/German.txt: -------------------------------------------------------------------------------- 1 | checkBox8.Text=Konfig 8 2 | checkBox7.Text=Konfig 7 3 | checkBox6.Text=Konfig 6 4 | checkBox5.Text=Konfig 5 5 | checkBox4.Text=Konfig 4 6 | checkBox3.Text=Konfig 3 7 | checkBox2.Text=Konfig 2 8 | checkBox1.Text=Konfig 1 9 | btn_setactive.Text=Aktivieren 10 | btn_selectnone.Text=Alle Abwählen 11 | btn_selectall.Text=Alle Auswählen 12 | btn_refresh.Text=Auffrischen 13 | btn_clear.Text=Löschen 14 | btn_identify.Text=Identify 15 | btn_keycalc.Text=mfkey32 16 | btn_apply.Text=Anwenden 17 | btn_download.Text=Download Dump 18 | btn_upload.Text=Upload Dump 19 | gb_actions.Text=Verfügbare Funktionen 20 | lbl_size6.Text=Größe 21 | lbl_button6.Text=Taste 22 | lbl_uid6.Text=UID 23 | lbl_mode6.Text=Modus 24 | lbl_mode1.Text=Modus 25 | lbl_size1.Text=Größe 26 | lbl_uid1.Text=UID 27 | lbl_button1.Text=Taste 28 | lbl_size2.Text=Größe 29 | lbl_button2.Text=Taste 30 | lbl_uid2.Text=UID 31 | lbl_mode2.Text=Modus 32 | lbl_size4.Text=Größe 33 | lbl_button4.Text=Taste 34 | lbl_uid4.Text=UID 35 | lbl_mode4.Text=Modus 36 | lbl_size3.Text=Größe 37 | lbl_button3.Text=Taste 38 | lbl_uid3.Text=UID 39 | lbl_mode3.Text=Modus 40 | lbl_size5.Text=Größe 41 | lbl_button5.Text=Taste 42 | lbl_uid5.Text=UID 43 | lbl_mode5.Text=Modus 44 | lbl_size7.Text=Größe 45 | lbl_button7.Text=Taste 46 | lbl_uid7.Text=UID 47 | lbl_mode7.Text=Modus 48 | lbl_size8.Text=Größe 49 | lbl_button8.Text=Taste 50 | lbl_uid8.Text=UID 51 | lbl_mode8.Text=Modus 52 | tpOperation.Text=Operation 53 | chkSyncScroll.Text=Beide Fenster synchronisieren 54 | lbl_hbfilename2.Text=N/A 55 | lbl_hbfilename1.Text=N/A 56 | rbtn_bytewidth16.Text=16-byte 57 | rbtn_bytewidth08.Text=8-byte 58 | rbtn_bytewidth04.Text=4-byte 59 | lbl_bytewidth.Text=Länge 60 | btn_save2.Text=Speichern 61 | btn_open2.Text=Öffnen 62 | btn_save1.Text=Speichern 63 | btn_open1.Text=Öffnen 64 | tpDump.Text=Dump Verwaltung 65 | btn_setInterval.Text=Set 66 | lbl_interval.Text=Interval (ms) 67 | chk_keepalive.Text=Sende keep-alive (Befehl VERSION) 68 | gb_keepalive.Text=Keep Alive 69 | btn_disconnect.Text=Trennen 70 | btn_connect.Text=Verbinden 71 | gb_connectionSettings.Text=Verbindungsstatus 72 | lbl_defaults.Text=Schreibt die the Stock-Firmware auf das ChameleonMini RevE rebooted. Dieses muss im Firmwareupgrademodus sein. 73 | lbl_reset.Text=Starten das Chameleon neu, z.B. Aus- und wiedereinschaltwen 74 | btn_reset.Text=Zurücksetzen 75 | lbl_upgrade.Text=Versetzt das Chameleon in den Firmwareupgrade Modus (DFU) 76 | btn_bootmode.Text=Upgrade 77 | btn_exitboot.Text=Standardwerte Laden 78 | gb_bootloader.Text=Zurücksetzen && Bootloader optionen 79 | lbl_defaultdownload.Text=Auswahl des Standardverzeichnisses für die heruntergeladenen dumps 80 | gb_defaultdownload.Text=Download Ort 81 | btn_rssirefresh.Text=Auffrischen 82 | lbl_rssi.Text=Aktueller RSSI 83 | gb_rssi.Text=RSSI Spannung 84 | tpSettings.Text=Einstellungen 85 | gb_output.Text=Ausgabe 86 | gb_language.Text=Sprachen && Vorlagen 87 | lbl_buttonlong1.Text=Taste Lang 88 | lbl_buttonlong2.Text=Taste Lang 89 | lbl_buttonlong3.Text=Taste Lang 90 | lbl_buttonlong4.Text=Taste Lang 91 | lbl_buttonlong5.Text=Taste Lang 92 | lbl_buttonlong6.Text=Taste Lang 93 | lbl_buttonlong7.Text=Taste Lang 94 | lbl_buttonlong8.Text=Taste Lang 95 | btnStartlocation.Text=Öffne Speicherort 96 | lbl_template.Text=Vorlage 97 | tputils.Text=Werkzeuge 98 | # 99 | # tab Serial 100 | # 101 | tpSerial.Text=Seriell 102 | gbAvailableCmds.Text=Verfügbare Befehle 103 | gbSerial_interface.Text=Serielle Schnittstelle 104 | btnClearCmd.Text=Löschen 105 | btnSerialSend.Text=Senden 106 | Resp_SerialCommandNotSupported=Dieser Befehl wird vom seriellen Interface nicht unterstützt. Nutze das Tab "Operations" für den Upload. 107 | # 108 | # tab Dumpmanagement context menu 109 | # 110 | toolStripMenuItem1.Text=Synchronisation beider Fenster 111 | toolStripMenuItem2.Text=Alle Schließen 112 | btn_close1.Text=Schließen 113 | btn_close2.Text=Schließen -------------------------------------------------------------------------------- /ChameleonMiniGUI/Languages/Greek.txt: -------------------------------------------------------------------------------- 1 | checkBox8.Text=Θέση 8 2 | checkBox7.Text=Θέση 7 3 | checkBox6.Text=Θέση 6 4 | checkBox5.Text=Θέση 5 5 | checkBox4.Text=Θέση 4 6 | checkBox3.Text=Θέση 3 7 | checkBox2.Text=Θέση 2 8 | checkBox1.Text=Θέση 1 9 | btn_setactive.Text=Ενεργοποίηση 10 | btn_selectnone.Text=Απεπιλογή όλων 11 | btn_selectall.Text=Επιλογή όλων 12 | btn_refresh.Text=Ανανέωση 13 | btn_clear.Text=Καθαρισμός 14 | btn_identify.Text=Identify 15 | btn_keycalc.Text=mfkey32 16 | btn_apply.Text=Εφαρμογή 17 | btn_download.Text=Λήψη Dump 18 | btn_upload.Text=Αποστολή Dump 19 | gb_actions.Text=Διαθέσιμες Ενέργειες 20 | lbl_size6.Text=Μέγεθος 21 | lbl_button6.Text=Κουμπί 22 | lbl_uid6.Text=UID 23 | lbl_mode6.Text=Λειτουργία 24 | lbl_mode1.Text=Λειτουργία 25 | lbl_size1.Text=Μέγεθος 26 | lbl_uid1.Text=UID 27 | lbl_button1.Text=Κουμπί 28 | lbl_size2.Text=Μέγεθος 29 | lbl_button2.Text=Κουμπί 30 | lbl_uid2.Text=UID 31 | lbl_mode2.Text=Λειτουργία 32 | lbl_size4.Text=Μέγεθος 33 | lbl_button4.Text=Κουμπί 34 | lbl_uid4.Text=UID 35 | lbl_mode4.Text=Λειτουργία 36 | lbl_size3.Text=Μέγεθος 37 | lbl_button3.Text=Κουμπί 38 | lbl_uid3.Text=UID 39 | lbl_mode3.Text=Λειτουργία 40 | lbl_size5.Text=Μέγεθος 41 | lbl_button5.Text=Κουμπί 42 | lbl_uid5.Text=UID 43 | lbl_mode5.Text=Λειτουργία 44 | lbl_size7.Text=Μέγεθος 45 | lbl_button7.Text=Κουμπί 46 | lbl_uid7.Text=UID 47 | lbl_mode7.Text=Λειτουργία 48 | lbl_size8.Text=Μέγεθος 49 | lbl_button8.Text=Κουμπί 50 | lbl_uid8.Text=UID 51 | lbl_mode8.Text=Λειτουργία 52 | tpOperation.Text=Γενική Λειτουργία 53 | chkSyncScroll.Text=Συγχρονισμός Κύλισης 54 | lbl_hbfilename2.Text=Μ/Δ 55 | lbl_hbfilename1.Text=Μ/Δ 56 | rbtn_bytewidth16.Text=16-byte 57 | rbtn_bytewidth08.Text=8-byte 58 | rbtn_bytewidth04.Text=4-byte 59 | lbl_bytewidth.Text=Μήκος Byte 60 | btn_save2.Text=Αποθήκευση 61 | btn_open2.Text=Άνοιγμα 62 | btn_save1.Text=Αποθήκευση 63 | btn_open1.Text=Άνοιγμα 64 | tpDump.Text=Διαχείριση Dump 65 | btn_setInterval.Text=Ορισμός 66 | lbl_interval.Text=Μεσοδιάστημα (ms) 67 | chk_keepalive.Text=Αποστολή μηνύματος ελέγχου διατήρησης σύνδεσης (εντολή VERSION) 68 | gb_keepalive.Text=Έλεγχος διατήρησης σύνδεσης 69 | btn_disconnect.Text=Αποσύνδεση 70 | btn_connect.Text=Σύνδεση 71 | gb_connectionSettings.Text=Κατάσταση σύνδεσης 72 | lbl_defaults.Text=Προγραμματίζει το αρχικό firmware του ChameleonMini RevE rebooted. Χρειάζεται να βρίσκεται σε λειτουργία bootloader. 73 | lbl_reset.Text=Επανεκκινεί το Chameleon (Διακόπτεται η παροχή ρεύματος και στη συνέχεια επανατροφοδοτείται) 74 | btn_reset.Text=Επαναφορά 75 | lbl_upgrade.Text=Θέτει το Chameleon σε λειτουργία αναβάθμισης του firmware (DFU) 76 | btn_bootmode.Text=Αναβάθμιση 77 | btn_exitboot.Text=Φόρτωση προεπιλογών 78 | gb_bootloader.Text=Επαναφορά && επιλογές Bootloader 79 | lbl_defaultdownload.Text=Επιλέξτε την προεπιλεγμένη διαδρομή για την λήψη των dumps 80 | gb_defaultdownload.Text=Διαδρομή λήψεων 81 | btn_rssirefresh.Text=Ανανέωση 82 | lbl_rssi.Text=Τρέχον RSSI 83 | gb_rssi.Text=Τάση RSSI 84 | tpSettings.Text=Ρυθμίσεις 85 | gb_output.Text=Παράθυρο καταγραφής γεγονότων 86 | gb_language.Text=Γλώσσες && Θέματα 87 | lbl_buttonlong1.Text=Κουμπί παρατετ. 88 | lbl_buttonlong2.Text=Κουμπί παρατετ. 89 | lbl_buttonlong3.Text=Κουμπί παρατετ. 90 | lbl_buttonlong4.Text=Κουμπί παρατετ. 91 | lbl_buttonlong5.Text=Κουμπί παρατετ. 92 | lbl_buttonlong6.Text=Κουμπί παρατετ. 93 | lbl_buttonlong7.Text=Κουμπί παρατετ. 94 | lbl_buttonlong8.Text=Κουμπί παρατετ. 95 | btnStartlocation.Text=Άνοιγμα τοποθεσίας 96 | lbl_template.Text=Θέμα 97 | tpUtils.Text=Utils 98 | # 99 | # tab Serial 100 | # 101 | tpSerial.Text=Σειριακή 102 | gbAvailableCmds.Text=Διαθέσιμες εντολές 103 | gbSerial_interface.Text=Σειριακή διεπαφή 104 | btnClearCmd.Text=Καθαρισμός 105 | btnSerialSend.Text=Αποστολή 106 | # 107 | # tab Dumpmanagement context menu 108 | # 109 | toolStripMenuItem1.Text=Συγχρονισμός Κύλισης 110 | toolStripMenuItem2.Text=Close All 111 | btn_close1.Text=Close 112 | btn_close2.Text=Close 113 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/Languages/Italiano.txt: -------------------------------------------------------------------------------- 1 | checkBox8.Text=Slot Memoria 8 2 | checkBox7.Text=Slot Memoria 7 3 | checkBox6.Text=Slot Memoria 6 4 | checkBox5.Text=Slot Memoria 5 5 | checkBox4.Text=Slot Memoria 4 6 | checkBox3.Text=Slot Memoria 3 7 | checkBox2.Text=Slot Memoria 2 8 | checkBox1.Text=Slot Memoria 1 9 | btn_setactive.Text=Imposta Attivo 10 | btn_selectnone.Text=Deseleziona Tutto 11 | btn_selectall.Text=Seleziona Tutto 12 | btn_refresh.Text=Aggiorna 13 | btn_clear.Text=Pulisci 14 | btn_identify.Text=Identify 15 | btn_keycalc.Text=mfkey32 16 | btn_apply.Text=Applica 17 | btn_download.Text=Scarica Dump 18 | btn_upload.Text=Carica Dump 19 | gb_actions.Text=Azioni Disponibili 20 | lbl_size6.Text=Dimensione 21 | lbl_button6.Text=Pulsante 22 | lbl_uid6.Text=UID 23 | lbl_mode6.Text=Modalità 24 | lbl_mode1.Text=Modalità 25 | lbl_size1.Text=Dimensione 26 | lbl_uid1.Text=UID 27 | lbl_button1.Text=Pulsante 28 | lbl_size2.Text=Dimensione 29 | lbl_button2.Text=Pulsante 30 | lbl_uid2.Text=UID 31 | lbl_mode2.Text=Modalità 32 | lbl_size4.Text=Dimensione 33 | lbl_button4.Text=Pulsante 34 | lbl_uid4.Text=UID 35 | lbl_mode4.Text=Modalità 36 | lbl_size3.Text=Dimensione 37 | lbl_button3.Text=Pulsante 38 | lbl_uid3.Text=UID 39 | lbl_mode3.Text=Modalità 40 | lbl_size5.Text=Dimensione 41 | lbl_button5.Text=Pulsante 42 | lbl_uid5.Text=UID 43 | lbl_mode5.Text=Modalità 44 | lbl_size7.Text=Dimensione 45 | lbl_button7.Text=Pulsante 46 | lbl_uid7.Text=UID 47 | lbl_mode7.Text=Modalità 48 | lbl_size8.Text=Dimensione 49 | lbl_button8.Text=Pulsante 50 | lbl_uid8.Text=UID 51 | lbl_mode8.Text=Modalità 52 | tpOperation.Text=Funzionalità 53 | chkSyncScroll.Text=Sincronizza scrolling 54 | lbl_hbfilename2.Text=N/A 55 | lbl_hbfilename1.Text=N/A 56 | rbtn_bytewidth16.Text=16-byte 57 | rbtn_bytewidth08.Text=8-byte 58 | rbtn_bytewidth04.Text=4-byte 59 | lbl_bytewidth.Text=Ampiezza Byte 60 | btn_save2.Text=Salva 61 | btn_open2.Text=Apri 62 | btn_save1.Text=Salva 63 | btn_open1.Text=Apri 64 | tpDump.Text=Gestione Dump 65 | btn_setInterval.Text=Imposta 66 | lbl_interval.Text=Intervallo (ms) 67 | chk_keepalive.Text=Invia keep-alive (VERSION command) 68 | gb_keepalive.Text=Keep Alive 69 | btn_disconnect.Text=Disconnetti 70 | btn_connect.Text=Connetti 71 | gb_connectionSettings.Text=Stato connessione 72 | lbl_defaults.Text=Flasha il firmware stock del ChameleonMini RevE rebooted. E'necessario essere nella modalità bootloader. 73 | lbl_reset.Text=Riavvia Chameleon (spegne e riavvia) 74 | btn_reset.Text=Reset 75 | lbl_upgrade.Text=Imposta il Chameleon in modalità aggiornamento firmware (DFU) 76 | btn_bootmode.Text=Aggiorna 77 | btn_exitboot.Text=Carica Predefiniti 78 | gb_bootloader.Text=Opzioni Reset && Bootloader 79 | lbl_defaultdownload.Text=Scegli una cartella per i dumps scaricati 80 | gb_defaultdownload.Text=Percorso Scaricamento 81 | btn_rssirefresh.Text=Aggiorna 82 | lbl_rssi.Text=RSSI Attuale 83 | gb_rssi.Text=RSSI Voltage 84 | tpSettings.Text=Impostazioni 85 | gb_output.Text=Output 86 | gb_language.Text=Lingua && Modelli 87 | lbl_buttonlong1.Text=Pulsante a Lungo 88 | lbl_buttonlong2.Text=Pulsante a Lungo 89 | lbl_buttonlong3.Text=Pulsante a Lungo 90 | lbl_buttonlong4.Text=Pulsante a Lungo 91 | lbl_buttonlong5.Text=Pulsante a Lungo 92 | lbl_buttonlong6.Text=Pulsante a Lungo 93 | lbl_buttonlong7.Text=Pulsante a Lungo 94 | lbl_buttonlong8.Text=Pulsante a Lungo 95 | btnStartlocation.Text=Apri percorso 96 | lbl_template.Text=Modello 97 | tpUtils.Text=Utils 98 | # 99 | # tab Serial 100 | # 101 | tpSerial.Text=Seriale 102 | gbAvailableCmds.Text=Comandi disponibili 103 | gbSerial_interface.Text=Interfaccia Seriale 104 | btnClearCmd.Text=Pulisci 105 | btnSerialSend.Text=Invia 106 | # 107 | # tab Dumpmanagement context menu 108 | # 109 | toolStripMenuItem1.Text=Sincronizza scrolling 110 | toolStripMenuItem2.Text=Close All 111 | btn_close1.Text=Close 112 | btn_close2.Text=Close -------------------------------------------------------------------------------- /ChameleonMiniGUI/Languages/Spanish.txt: -------------------------------------------------------------------------------- 1 | checkBox8.Text=Tag 8 2 | checkBox7.Text=Tag 7 3 | checkBox6.Text=Tag 6 4 | checkBox5.Text=Tag 5 5 | checkBox4.Text=Tag 4 6 | checkBox3.Text=Tag 3 7 | checkBox2.Text=Tag 2 8 | checkBox1.Text=Tag 1 9 | btn_setactive.Text=Selecciona Tarj 10 | btn_selectnone.Text=Deselecc. todo 11 | btn_selectall.Text=Selecc. todo 12 | btn_refresh.Text=Actualizar 13 | btn_clear.Text=Eliminar 14 | btn_identify.Text=Identificar 15 | btn_keycalc.Text=mfkey32 16 | btn_apply.Text=Aplicar 17 | btn_download.Text=Descargar Dump 18 | btn_upload.Text=Subir Dump 19 | gb_actions.Text=Acciones Disponibles 20 | lbl_size6.Text=Tamaño 21 | lbl_button6.Text=Botón 22 | lbl_uid6.Text=UID 23 | lbl_mode6.Text=Modo 24 | lbl_mode1.Text=Modo 25 | lbl_size1.Text=Tamaño 26 | lbl_uid1.Text=UID 27 | lbl_button1.Text=Botón 28 | lbl_size2.Text=Tamaño 29 | lbl_button2.Text=Botón 30 | lbl_uid2.Text=UID 31 | lbl_mode2.Text=Modo 32 | lbl_size4.Text=Tamaño 33 | lbl_button4.Text=Botón 34 | lbl_uid4.Text=UID 35 | lbl_mode4.Text=Modo 36 | lbl_size3.Text=Tamaño 37 | lbl_button3.Text=Botón 38 | lbl_uid3.Text=UID 39 | lbl_mode3.Text=Modo 40 | lbl_size5.Text=Tamaño 41 | lbl_button5.Text=Botón 42 | lbl_uid5.Text=UID 43 | lbl_mode5.Text=Modo 44 | lbl_size7.Text=Tamaño 45 | lbl_button7.Text=Botón 46 | lbl_uid7.Text=UID 47 | lbl_mode7.Text=Modo 48 | lbl_size8.Text=Tamaño 49 | lbl_button8.Text=Botón 50 | lbl_uid8.Text=UID 51 | lbl_mode8.Text=Modo 52 | tpOperation.Text=Operaciones 53 | chkSyncScroll.Text=Sincron las 2 bandejas 54 | lbl_hbfilename2.Text=Vaciar la carpeta, abrir un archivo 55 | lbl_hbfilename1.Text=Vaciar la carpeta, abrir un archivo 56 | rbtn_bytewidth16.Text=16-byte 57 | rbtn_bytewidth08.Text=8-byte 58 | rbtn_bytewidth04.Text=4-byte 59 | lbl_bytewidth.Text=Longitud 60 | btn_save2.Text=Guardar 61 | btn_open2.Text=Abrir 62 | btn_save1.Text=Guardar 63 | btn_open1.Text=Abrir 64 | tpDump.Text=Gestionar Dump 65 | btn_setInterval.Text=Aplicar 66 | lbl_interval.Text=Intervalo (ms) 67 | chk_keepalive.Text=Enviar estando conectado (Control de Versiones) 68 | gb_keepalive.Text=Mantengase conectado 69 | btn_disconnect.Text=Desconectar 70 | btn_connect.Text=Conectar 71 | gb_connectionSettings.Text=Estado de Conexión 72 | lbl_defaults.Text=Flash del firmware de ChameleonMini RevE rebooted. Debe de estar en modo BOOTLOADER 73 | lbl_reset.Text=Reiniciar el ChameleonMini, se apaga y reinicia. 74 | btn_reset.Text=Resetear 75 | lbl_upgrade.Text=Poner el ChameleonMini en modo actualización de firmware (DFU) 76 | btn_bootmode.Text=Actualizar firmware 77 | btn_exitboot.Text=Firmware por defecto 78 | gb_bootloader.Text=Resetear & Opciones de Bootloader 79 | lbl_defaultdownload.Text=Elija el directorio por defecto para el volcado de las descargas 80 | gb_defaultdownload.Text=Ubicación de los dumps descargados 81 | btn_rssirefresh.Text=Refrescar 82 | lbl_rssi.Text=Actual RSSI 83 | gb_rssi.Text=RSSI Voltaje 84 | tpSettings.Text=Configuración 85 | gb_output.Text=Salir 86 | gb_language.Text=Lenguajes && Modelos 87 | lbl_buttonlong1.Text=Btn Largo 88 | lbl_buttonlong2.Text=Btn Largo 89 | lbl_buttonlong3.Text=Btn Largo 90 | lbl_buttonlong4.Text=Btn Largo 91 | lbl_buttonlong5.Text=Btn Largo 92 | lbl_buttonlong6.Text=Btn Largo 93 | lbl_buttonlong7.Text=Btn Largo 94 | lbl_buttonlong8.Text=Btn Largo 95 | btnStartlocation.Text=Abrir ubicación 96 | lbl_template.Text=Modelos 97 | tpUtils.Text=Utiles 98 | # 99 | # tab Terminal 100 | # 101 | tpSerial.Text=Terminal 102 | gbAvailableCmds.Text=Enlaces disponibles 103 | gbSerial_interface.Text=Terminal Comandos 104 | btnClearCmd.Text=Eliminar 105 | btnSerialSend.Text=Enviar 106 | # 107 | # tab Dumpmanagement context menu 108 | # 109 | toolStripMenuItem1.Text=Alternar Sincron. desplazamiento 110 | toolStripMenuItem2.Text=Cierra todo 111 | btn_close1.Text=Cerrar 112 | btn_close2.Text=Cerrar -------------------------------------------------------------------------------- /ChameleonMiniGUI/Languages/Svenska.txt: -------------------------------------------------------------------------------- 1 | checkBox8.Text=Slot 8 2 | checkBox7.Text=Slot 7 3 | checkBox6.Text=Slot 6 4 | checkBox5.Text=Slot 5 5 | checkBox4.Text=Slot 4 6 | checkBox3.Text=Slot 3 7 | checkBox2.Text=Slot 2 8 | checkBox1.Text=Slot 1 9 | btn_setactive.Text=Välj aktiv 10 | btn_selectnone.Text=Välj ingen 11 | btn_selectall.Text=Välj alla 12 | btn_refresh.Text=Uppdatera 13 | btn_clear.Text=Rensa 14 | btn_identify.Text=Identify 15 | btn_keycalc.Text=mfkey32 16 | btn_apply.Text=Applicera 17 | btn_download.Text=Ladda ned Dump 18 | btn_upload.Text=Ladda upp Dump 19 | gb_actions.Text=Tillgängliga kommandon 20 | lbl_size6.Text=Storlek 21 | lbl_button6.Text=Knapp 22 | lbl_uid6.Text=UID 23 | lbl_mode6.Text=Mode 24 | lbl_mode1.Text=Mode 25 | lbl_size1.Text=Storlek 26 | lbl_uid1.Text=UID 27 | lbl_button1.Text=Knapp 28 | lbl_size2.Text=Storlek 29 | lbl_button2.Text=Knapp 30 | lbl_uid2.Text=UID 31 | lbl_mode2.Text=Mode 32 | lbl_size4.Text=Storlek 33 | lbl_button4.Text=Knapp 34 | lbl_uid4.Text=UID 35 | lbl_mode4.Text=Mode 36 | lbl_size3.Text=Storlek 37 | lbl_button3.Text=Knapp 38 | lbl_uid3.Text=UID 39 | lbl_mode3.Text=Mode 40 | lbl_size5.Text=Storlek 41 | lbl_button5.Text=Knapp 42 | lbl_uid5.Text=UID 43 | lbl_mode5.Text=Mode 44 | lbl_size7.Text=Storlek 45 | lbl_button7.Text=Knapp 46 | lbl_uid7.Text=UID 47 | lbl_mode7.Text=Mode 48 | lbl_size8.Text=Storlek 49 | lbl_button8.Text=Knapp 50 | lbl_uid8.Text=UID 51 | lbl_mode8.Text=Mode 52 | tpOperation.Text=Operation 53 | chkSyncScroll.Text=Synkronisera scrollning 54 | lbl_hbfilename2.Text=N/A 55 | lbl_hbfilename1.Text=N/A 56 | rbtn_bytewidth16.Text=16-byte 57 | rbtn_bytewidth08.Text=8-byte 58 | rbtn_bytewidth04.Text=4-byte 59 | lbl_bytewidth.Text=bredd 60 | btn_save2.Text=Spara 61 | btn_open2.Text=Öppna 62 | btn_save1.Text=Spara 63 | btn_open1.Text=Öppna 64 | tpDump.Text=Dump Hantering 65 | btn_setInterval.Text=Sätt 66 | lbl_interval.Text=Interval (ms) 67 | chk_keepalive.Text=Skicka keep-alive (VERSION command) 68 | gb_keepalive.Text=Keep Alive 69 | btn_disconnect.Text=Koppla ifrån 70 | btn_connect.Text=Koppla upp 71 | gb_connectionSettings.Text=Status Uppkoppling 72 | lbl_defaults.Text=Uppdaterar original firmware för ChameleonMini RevE rebooted. Måste vara i bootloader läge. 73 | lbl_reset.Text=Start om Chameleon 74 | btn_reset.Text=Starta om 75 | lbl_upgrade.Text=Sätt Chameleon i bootloader läge (DFU) 76 | btn_bootmode.Text=Uppdatera 77 | btn_exitboot.Text=Ladda default värden 78 | gb_bootloader.Text=Reset && Bootloader val 79 | lbl_defaultdownload.Text=Välj default folder för nedladdade dumpfiler 80 | gb_defaultdownload.Text=Nedladdingsfolder 81 | btn_rssirefresh.Text=Uppdatera 82 | lbl_rssi.Text=Nuvarande RSSI 83 | gb_rssi.Text=RSSI Volt 84 | tpSettings.Text=Settings 85 | gb_output.Text=Output 86 | gb_language.Text=Språk & Mallar 87 | lbl_buttonlong1.Text=KnappLång 88 | lbl_buttonlong2.Text=KnappLång 89 | lbl_buttonlong3.Text=KnappLång 90 | lbl_buttonlong4.Text=KnappLång 91 | lbl_buttonlong5.Text=KnappLång 92 | lbl_buttonlong6.Text=KnappLång 93 | lbl_buttonlong7.Text=KnappLång 94 | lbl_buttonlong8.Text=KnappLång 95 | btnStartlocation.Text=Öppna folder 96 | lbl_template.Text=Mall 97 | tpUtils.Text=Utils 98 | # 99 | # tab Serial 100 | # 101 | tpSerial.Text=Serial 102 | gbAvailableCmds.Text=Tillgängliga kommandon 103 | gbSerial_interface.Text=Serial interface 104 | btnClearCmd.Text=Töm 105 | btnSerialSend.Text=Skicka 106 | # 107 | # tab Dumpmanagement context menu 108 | # 109 | toolStripMenuItem1.Text=Synkronisera scrollning 110 | toolStripMenuItem2.Text=Stäng alla 111 | btn_close1.Text=Stäng 112 | btn_close2.Text=Stäng -------------------------------------------------------------------------------- /ChameleonMiniGUI/Legend/IlegendItem.cs: -------------------------------------------------------------------------------- 1 | namespace ChameleonMiniGUI 2 | { 3 | public interface IlegendItem 4 | { 5 | string ForeGroundColor { get; set; } 6 | string BackGroundColor { get; set; } 7 | string Description { get; set; } 8 | } 9 | 10 | public class LegendItem : IlegendItem 11 | { 12 | public string ForeGroundColor { get; set; } 13 | public string BackGroundColor { get; set; } 14 | public string Description { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /ChameleonMiniGUI/Legend/Legend.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Drawing; 4 | using System.Drawing.Drawing2D; 5 | using System.Linq; 6 | 7 | namespace ChameleonMiniGUI 8 | { 9 | public class Legend 10 | { 11 | public string Title { get; set; } 12 | 13 | public bool IsLegendVisible { get; set; } 14 | 15 | public bool IsBorderVisible { get; set; } 16 | 17 | public Color LegendBackColor1 { get; set; } 18 | 19 | public Color LegendBackColor2 { get; set; } 20 | 21 | public Color LegendBorderColor { get; set; } 22 | 23 | public Font Legendfont { get; set; } 24 | 25 | public Point LegendPosition { get; set; } 26 | 27 | private float _spacing; 28 | 29 | public Legend() 30 | { 31 | Title = "Legend"; 32 | LegendPosition = new Point(0, 0); 33 | Legendfont = SystemFonts.DefaultFont; 34 | LegendBackColor1 = Color.White; 35 | LegendBorderColor = Color.DarkGray; 36 | } 37 | 38 | public void AddLegend(Graphics g, List list) 39 | { 40 | this.AddLegend(g, LegendPosition, list); 41 | } 42 | 43 | public void AddLegend(Graphics g, Point legendPos, List list) 44 | { 45 | if (!IsLegendVisible) return; 46 | 47 | if (!list.Any()) return; 48 | 49 | var height = 0.0f; 50 | var box_Width = 0.0f; 51 | var box_height = 0.0f; 52 | 53 | foreach (var item in list) 54 | { 55 | var size = g.MeasureString(item.Description, Legendfont); 56 | 57 | if ((box_Width < size.Width)) 58 | box_Width = size.Width; 59 | 60 | if ((height < size.Height)) 61 | height = size.Height; 62 | } 63 | 64 | // legendWidth += 10 + _spacing + _spacing 65 | box_Width += (_spacing + _spacing); 66 | 67 | box_height = list.Count * height + 10.0F; // add extra marginal 68 | 69 | box_Width += 26; 70 | 71 | var offset = 16.0f; 72 | var xc = (legendPos.X + offset); 73 | float yc = legendPos.Y; 74 | 75 | DrawLegend(g, xc, yc, box_Width, box_height, height, list); 76 | } 77 | 78 | public void DrawLegend(Graphics g, float pos_x, float pos_y, float legend_width, float legend_height, float lineHeight, List list) 79 | { 80 | if (!IsLegendVisible) return; 81 | 82 | var pen = new Pen(LegendBorderColor, 1.0F); 83 | SolidBrush brush = null; 84 | Rectangle legendRect; 85 | 86 | try 87 | { 88 | legendRect = new Rectangle((int) pos_x, (int) pos_y, (int) legend_width, (int) legend_height); 89 | 90 | brush = new SolidBrush(LegendBackColor1); 91 | 92 | g.FillRectangle(brush, legendRect); 93 | 94 | if (IsBorderVisible) 95 | g.DrawRectangle(pen, legendRect); 96 | } 97 | finally 98 | { 99 | brush?.Dispose(); 100 | } 101 | 102 | Brush txtBrush = null; 103 | 104 | try 105 | { 106 | var row_height = (int) (_spacing + lineHeight); 107 | 108 | var sq_X = legendRect.X + (int) _spacing; 109 | var sq_Y = legendRect.Y + row_height; 110 | 111 | var rect = new Rectangle(sq_X, sq_Y, (int)legend_width, row_height); 112 | var sf = new StringFormat 113 | { 114 | Alignment = StringAlignment.Near, 115 | Trimming = StringTrimming.EllipsisCharacter 116 | }; 117 | 118 | foreach (var item in list) 119 | { 120 | txtBrush = GetColor(item.ForeGroundColor); 121 | 122 | // Square 123 | DrawSquare(g, rect, item.BackGroundColor); 124 | 125 | g.DrawString(item.Description, Legendfont, txtBrush, rect.X + 18, rect.Y - 1, sf); 126 | // *** One step down. 127 | rect.Y += (int) (lineHeight + _spacing); 128 | } 129 | } 130 | finally 131 | { 132 | txtBrush?.Dispose(); 133 | } 134 | } 135 | 136 | public void DrawSquare(Graphics g, Rectangle rect, string color) 137 | { 138 | if (g == null) return; 139 | 140 | try 141 | { 142 | g.FillRectangle(GetColor(color), rect); 143 | } 144 | catch (Exception ex) 145 | { 146 | } 147 | } 148 | 149 | private Brush GetColor(string color) 150 | { 151 | var b = Brushes.Aqua; 152 | if (!string.IsNullOrWhiteSpace(color)) 153 | { 154 | b = new SolidBrush(Color.FromName(color)); 155 | } 156 | return b; 157 | } 158 | 159 | public override string ToString() 160 | { 161 | return $"Legend: {Title}"; 162 | } 163 | } 164 | } -------------------------------------------------------------------------------- /ChameleonMiniGUI/Legend/UcLegend.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace ChameleonMiniGUI 2 | { 3 | partial class UcLegend 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Component Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.gpLegend = new System.Windows.Forms.GroupBox(); 32 | this.flpLegend = new System.Windows.Forms.FlowLayoutPanel(); 33 | this.panel2 = new System.Windows.Forms.Panel(); 34 | this.btnToggle = new System.Windows.Forms.Button(); 35 | this.gpLegend.SuspendLayout(); 36 | this.panel2.SuspendLayout(); 37 | this.SuspendLayout(); 38 | // 39 | // gpLegend 40 | // 41 | this.gpLegend.AutoSize = true; 42 | this.gpLegend.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; 43 | this.gpLegend.Controls.Add(this.flpLegend); 44 | this.gpLegend.Controls.Add(this.panel2); 45 | this.gpLegend.Dock = System.Windows.Forms.DockStyle.Fill; 46 | this.gpLegend.Location = new System.Drawing.Point(0, 0); 47 | this.gpLegend.MaximumSize = new System.Drawing.Size(180, 300); 48 | this.gpLegend.MinimumSize = new System.Drawing.Size(180, 24); 49 | this.gpLegend.Name = "gpLegend"; 50 | this.gpLegend.Size = new System.Drawing.Size(180, 42); 51 | this.gpLegend.TabIndex = 0; 52 | this.gpLegend.TabStop = false; 53 | this.gpLegend.Text = "Color legend"; 54 | // 55 | // flpLegend 56 | // 57 | this.flpLegend.AutoScroll = true; 58 | this.flpLegend.AutoSize = true; 59 | this.flpLegend.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; 60 | this.flpLegend.Dock = System.Windows.Forms.DockStyle.Fill; 61 | this.flpLegend.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; 62 | this.flpLegend.Location = new System.Drawing.Point(3, 39); 63 | this.flpLegend.Name = "flpLegend"; 64 | this.flpLegend.Size = new System.Drawing.Size(174, 0); 65 | this.flpLegend.TabIndex = 0; 66 | this.flpLegend.WrapContents = false; 67 | // 68 | // panel2 69 | // 70 | this.panel2.AutoSize = true; 71 | this.panel2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; 72 | this.panel2.Controls.Add(this.btnToggle); 73 | this.panel2.Dock = System.Windows.Forms.DockStyle.Top; 74 | this.panel2.Location = new System.Drawing.Point(3, 16); 75 | this.panel2.Name = "panel2"; 76 | this.panel2.Size = new System.Drawing.Size(174, 23); 77 | this.panel2.TabIndex = 2; 78 | // 79 | // btnToggle 80 | // 81 | this.btnToggle.Location = new System.Drawing.Point(0, 0); 82 | this.btnToggle.Name = "btnToggle"; 83 | this.btnToggle.Size = new System.Drawing.Size(20, 20); 84 | this.btnToggle.TabIndex = 1; 85 | this.btnToggle.Tag = "280"; 86 | this.btnToggle.Text = "+"; 87 | this.btnToggle.UseVisualStyleBackColor = true; 88 | this.btnToggle.Click += new System.EventHandler(this.button1_Click); 89 | // 90 | // UcLegend 91 | // 92 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 93 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 94 | this.AutoSize = true; 95 | this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; 96 | this.Controls.Add(this.gpLegend); 97 | this.DoubleBuffered = true; 98 | this.MaximumSize = new System.Drawing.Size(180, 300); 99 | this.Name = "UcLegend"; 100 | this.Size = new System.Drawing.Size(180, 42); 101 | this.gpLegend.ResumeLayout(false); 102 | this.gpLegend.PerformLayout(); 103 | this.panel2.ResumeLayout(false); 104 | this.ResumeLayout(false); 105 | this.PerformLayout(); 106 | 107 | } 108 | 109 | #endregion 110 | 111 | private System.Windows.Forms.GroupBox gpLegend; 112 | private System.Windows.Forms.FlowLayoutPanel flpLegend; 113 | private System.Windows.Forms.Button btnToggle; 114 | private System.Windows.Forms.Panel panel2; 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/Legend/UcLegend.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Drawing; 4 | using System.Linq; 5 | using System.Windows.Forms; 6 | 7 | namespace ChameleonMiniGUI 8 | { 9 | public partial class UcLegend : UserControl 10 | { 11 | public string Title 12 | { 13 | get { return gpLegend.Text; } 14 | set { gpLegend.Text = value; } 15 | } 16 | 17 | private IEnumerable _items; 18 | public IEnumerable Items { 19 | get { return _items; } 20 | set { 21 | _items = value; 22 | Updatelegend(); 23 | } 24 | } 25 | 26 | public bool Expanded { get; set; } 27 | 28 | 29 | public UcLegend() 30 | { 31 | InitializeComponent(); 32 | 33 | Items = new List(); 34 | this.Title = "Legend"; 35 | this.Expanded = false; 36 | flpLegend.Visible = false; 37 | flpLegend.AutoScroll = false; 38 | } 39 | 40 | private void Updatelegend() 41 | { 42 | flpLegend.Controls.Clear(); 43 | if (Items == null || !Items.Any()) return; 44 | 45 | var w = gpLegend.ClientSize.Width; 46 | 47 | foreach (var item in Items) 48 | { 49 | var o = new Label 50 | { 51 | BackColor = Color.FromName(item.BackGroundColor), 52 | ForeColor = Color.FromName(item.ForeGroundColor), 53 | Text = item.Description, 54 | TextAlign = ContentAlignment.MiddleLeft, 55 | Margin = new Padding(0, 1, 1, 0), 56 | Width = w 57 | }; 58 | flpLegend.Controls.Add(o); 59 | } 60 | } 61 | 62 | private void button1_Click(object sender, EventArgs e) 63 | { 64 | if (Expanded) 65 | { 66 | flpLegend.Visible = false; 67 | btnToggle.Text = "+"; 68 | } 69 | else 70 | { 71 | flpLegend.Visible = true; 72 | flpLegend.BringToFront(); 73 | btnToggle.Text = "-"; 74 | } 75 | Expanded = !Expanded; 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/Legend/UcLegend.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/Log/LogEntryType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace ChameleonMiniGUI.Log 8 | { 9 | public enum LogEntryType 10 | { 11 | LOG_INFO_GENERIC = 0x10, // Unspecific log entry. 12 | LOG_INFO_CONFIG_SET = 0x11, // Configuration change. 13 | LOG_INFO_SETTING_SET = 0x12, // Setting change. 14 | LOG_INFO_UID_SET = 0x13, // UID change. 15 | LOG_INFO_RESET_APP = 0x20, // Application reset. 16 | 17 | /* Codec */ 18 | LOG_INFO_CODEC_RX_DATA = 0x40, // Currently active codec received data. 19 | LOG_INFO_CODEC_TX_DATA = 0x41, // Currently active codec sent data. 20 | LOG_INFO_CODEC_RX_DATA_W_PARITY = 0x42, // Currently active codec received data. 21 | LOG_INFO_CODEC_TX_DATA_W_PARITY = 0x43, // Currently active codec sent data. 22 | 23 | LOG_INFO_CODEC_SNI_READER_DATA = 0x44, // Sniffing codec receive data from reader 24 | LOG_INFO_CODEC_SNI_READER_DATA_W_PARITY = 0x45, // Sniffing codec receive data from reader 25 | 26 | LOG_INFO_CODEC_SNI_CARD_DATA = 0x46, // Sniffing codec receive data from card 27 | LOG_INFO_CODEC_SNI_CARD_DATA_W_PARITY = 0x47, // Sniffing codec receive data from card 28 | 29 | /* App */ 30 | LOG_INFO_APP_CMD_READ = 0x80, // Application processed read command. 31 | LOG_INFO_APP_CMD_WRITE = 0x81, // Application processed write command. 32 | LOG_INFO_APP_CMD_INC = 0x84, // Application processed increment command. 33 | LOG_INFO_APP_CMD_DEC = 0x85, // Application processed decrement command. 34 | LOG_INFO_APP_CMD_TRANSFER = 0x86, // Application processed transfer command. 35 | LOG_INFO_APP_CMD_RESTORE = 0x87, // Application processed restore command. 36 | LOG_INFO_APP_CMD_AUTH = 0x90, // Application processed authentication command. 37 | LOG_INFO_APP_CMD_HALT = 0x91, // Application processed halt command. 38 | LOG_INFO_APP_CMD_UNKNOWN = 0x92, // Application processed an unknown command. 39 | LOG_INFO_APP_AUTHING = 0xA0, // Application is in `authing` state. 40 | LOG_INFO_APP_AUTHED = 0xA1, // Application is in `auth` state. 41 | LOG_ERR_APP_AUTH_FAIL = 0xC0, // Application authentication failed. 42 | LOG_ERR_APP_CHECKSUM_FAIL = 0xC1, // Application had a checksum fail. 43 | LOG_ERR_APP_NOT_AUTHED = 0xC2, // Application is not authenticated. 44 | 45 | LOG_INFO_SYSTEM_BOOT = 0xFF, // Chameleon boots 46 | 47 | LOG_EMPTY = 0x00 // Empty Log Entry. This is not followed by a length byte nor the two systick bytes nor any data. 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/Log/LogEntryUtils.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ChameleonMiniGUI.Log 4 | { 5 | class LogEntryUtils 6 | { 7 | 8 | public static string ParseDownloadedLog(byte[] result) 9 | { 10 | var s = ""; 11 | var result_size = result.Length; 12 | var idx = 0; 13 | 14 | while (idx <= result_size) 15 | { 16 | if (idx + 4 > result_size) 17 | break; 18 | 19 | var entry_type = result[idx++]; 20 | var data_length = result[idx++]; 21 | var timestampArray = new byte[] { result[idx++], result[idx++] }; 22 | int timestamp = (((int)timestampArray[0]) << 8) | ((int)timestampArray[1]); 23 | 24 | if ((data_length > 0) && (idx + data_length <= result_size)) 25 | { 26 | byte[] data = new byte[data_length]; 27 | Array.Copy(result, idx, data, 0, data_length); 28 | idx += data_length; 29 | s += "[" + timestamp + "] " + ParseLogEntry(entry_type, data); 30 | } 31 | } 32 | 33 | return s; 34 | } 35 | 36 | private static string ParseLogEntry(byte entry_type, byte[] data) 37 | { 38 | switch (entry_type) 39 | { 40 | case (byte)LogEntryType.LOG_INFO_CONFIG_SET: 41 | var configStr = System.Text.Encoding.ASCII.GetString(data); 42 | return "CONFIG SET: " + configStr + Environment.NewLine; 43 | case (byte)LogEntryType.LOG_INFO_SETTING_SET: 44 | var settingNr = data[0] - '0'; 45 | return "SETTING SET: " + settingNr + Environment.NewLine; 46 | case (byte)LogEntryType.LOG_INFO_GENERIC: 47 | case (byte)LogEntryType.LOG_INFO_UID_SET: 48 | case (byte)LogEntryType.LOG_INFO_RESET_APP: 49 | case (byte)LogEntryType.LOG_INFO_CODEC_RX_DATA: 50 | case (byte)LogEntryType.LOG_INFO_CODEC_TX_DATA: 51 | case (byte)LogEntryType.LOG_INFO_CODEC_RX_DATA_W_PARITY: 52 | case (byte)LogEntryType.LOG_INFO_CODEC_TX_DATA_W_PARITY: 53 | case (byte)LogEntryType.LOG_INFO_CODEC_SNI_READER_DATA: 54 | case (byte)LogEntryType.LOG_INFO_CODEC_SNI_READER_DATA_W_PARITY: 55 | case (byte)LogEntryType.LOG_INFO_CODEC_SNI_CARD_DATA: 56 | case (byte)LogEntryType.LOG_INFO_CODEC_SNI_CARD_DATA_W_PARITY: 57 | case (byte)LogEntryType.LOG_INFO_APP_CMD_READ: 58 | case (byte)LogEntryType.LOG_INFO_APP_CMD_WRITE: 59 | case (byte)LogEntryType.LOG_INFO_APP_CMD_INC: 60 | case (byte)LogEntryType.LOG_INFO_APP_CMD_DEC: 61 | case (byte)LogEntryType.LOG_INFO_APP_CMD_TRANSFER: 62 | case (byte)LogEntryType.LOG_INFO_APP_CMD_RESTORE: 63 | case (byte)LogEntryType.LOG_INFO_APP_CMD_AUTH: 64 | case (byte)LogEntryType.LOG_INFO_APP_CMD_HALT: 65 | case (byte)LogEntryType.LOG_INFO_APP_CMD_UNKNOWN: 66 | case (byte)LogEntryType.LOG_INFO_APP_AUTHING: 67 | case (byte)LogEntryType.LOG_INFO_APP_AUTHED: 68 | case (byte)LogEntryType.LOG_INFO_SYSTEM_BOOT: 69 | return ((LogEntryType)entry_type).ToString().Replace("LOG_INFO_", "").Replace("_", " ") + ": " + BitConverter.ToString(data).Replace("-", " ") + Environment.NewLine; 70 | case (byte)LogEntryType.LOG_ERR_APP_AUTH_FAIL: 71 | case (byte)LogEntryType.LOG_ERR_APP_CHECKSUM_FAIL: 72 | case (byte)LogEntryType.LOG_ERR_APP_NOT_AUTHED: 73 | return ((LogEntryType)entry_type).ToString().Replace("LOG_ERR_", "").Replace("_", " ") + ": " + BitConverter.ToString(data).Replace("-", " ") + Environment.NewLine; 74 | default: 75 | return entry_type.ToString("X2") + BitConverter.ToString(data).Replace(" -", " ") + Environment.NewLine; 76 | } 77 | } 78 | 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/MultiLanguage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Globalization; 5 | using System.IO; 6 | using System.Linq; 7 | using System.Windows.Forms; 8 | 9 | namespace ChameleonMiniGUI 10 | { 11 | public class MultiLanguage 12 | { 13 | public string DirectoryPath { get; set; } 14 | 15 | public MultiLanguage () 16 | { 17 | DirectoryPath = Path.Combine(Application.StartupPath, "Languages"); 18 | } 19 | 20 | private static IEnumerable FindToolStrips(ICollection ctrls) where T : ToolStrip 21 | { 22 | var list = new List(); 23 | 24 | // make sure we have controls to search for. 25 | if (ctrls == null || ctrls.Count == 0) return list; 26 | 27 | foreach (Control c in ctrls) 28 | { 29 | if (c.HasChildren) 30 | list.AddRange(FindToolStrips(c.Controls)); 31 | 32 | if ( c.ContextMenuStrip != null ) 33 | list.Add(c.ContextMenuStrip as T); 34 | } 35 | 36 | return list; 37 | } 38 | 39 | private static IEnumerable FindControls(ICollection ctrls) where T : Control 40 | { 41 | var list = new List(); 42 | 43 | // make sure we have controls to search for. 44 | if (ctrls == null || ctrls.Count == 0) return list; 45 | 46 | foreach (Control c in ctrls) 47 | { 48 | if (c.HasChildren) 49 | { 50 | list.AddRange(FindControls(c.Controls)); 51 | } 52 | 53 | if ( !string.IsNullOrWhiteSpace(c.Text)) 54 | list.Add(c as T); 55 | } 56 | 57 | return list; 58 | } 59 | 60 | private static IEnumerable FindControls(ICollection ctrls, string searchname) where T : Control 61 | { 62 | var list = new List(); 63 | 64 | // make sure we have controls to search for. 65 | if (ctrls == null || ctrls.Count == 0) return list; 66 | if (string.IsNullOrWhiteSpace(searchname)) return list; 67 | 68 | 69 | foreach (Control cb in ctrls) 70 | { 71 | if (cb.HasChildren) 72 | { 73 | list.AddRange(FindControls(cb.Controls, searchname)); 74 | } 75 | 76 | if (cb.Name.ToLowerInvariant().StartsWith(searchname)) 77 | list.Add(cb as T); 78 | } 79 | 80 | return list; 81 | } 82 | 83 | public void GetText( ICollection ctrls) 84 | { 85 | var list = FindControls(ctrls); 86 | foreach (var i in list) 87 | { 88 | Console.WriteLine( $"{i.Name}={i.Text}" ); 89 | } 90 | } 91 | 92 | public void LoadLanguage(ICollection ctrls, string lang) 93 | { 94 | var fn = Path.Combine(DirectoryPath, lang); 95 | if (!File.Exists(fn)) 96 | return; 97 | 98 | var strings = File.ReadAllLines(fn); 99 | 100 | foreach (var line in strings) 101 | { 102 | if (string.IsNullOrWhiteSpace(line)) continue; 103 | // skip comments 104 | if (line.StartsWith("#")) continue; 105 | 106 | var property = line.Split('.'); 107 | var values = line.Split('='); 108 | var txt = values[1]; 109 | var propertyname = property[0].ToLowerInvariant(); 110 | 111 | var list_ctrls = FindControls(ctrls, propertyname); 112 | foreach (var i in list_ctrls) 113 | { 114 | i.Text = txt; 115 | } 116 | 117 | var list_items = FindToolStrips(ctrls); 118 | foreach (var i in list_items) 119 | { 120 | foreach(ToolStripMenuItem j in i.Items) 121 | { 122 | if (j.Name.ToLowerInvariant().StartsWith(propertyname)) 123 | j.Text = txt; 124 | } 125 | } 126 | } 127 | } 128 | 129 | public Dictionary GetLanguages() 130 | { 131 | var dic = new Dictionary(); 132 | var di = new DirectoryInfo( DirectoryPath ); 133 | if (!di.Exists) 134 | return dic; 135 | 136 | foreach (var f in di.GetFiles("*.txt").OrderBy( i =>i.Name)) 137 | { 138 | dic.Add( f.Name.Replace(f.Extension,"") , f.Name); 139 | } 140 | return dic; 141 | } 142 | } 143 | } -------------------------------------------------------------------------------- /ChameleonMiniGUI/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | 7 | namespace ChameleonMiniGUI 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// The main entry point for the application. 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | SplashScreen.ShowSplashScreen(); 18 | Application.EnableVisualStyles(); 19 | Application.SetCompatibleTextRenderingDefault(false); 20 | Application.Run(new frm_main()); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("ChameleonMini GUI - Iceman Edition 冰人")] 9 | [assembly: AssemblyDescription("GUI for Chameleon Mini")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("IceSQL AB")] 12 | [assembly: AssemblyProduct("ChameleonMini GUI")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("Iceman")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("52cf6f3f-2092-48e1-bc7b-4d01b5ee2359")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.3.0.6")] 36 | [assembly: AssemblyFileVersion("1.3.0.6")] 37 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace ChameleonMiniGUI.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | 26 | [global::System.Configuration.UserScopedSettingAttribute()] 27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 28 | [global::System.Configuration.DefaultSettingValueAttribute("")] 29 | public string DownloadDumpPath { 30 | get { 31 | return ((string)(this["DownloadDumpPath"])); 32 | } 33 | set { 34 | this["DownloadDumpPath"] = value; 35 | } 36 | } 37 | 38 | [global::System.Configuration.UserScopedSettingAttribute()] 39 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 40 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 41 | public bool EnableKeepAlive { 42 | get { 43 | return ((bool)(this["EnableKeepAlive"])); 44 | } 45 | set { 46 | this["EnableKeepAlive"] = value; 47 | } 48 | } 49 | 50 | [global::System.Configuration.UserScopedSettingAttribute()] 51 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 52 | [global::System.Configuration.DefaultSettingValueAttribute("English")] 53 | public string Language { 54 | get { 55 | return ((string)(this["Language"])); 56 | } 57 | set { 58 | this["Language"] = value; 59 | } 60 | } 61 | 62 | [global::System.Configuration.UserScopedSettingAttribute()] 63 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 64 | [global::System.Configuration.DefaultSettingValueAttribute("4000")] 65 | public int KeepAliveInterval { 66 | get { 67 | return ((int)(this["KeepAliveInterval"])); 68 | } 69 | set { 70 | this["KeepAliveInterval"] = value; 71 | } 72 | } 73 | 74 | [global::System.Configuration.UserScopedSettingAttribute()] 75 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 76 | [global::System.Configuration.DefaultSettingValueAttribute("v1.3.0.6")] 77 | public string version { 78 | get { 79 | return ((string)(this["version"])); 80 | } 81 | set { 82 | this["version"] = value; 83 | } 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | True 10 | 11 | 12 | English 13 | 14 | 15 | 4000 16 | 17 | 18 | v1.3.0.6 19 | 20 | 21 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/Properties/app.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 48 | 55 | 56 | 70 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/Resources/cdrom.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceman1001/ChameleonMini-rebootedGUI/6be26794ce6f93bd5091b9ae10d9eebf4c18f7ce/ChameleonMiniGUI/Resources/cdrom.ico -------------------------------------------------------------------------------- /ChameleonMiniGUI/Resources/chamRevE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceman1001/ChameleonMini-rebootedGUI/6be26794ce6f93bd5091b9ae10d9eebf4c18f7ce/ChameleonMiniGUI/Resources/chamRevE.png -------------------------------------------------------------------------------- /ChameleonMiniGUI/Resources/chamRevG1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceman1001/ChameleonMini-rebootedGUI/6be26794ce6f93bd5091b9ae10d9eebf4c18f7ce/ChameleonMiniGUI/Resources/chamRevG1.png -------------------------------------------------------------------------------- /ChameleonMiniGUI/Resources/chameleon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceman1001/ChameleonMini-rebootedGUI/6be26794ce6f93bd5091b9ae10d9eebf4c18f7ce/ChameleonMiniGUI/Resources/chameleon.png -------------------------------------------------------------------------------- /ChameleonMiniGUI/Resources/folder-close.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceman1001/ChameleonMini-rebootedGUI/6be26794ce6f93bd5091b9ae10d9eebf4c18f7ce/ChameleonMiniGUI/Resources/folder-close.ico -------------------------------------------------------------------------------- /ChameleonMiniGUI/Resources/folder-open.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceman1001/ChameleonMini-rebootedGUI/6be26794ce6f93bd5091b9ae10d9eebf4c18f7ce/ChameleonMiniGUI/Resources/folder-open.ico -------------------------------------------------------------------------------- /ChameleonMiniGUI/Resources/hard-drive.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceman1001/ChameleonMini-rebootedGUI/6be26794ce6f93bd5091b9ae10d9eebf4c18f7ce/ChameleonMiniGUI/Resources/hard-drive.ico -------------------------------------------------------------------------------- /ChameleonMiniGUI/Resources/network-drive.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceman1001/ChameleonMini-rebootedGUI/6be26794ce6f93bd5091b9ae10d9eebf4c18f7ce/ChameleonMiniGUI/Resources/network-drive.ico -------------------------------------------------------------------------------- /ChameleonMiniGUI/Resources/usb-warning.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceman1001/ChameleonMini-rebootedGUI/6be26794ce6f93bd5091b9ae10d9eebf4c18f7ce/ChameleonMiniGUI/Resources/usb-warning.jpg -------------------------------------------------------------------------------- /ChameleonMiniGUI/Resources/warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceman1001/ChameleonMini-rebootedGUI/6be26794ce6f93bd5091b9ae10d9eebf4c18f7ce/ChameleonMiniGUI/Resources/warning.png -------------------------------------------------------------------------------- /ChameleonMiniGUI/SplashScreen.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace ChameleonMiniGUI 2 | { 3 | partial class SplashScreen 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SplashScreen)); 32 | this.pictureBox1 = new System.Windows.Forms.PictureBox(); 33 | this.label1 = new System.Windows.Forms.Label(); 34 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); 35 | this.SuspendLayout(); 36 | // 37 | // pictureBox1 38 | // 39 | this.pictureBox1.BackgroundImage = global::ChameleonMiniGUI.Properties.Resources.chameleon; 40 | this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; 41 | this.pictureBox1.Location = new System.Drawing.Point(0, 0); 42 | this.pictureBox1.Name = "pictureBox1"; 43 | this.pictureBox1.Size = new System.Drawing.Size(522, 304); 44 | this.pictureBox1.TabIndex = 0; 45 | this.pictureBox1.TabStop = false; 46 | // 47 | // label1 48 | // 49 | this.label1.AutoSize = true; 50 | this.label1.BackColor = System.Drawing.Color.Transparent; 51 | this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(161))); 52 | this.label1.ForeColor = System.Drawing.Color.White; 53 | this.label1.Location = new System.Drawing.Point(257, 224); 54 | this.label1.Name = "label1"; 55 | this.label1.Size = new System.Drawing.Size(60, 16); 56 | this.label1.TabIndex = 1; 57 | this.label1.Text = "v1.0.0.0"; 58 | // 59 | // SplashScreen 60 | // 61 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 62 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 63 | this.BackColor = System.Drawing.Color.White; 64 | this.ClientSize = new System.Drawing.Size(522, 304); 65 | this.Controls.Add(this.label1); 66 | this.Controls.Add(this.pictureBox1); 67 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; 68 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 69 | this.Name = "SplashScreen"; 70 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 71 | this.Text = "SplashScreen"; 72 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); 73 | this.ResumeLayout(false); 74 | this.PerformLayout(); 75 | 76 | } 77 | 78 | #endregion 79 | 80 | private System.Windows.Forms.PictureBox pictureBox1; 81 | private System.Windows.Forms.Label label1; 82 | } 83 | } -------------------------------------------------------------------------------- /ChameleonMiniGUI/SplashScreen.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading; 9 | using System.Threading.Tasks; 10 | using System.Windows.Forms; 11 | 12 | namespace ChameleonMiniGUI 13 | { 14 | public partial class SplashScreen : Form 15 | { 16 | public SplashScreen() 17 | { 18 | InitializeComponent(); 19 | label1.Parent = pictureBox1; 20 | label1.Text = Properties.Settings.Default.version; 21 | } 22 | //Delegate for cross thread call to close 23 | private delegate void CloseDelegate(); 24 | 25 | //The type of form to be displayed as the splash screen. 26 | private static SplashScreen splashScreen; 27 | 28 | static public void ShowSplashScreen() 29 | { 30 | // Make sure it is only launched once. 31 | 32 | if (splashScreen != null) 33 | return; 34 | Thread thread = new Thread(new ThreadStart(SplashScreen.ShowForm)); 35 | thread.IsBackground = true; 36 | thread.SetApartmentState(ApartmentState.STA); 37 | thread.Start(); 38 | } 39 | 40 | static private void ShowForm() 41 | { 42 | splashScreen = new SplashScreen(); 43 | Application.Run(splashScreen); 44 | } 45 | 46 | static public void CloseForm() 47 | { 48 | splashScreen.Invoke(new CloseDelegate(SplashScreen.CloseFormInternal)); 49 | } 50 | 51 | static private void CloseFormInternal() 52 | { 53 | splashScreen.Close(); 54 | splashScreen = null; 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/SuspendUpdate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows.Forms; 7 | 8 | namespace ChameleonMiniGUI 9 | { 10 | public static class SuspendUpdate 11 | { 12 | private const int WM_SETREDRAW = 0x000B; 13 | 14 | public static void Suspend(Control control) 15 | { 16 | Message msgSuspendUpdate = Message.Create(control.Handle, WM_SETREDRAW, IntPtr.Zero, IntPtr.Zero); 17 | 18 | NativeWindow window = NativeWindow.FromHandle(control.Handle); 19 | window.DefWndProc(ref msgSuspendUpdate); 20 | } 21 | 22 | public static void Resume(Control control) 23 | { 24 | // Create a C "true" boolean as an IntPtr 25 | IntPtr wparam = new IntPtr(1); 26 | Message msgResumeUpdate = Message.Create(control.Handle, WM_SETREDRAW, wparam, IntPtr.Zero); 27 | 28 | NativeWindow window = NativeWindow.FromHandle(control.Handle); 29 | window.DefWndProc(ref msgResumeUpdate); 30 | 31 | control.Invalidate(true); 32 | control.Update(); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/Templates/MIfare-S20-320b-Black.txt: -------------------------------------------------------------------------------- 1 | # 2 | # this CSV file defines a color template for a binary file. 3 | # 4 | # This file targets: Mifare Classic mini s20 , 320b, 4 byte UID 5 | # 6 | # 2018, hiwanz 7 | # block 0 8 | 0; 4; DeepPink; Black; UID 9 | 4; 1; DeepSkyBlue; Black; BCC 10 | 5; 48; White; black; Text 11 | (0*64) + 48; 6; Orange; Black; Key A 12 | (0*64)+ 48+ 6; 3; Red; Black; Access bytes 13 | (0*64)+ 48+ 9; 1; Aquamarine; Black; GDC byte 14 | (0*64) + 48+10; 6; SkyBlue; Black; Key B 15 | # block 1 16 | (1*64); 48; White; black; Text 17 | (1*64) + 48; 6; Orange; Black; Key A 18 | (1*64)+ 48+ 6; 3; Red; Black; Access bytes 19 | (1*64)+ 48+ 9; 1; Aquamarine; Black; GDC byte 20 | (1*64) + 48 +10; 6; SkyBlue; Black; Key B 21 | # block 2 22 | (2*64); 48; White; black; Text 23 | (2*64) + 48; 6; Orange; Black; Key A 24 | (2*64)+ 48+ 6; 3; Red; Black; Access bytes 25 | (2*64)+ 48+ 9; 1; Aquamarine; Black; GDC byte 26 | (2*64) + 48 +10; 6; SkyBlue; Black; Key B 27 | # block 3 28 | (3*64); 48; White; black; Text 29 | (3*64) + 48; 6; Orange; Black; Key A 30 | (3*64)+ 48+ 6; 3; Red; Black; Access bytes 31 | (3*64)+ 48+ 9; 1; Aquamarine; Black; GDC byte 32 | (3*64) + 48 +10; 6; SkyBlue; Black; Key B 33 | # block 4 34 | (4*64); 48; White; black; Text 35 | (4*64) + 48; 6; Orange; Black; Key A 36 | (4*64)+ 48+ 6; 3; Red; Black; Access bytes 37 | (4*64)+ 48+ 9; 1; Aquamarine; Black; GDC byte 38 | (4*64) + 48 +10; 6; SkyBlue; Black; Key B -------------------------------------------------------------------------------- /ChameleonMiniGUI/Templates/MIfare-S20-320b.txt: -------------------------------------------------------------------------------- 1 | # 2 | # this CSV file defines a color template for a binary file. 3 | # 4 | # This file targets: Mifare Classic mini s20 , 320b, 4 byte UID 5 | # 6 | # 2018, iceman 7 | # block 0 8 | 0; 4; Turquoise; DarkGray; UID 9 | 4; 1; white; DarkGray; BCC 10 | (0*64) + 48; 6; yellow; DarkGray; Key A 11 | (0*64)+ 48+ 6; 3; darkred; DarkGray; Access bytes 12 | (0*64)+ 48+ 9; 1; Aquamarine; DarkGray; GDC byte 13 | (0*64) + 48+10; 6; blue; DarkGray; Key B 14 | # block 1 15 | (1*64) + 48; 6; yellow; DarkGray; Key A 16 | (1*64)+ 48+ 6; 3; darkred; DarkGray; Access bytes 17 | (1*64)+ 48+ 9; 1; Aquamarine; DarkGray; GDC byte 18 | (1*64) + 48 +10; 6; blue; DarkGray; Key B 19 | # block 2 20 | (2*64) + 48; 6; yellow; DarkGray; Key A 21 | (2*64)+ 48+ 6; 3; darkred; DarkGray; Access bytes 22 | (2*64)+ 48+ 9; 1; Aquamarine; DarkGray; GDC byte 23 | (2*64) + 48 +10; 6; blue; DarkGray; Key B 24 | # block 3 25 | (3*64) + 48; 6; yellow; DarkGray; Key A 26 | (3*64)+ 48+ 6; 3; darkred; DarkGray; Access bytes 27 | (3*64)+ 48+ 9; 1; Aquamarine; DarkGray; GDC byte 28 | (3*64) + 48 +10; 6; blue; DarkGray; Key B 29 | # block 4 30 | (4*64) + 48; 6; yellow; DarkGray; Key A 31 | (4*64)+ 48+ 6; 3; darkred; DarkGray; Access bytes 32 | (4*64)+ 48+ 9; 1; Aquamarine; DarkGray; GDC byte 33 | (4*64) + 48 +10; 6; blue; DarkGray; Key B -------------------------------------------------------------------------------- /ChameleonMiniGUI/Templates/MIfare-S50-1k-Black.txt: -------------------------------------------------------------------------------- 1 | # 2 | # this CSV file defines a color template for a binary file. 3 | # 4 | # This file targets: Mifare Classic s50 , 1k, 4 byte UID 5 | # 6 | # 2018, hiwanz 7 | # block 0 8 | 0; 4; DeepPink; Black; UID 9 | 4; 1; DeepSkyBlue; Black; BCC 10 | 5; 48; White; black; Text 11 | (0*64) + 48; 6; Orange; Black; Key A 12 | (0*64)+ 48+ 6; 3; Red; Black; Access bytes 13 | (0*64)+ 48+ 9; 1; Aquamarine; Black; GDC byte 14 | (0*64) + 48+10; 6; SkyBlue; Black; Key B 15 | # block 1 16 | (1*64); 48; White; black; Text 17 | (1*64) + 48; 6; Orange; Black; Key A 18 | (1*64)+ 48+ 6; 3; Red; Black; Access bytes 19 | (1*64)+ 48+ 9; 1; Aquamarine; Black; GDC byte 20 | (1*64) + 48 +10; 6; SkyBlue; Black; Key B 21 | # block 2 22 | (2*64); 48; White; black; Text 23 | (2*64) + 48; 6; Orange; Black; Key A 24 | (2*64)+ 48+ 6; 3; Red; Black; Access bytes 25 | (2*64)+ 48+ 9; 1; Aquamarine; Black; GDC byte 26 | (2*64) + 48 +10; 6; SkyBlue; Black; Key B 27 | # block 3 28 | (3*64); 48; White; black; Text 29 | (3*64) + 48; 6; Orange; Black; Key A 30 | (3*64)+ 48+ 6; 3; Red; Black; Access bytes 31 | (3*64)+ 48+ 9; 1; Aquamarine; Black; GDC byte 32 | (3*64) + 48 +10; 6; SkyBlue; Black; Key B 33 | # block 4 34 | (4*64); 48; White; black; Text 35 | (4*64) + 48; 6; Orange; Black; Key A 36 | (4*64)+ 48+ 6; 3; Red; Black; Access bytes 37 | (4*64)+ 48+ 9; 1; Aquamarine; Black; GDC byte 38 | (4*64) + 48 +10; 6; SkyBlue; Black; Key B 39 | # block 5 40 | (5*64); 48; White; black; Text 41 | (5*64) + 48; 6; Orange; Black; Key A 42 | (5*64)+ 48+ 6; 3; Red; Black; Access bytes 43 | (5*64)+ 48+ 9; 1; Aquamarine; Black; GDC byte 44 | (5*64) + 48 +10; 6; SkyBlue; Black; Key B 45 | # block 6 46 | (6*64); 48; White; black; Text 47 | (6*64) + 48; 6; Orange; Black; Key A 48 | (6*64)+ 48+ 6; 3; Red; Black; Access bytes 49 | (6*64)+ 48+ 9; 1; Aquamarine; Black; GDC byte 50 | (6*64) + 48 +10; 6; SkyBlue; Black; Key B 51 | # block 7 52 | (7*64); 48; White; black; Text 53 | (7*64) + 48; 6; Orange; Black; Key A 54 | (7*64)+ 48+ 6; 3; Red; Black; Access bytes 55 | (7*64)+ 48+ 9; 1; Aquamarine; Black; GDC byte 56 | (7*64) + 48 +10; 6; SkyBlue; Black; Key B 57 | # block 8 58 | (8*64); 48; White; black; Text 59 | (8*64) + 48; 6; Orange; Black; Key A 60 | (8*64)+ 48+ 6; 3; Red; Black; Access bytes 61 | (8*64)+ 48+ 9; 1; Aquamarine; Black; GDC byte 62 | (8*64) + 48 +10; 6; SkyBlue; Black; Key B 63 | # block 9 64 | (9*64); 48; White; black; Text 65 | (9*64) + 48; 6; Orange; Black; Key A 66 | (9*64)+ 48+ 6; 3; Red; Black; Access bytes 67 | (9*64)+ 48+ 9; 1; Aquamarine; Black; GDC byte 68 | (9*64) + 48 +10; 6; SkyBlue; Black; Key B 69 | # block 10 70 | (10*64); 48; White; black; Text 71 | (10*64) + 48; 6; Orange; Black; Key A 72 | (10*64)+ 48+ 6; 3; Red; Black; Access bytes 73 | (10*64)+ 48+ 9; 1; Aquamarine; Black; GDC byte 74 | (10*64) + 48 +10; 6; SkyBlue; Black; Key B 75 | # block 11 76 | (11*64); 48; White; black; Text 77 | (11*64) + 48; 6; Orange; Black; Key A 78 | (11*64)+ 48+ 6; 3; Red; Black; Access bytes 79 | (11*64)+ 48+ 9; 1; Aquamarine; Black; GDC byte 80 | (11*64) + 48 +10; 6; SkyBlue; Black; Key B 81 | # block 12 82 | (12*64); 48; White; black; Text 83 | (12*64) + 48; 6; Orange; Black; Key A 84 | (12*64)+ 48+ 6; 3; Red; Black; Access bytes 85 | (12*64)+ 48+ 9; 1; Aquamarine; Black; GDC byte 86 | (12*64) + 48 +10; 6; SkyBlue; Black; Key B 87 | # block 13 88 | (13*64); 48; White; black; Text 89 | (13*64) + 48; 6; Orange; Black; Key A 90 | (13*64)+ 48+ 6; 3; Red; Black; Access bytes 91 | (13*64)+ 48+ 9; 1; Aquamarine; Black; GDC byte 92 | (13*64) + 48 +10; 6; SkyBlue; Black; Key B 93 | # block 14 94 | (14*64); 48; White; black; Text 95 | (14*64) + 48; 6; Orange; Black; Key A 96 | (14*64)+ 48+ 6; 3; Red; Black; Access bytes 97 | (14*64)+ 48+ 9; 1; Aquamarine; Black; GDC byte 98 | (14*64) + 48 +10; 6; SkyBlue; Black; Key B 99 | # block 15 100 | (15*64); 48; White; black; Text 101 | (15*64) + 48; 6; Orange; Black; Key A 102 | (15*64)+ 48+ 6; 3; Red; Black; Access bytes 103 | (15*64)+ 48+ 9; 1; Aquamarine; Black; GDC byte 104 | (15*64) + 48 +10; 6; SkyBlue; Black; Key B -------------------------------------------------------------------------------- /ChameleonMiniGUI/Templates/MIfare-S50-1k.txt: -------------------------------------------------------------------------------- 1 | # 2 | # this CSV file defines a color template for a binary file. 3 | # 4 | # This file targets: Mifare Classic s50 , 1k, 4 byte UID 5 | # 6 | # 2018, iceman 7 | # block 0 8 | 0; 4; Turquoise; DarkGray; UID 9 | 4; 1; white; DarkGray; BCC 10 | (0*64) + 48; 6; yellow; DarkGray; Key A 11 | (0*64)+ 48+ 6; 3; darkred; DarkGray; Access bytes 12 | (0*64)+ 48+ 9; 1; Aquamarine; DarkGray; GDC byte 13 | (0*64) + 48+10; 6; blue; DarkGray; Key B 14 | # block 1 15 | (1*64) + 48; 6; yellow; DarkGray; Key A 16 | (1*64)+ 48+ 6; 3; darkred; DarkGray; Access bytes 17 | (1*64)+ 48+ 9; 1; Aquamarine; DarkGray; GDC byte 18 | (1*64) + 48 +10; 6; blue; DarkGray; Key B 19 | # block 2 20 | (2*64) + 48; 6; yellow; DarkGray; Key A 21 | (2*64)+ 48+ 6; 3; darkred; DarkGray; Access bytes 22 | (2*64)+ 48+ 9; 1; Aquamarine; DarkGray; GDC byte 23 | (2*64) + 48 +10; 6; blue; DarkGray; Key B 24 | # block 3 25 | (3*64) + 48; 6; yellow; DarkGray; Key A 26 | (3*64)+ 48+ 6; 3; darkred; DarkGray; Access bytes 27 | (3*64)+ 48+ 9; 1; Aquamarine; DarkGray; GDC byte 28 | (3*64) + 48 +10; 6; blue; DarkGray; Key B 29 | # block 4 30 | (4*64) + 48; 6; yellow; DarkGray; Key A 31 | (4*64)+ 48+ 6; 3; darkred; DarkGray; Access bytes 32 | (4*64)+ 48+ 9; 1; Aquamarine; DarkGray; GDC byte 33 | (4*64) + 48 +10; 6; blue; DarkGray; Key B 34 | # block 5 35 | (5*64) + 48; 6; yellow; DarkGray; Key A 36 | (5*64)+ 48+ 6; 3; darkred; DarkGray; Access bytes 37 | (5*64)+ 48+ 9; 1; Aquamarine; DarkGray; GDC byte 38 | (5*64) + 48 +10; 6; blue; DarkGray; Key B 39 | # block 6 40 | (6*64) + 48; 6; yellow; DarkGray; Key A 41 | (6*64)+ 48+ 6; 3; darkred; DarkGray; Access bytes 42 | (6*64)+ 48+ 9; 1; Aquamarine; DarkGray; GDC byte 43 | (6*64) + 48 +10; 6; blue; DarkGray; Key B 44 | # block 7 45 | (7*64) + 48; 6; yellow; DarkGray; Key A 46 | (7*64)+ 48+ 6; 3; darkred; DarkGray; Access bytes 47 | (7*64)+ 48+ 9; 1; Aquamarine; DarkGray; GDC byte 48 | (7*64) + 48 +10; 6; blue; DarkGray; Key B 49 | # block 8 50 | (8*64) + 48; 6; yellow; DarkGray; Key A 51 | (8*64)+ 48+ 6; 3; darkred; DarkGray; Access bytes 52 | (8*64)+ 48+ 9; 1; Aquamarine; DarkGray; GDC byte 53 | (8*64) + 48 +10; 6; blue; DarkGray; Key B 54 | # block 9 55 | (9*64) + 48; 6; yellow; DarkGray; Key A 56 | (9*64)+ 48+ 6; 3; darkred; DarkGray; Access bytes 57 | (9*64)+ 48+ 9; 1; Aquamarine; DarkGray; GDC byte 58 | (9*64) + 48 +10; 6; blue; DarkGray; Key B 59 | # block 10 60 | (10*64) + 48; 6; yellow; DarkGray; Key A 61 | (10*64)+ 48+ 6; 3; darkred; DarkGray; Access bytes 62 | (10*64)+ 48+ 9; 1; Aquamarine; DarkGray; GDC byte 63 | (10*64) + 48 +10; 6; blue; DarkGray; Key B 64 | # block 11 65 | (11*64) + 48; 6; yellow; DarkGray; Key A 66 | (11*64)+ 48+ 6; 3; darkred; DarkGray; Access bytes 67 | (11*64)+ 48+ 9; 1; Aquamarine; DarkGray; GDC byte 68 | (11*64) + 48 +10; 6; blue; DarkGray; Key B 69 | # block 12 70 | (12*64) + 48; 6; yellow; DarkGray; Key A 71 | (12*64)+ 48+ 6; 3; darkred; DarkGray; Access bytes 72 | (12*64)+ 48+ 9; 1; Aquamarine; DarkGray; GDC byte 73 | (12*64) + 48 +10; 6; blue; DarkGray; Key B 74 | # block 13 75 | (13*64) + 48; 6; yellow; DarkGray; Key A 76 | (13*64)+ 48+ 6; 3; darkred; DarkGray; Access bytes 77 | (13*64)+ 48+ 9; 1; Aquamarine; DarkGray; GDC byte 78 | (13*64) + 48 +10; 6; blue; DarkGray; Key B 79 | # block 14 80 | (14*64) + 48; 6; yellow; DarkGray; Key A 81 | (14*64)+ 48+ 6; 3; darkred; DarkGray; Access bytes 82 | (14*64)+ 48+ 9; 1; Aquamarine; DarkGray; GDC byte 83 | (14*64) + 48 +10; 6; blue; DarkGray; Key B 84 | # block 15 85 | (15*64) + 48; 6; yellow; DarkGray; Key A 86 | (15*64)+ 48+ 6; 3; darkred; DarkGray; Access bytes 87 | (15*64)+ 48+ 9; 1; Aquamarine; DarkGray; GDC byte 88 | (15*64) + 48 +10; 6; blue; DarkGray; Key B -------------------------------------------------------------------------------- /ChameleonMiniGUI/Templates/Ultralight-EV1-164B-Black.txt: -------------------------------------------------------------------------------- 1 | # 2 | # this CSV file defines a color template for a binary file. 3 | # 4 | # This file targets: Mifare Ultralight EV1, 164B, 7 byte UID 5 | # 6 | # 2018, hiwanz 7 | # 8 | 0; 3; DeepPink; Black; UID 9 | 0*4+3; 1; DeepSkyBlue; Black; BCC0 10 | 1*4; 4; DeepPink; Black; UID 11 | 2*4; 1; DeepSkyBlue; Black; BCC1 12 | 2*4+2; 2; Red; Black; Lock Bytes 13 | 2*4+1; 1; White; black; Text 14 | 3*4; 4; Chartreuse; Black; OTP 15 | 4*4; 36*4; White; black; Text 16 | 36*4; 3; Red; Black; Lock Bytes 17 | 37*4; 8; Teal; Black; CFG 18 | 39*4; 4; Orange; Black; PWD 19 | 40*4; 2; SkyBlue; Black; PACK 20 | 40*4+2; 2; White; black; Text -------------------------------------------------------------------------------- /ChameleonMiniGUI/Templates/Ultralight-EV1-164B.txt: -------------------------------------------------------------------------------- 1 | # 2 | # this CSV file defines a color template for a binary file. 3 | # 4 | # This file targets: Mifare Ultralight EV1, 164B, 7 byte UID 5 | # 6 | # 2018, bogito 7 | # 8 | 0; 3; Turquoise; DarkGray; UID 9 | 0*4+3; 1; white; DarkGray; BCC0 10 | 1*4; 4; Turquoise; DarkGray; UID 11 | 2*4; 1; white; DarkGray; BCC1 12 | 2*4+2; 2; darkred; DarkGray; Lock Bytes 13 | 3*4; 4; Chartreuse; DarkGray; OTP 14 | 36*4; 3; red; DarkGray; Lock Bytes 15 | 37*4; 8; DarkOliveGreen; DarkGray; CFG 16 | 39*4; 4; yellow; DarkGray; PWD 17 | 40*4; 2; blue; DarkGray; PACK 18 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/Templates/iClass-Black.txt: -------------------------------------------------------------------------------- 1 | # 2 | # this CSV file defines a color template for a binary file. 3 | # 4 | # This file targets: iClass, 5 | # 6 | # 2018, iceman 7 | # block 0 8 | (0*8); 8; Turquoise; Black; CSN 9 | #block 1 10 | (1*8); 8; white; Black; Config 11 | #block 2 12 | (2*8); 8; yellow; Black; E-purse 13 | #block 3 14 | (3*8); 8; darkred; Black; Debit Key (AA1) 15 | #block 4 16 | (4*8); 8; orange; Black; Cebit Key (AA2) 17 | #block 5 18 | (5*8); 8; Aquamarine; Black; Application Issuer Area (AIA) 19 | #block 6-11 20 | (6*8); (4*8); DeepSkyBlue; Black; Application Area 1 (AA1) 21 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/Templating.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Drawing; 4 | using System.IO; 5 | using System.Linq; 6 | using System.Windows.Forms; 7 | using Be.Windows.Forms; 8 | using DynamicExpresso; 9 | 10 | namespace ChameleonMiniGUI 11 | { 12 | public class Templating 13 | { 14 | public string DirectoryPath { get; set; } 15 | 16 | public Templating() 17 | { 18 | DirectoryPath = Path.Combine(Application.StartupPath, "Templates"); 19 | } 20 | 21 | public void LoadTemplate(HexBox hb, string template, List legendItems ) 22 | { 23 | if (hb.ByteProvider == null) return; 24 | 25 | hb.ClearHighlights(); 26 | 27 | var fn = Path.Combine(DirectoryPath, template); 28 | if (!File.Exists(fn)) 29 | return; 30 | 31 | if (legendItems == null) 32 | legendItems = new List(); 33 | 34 | var strings = File.ReadAllLines(fn); 35 | 36 | var interpreter = new Interpreter(); 37 | 38 | foreach (var line in strings) 39 | { 40 | 41 | if (string.IsNullOrWhiteSpace(line)) continue; 42 | if (line.StartsWith("#")) continue; 43 | 44 | var props = line.Split(';'); 45 | if (props.Length < 4) 46 | { 47 | Console.WriteLine($"[-] Error, bad line in template file. {props}"); 48 | continue; 49 | } 50 | 51 | try 52 | { 53 | 54 | var startpos_eval = interpreter.Eval(props[0].Trim()); 55 | int startpos; 56 | if (!int.TryParse(startpos_eval.ToString(), out startpos)) continue; 57 | 58 | var length_eval = interpreter.Eval(props[1].Trim()); 59 | int length; 60 | if (!int.TryParse(length_eval.ToString(), out length)) continue; 61 | 62 | var fg = props[2].Trim(); 63 | var bg = props[3].Trim(); 64 | var desc = (props.Length == 5) ? props[4].Trim() : string.Empty; 65 | 66 | var fgc = Color.FromName(fg); 67 | var bgc = Color.FromName(bg); 68 | 69 | 70 | // length check. 71 | if (hb.ByteProvider.Length < (startpos + length)) 72 | continue; 73 | 74 | hb.AddHighlight(startpos, length, fgc, bgc); 75 | 76 | var item = new LegendItem 77 | { 78 | BackGroundColor = bg, 79 | ForeGroundColor = fg, 80 | Description = desc 81 | }; 82 | 83 | var exists = legendItems.Any(a => a.BackGroundColor == bg && a.ForeGroundColor == fg && a.Description == desc); 84 | if (!exists ) 85 | legendItems.Add(item); 86 | 87 | } 88 | catch (Exception ex) 89 | { 90 | MessageBox.Show($"Template has errors{Environment.NewLine}{line}{Environment.NewLine}{ex.Message}"); 91 | } 92 | } 93 | hb.Invalidate(); 94 | } 95 | 96 | public Dictionary GetTemplates() 97 | { 98 | var dic = new Dictionary(); 99 | var di = new DirectoryInfo(DirectoryPath); 100 | if (!di.Exists) 101 | return dic; 102 | 103 | var files = di.GetFiles("*.txt").OrderBy(i =>i.Name); 104 | if (!files.Any()) return dic; 105 | 106 | dic.Add("Not selected", "----------"); 107 | foreach (var f in files) 108 | { 109 | dic.Add(f.Name.Replace(f.Extension, ""), f.Name); 110 | } 111 | return dic; 112 | } 113 | 114 | } 115 | } -------------------------------------------------------------------------------- /ChameleonMiniGUI/ThreadHelperClass.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Forms; 2 | 3 | namespace ChameleonMiniGUI 4 | { 5 | public static class ThreadHelperClass 6 | { 7 | delegate void SetTextCallback(Form f, Control c, string text); 8 | /// 9 | /// Set text property of various controls 10 | /// 11 | /// The calling form 12 | /// 13 | /// 14 | public static void SetText(Form f, Control c, string text) 15 | { 16 | // InvokeRequired required compares the thread ID of the 17 | // calling thread to the thread ID of the creating thread. 18 | // If these threads are different, it returns true. 19 | if (c.InvokeRequired) 20 | { 21 | var d = new SetTextCallback(SetText); 22 | f.Invoke(d, f, c, text); 23 | } 24 | else 25 | { 26 | c.Text = text; 27 | } 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /ChameleonMiniGUI/UserControls/UcTextFlow.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace ChameleonMiniGUI 2 | { 3 | partial class UcTextFlow 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Component Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.fLPContainer = new System.Windows.Forms.FlowLayoutPanel(); 32 | this.SuspendLayout(); 33 | // 34 | // fLPContainer 35 | // 36 | this.fLPContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 37 | | System.Windows.Forms.AnchorStyles.Left) 38 | | System.Windows.Forms.AnchorStyles.Right))); 39 | this.fLPContainer.AutoScroll = true; 40 | this.fLPContainer.AutoSize = true; 41 | this.fLPContainer.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; 42 | this.fLPContainer.Location = new System.Drawing.Point(3, 3); 43 | this.fLPContainer.Name = "fLPContainer"; 44 | this.fLPContainer.Size = new System.Drawing.Size(64, 57); 45 | this.fLPContainer.TabIndex = 0; 46 | // 47 | // UcTextFlow 48 | // 49 | this.AutoSize = true; 50 | this.Controls.Add(this.fLPContainer); 51 | this.Name = "UcTextFlow"; 52 | this.Size = new System.Drawing.Size(73, 64); 53 | this.ResumeLayout(false); 54 | this.PerformLayout(); 55 | 56 | } 57 | 58 | #endregion 59 | 60 | private System.Windows.Forms.FlowLayoutPanel fLPContainer; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/UserControls/UcTextFlow.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Drawing; 4 | using System.Linq; 5 | using System.Windows.Forms; 6 | 7 | namespace ChameleonMiniGUI 8 | { 9 | public partial class UcTextFlow : UserControl 10 | { 11 | public delegate void ClickHandler(object sender, EventArgs e); 12 | 13 | public event ClickHandler TextClick; 14 | public List AvailableCommands { set; get; } 15 | 16 | public UcTextFlow() 17 | { 18 | InitializeComponent(); 19 | AutoScroll = true; 20 | //dock = fill? 21 | //this.Dock = DockStyle.Fill; 22 | } 23 | 24 | #region EVENTS 25 | 26 | private void Tb_OnMouseLeave(object sender, EventArgs e) 27 | { 28 | var tb = sender as TextBox; 29 | if (tb == null) return; 30 | 31 | if (base.BackColor == Color.Transparent) 32 | return; 33 | 34 | tb.BackColor = base.BackColor; 35 | tb.Cursor = Cursors.Default; 36 | } 37 | 38 | private void Tb_OnMouseEnter(object sender, EventArgs e) 39 | { 40 | var tb = sender as TextBox; 41 | if (tb == null) return; 42 | 43 | tb.BackColor = SystemColors.ControlLight; 44 | tb.Cursor = Cursors.Arrow; 45 | } 46 | 47 | void Tb_OnClick(object sender, EventArgs e) 48 | { 49 | TextClick?.Invoke(sender, e); 50 | } 51 | 52 | #endregion 53 | 54 | #region Methods 55 | 56 | public void Addline(string noteText) 57 | { 58 | var tb = new TextBox 59 | { 60 | Multiline = true, 61 | Text = noteText, 62 | ReadOnly = true, 63 | BorderStyle = 0, 64 | TabStop = false, 65 | Margin = new Padding(1, 1, 1, 1), 66 | }; 67 | 68 | var size = TextRenderer.MeasureText(tb.Text, tb.Font); 69 | tb.Width = size.Width; 70 | tb.Height = size.Height; 71 | 72 | tb.Click += Tb_OnClick; 73 | tb.MouseEnter += Tb_OnMouseEnter; 74 | tb.MouseLeave += Tb_OnMouseLeave; 75 | 76 | fLPContainer.Controls.Add(tb); 77 | 78 | // the below might cause an exception of the BackColor of the FLP is eg Transparent 79 | if (base.BackColor == Color.Transparent) 80 | return; 81 | 82 | 83 | tb.BackColor = base.BackColor; 84 | 85 | } 86 | 87 | public void SetList() 88 | { 89 | fLPContainer.Controls.Clear(); 90 | 91 | if (AvailableCommands != null && AvailableCommands.Any()) 92 | { 93 | AvailableCommands.ForEach(Addline); 94 | } 95 | else 96 | { 97 | Addline("N/A"); 98 | 99 | } 100 | } 101 | 102 | #endregion 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/UserControls/UcTextFlow.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /ChameleonMiniGUI/chameleon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceman1001/ChameleonMini-rebootedGUI/6be26794ce6f93bd5091b9ae10d9eebf4c18f7ce/ChameleonMiniGUI/chameleon.ico -------------------------------------------------------------------------------- /ChameleonMiniGUI/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /ChameleonTest/ChameleonTest.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.28307.960 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChameleonTest", "ChameleonTest\ChameleonTest.csproj", "{E8BF640D-8267-4BC0-A481-C4CDA1E6E2CC}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {E8BF640D-8267-4BC0-A481-C4CDA1E6E2CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {E8BF640D-8267-4BC0-A481-C4CDA1E6E2CC}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {E8BF640D-8267-4BC0-A481-C4CDA1E6E2CC}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {E8BF640D-8267-4BC0-A481-C4CDA1E6E2CC}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {ED3D2E41-6C93-4AA7-AC62-3A3365C99CAE} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /ChameleonTest/ChameleonTest/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | [assembly: AssemblyTitle("ChameleonTest")] 6 | [assembly: AssemblyDescription("")] 7 | [assembly: AssemblyConfiguration("")] 8 | [assembly: AssemblyCompany("")] 9 | [assembly: AssemblyProduct("ChameleonTest")] 10 | [assembly: AssemblyCopyright("Copyright © 2020")] 11 | [assembly: AssemblyTrademark("")] 12 | [assembly: AssemblyCulture("")] 13 | 14 | [assembly: ComVisible(false)] 15 | 16 | [assembly: Guid("e8bf640d-8267-4bc0-a481-c4cda1e6e2cc")] 17 | 18 | // [assembly: AssemblyVersion("1.0.*")] 19 | [assembly: AssemblyVersion("1.0.0.0")] 20 | [assembly: AssemblyFileVersion("1.0.0.0")] 21 | -------------------------------------------------------------------------------- /ChameleonTest/ChameleonTest/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ChameleonMini GUI (windows) 2 | [![Build status](https://ci.appveyor.com/api/projects/status/fqsw72e2os8jyuui/branch/master?svg=true)](https://ci.appveyor.com/project/iceman1001/ChameleonMini-rebootedGUI/branch/master) 3 | [![Latest release](https://img.shields.io/github/release/iceman1001/ChameleonMini-rebootedGUI.svg)](https://github.com/iceman1001/ChameleonMini-rebootedGUI/releases/latest) 4 | 5 | 6 | This is a MS Windows based GUI for the ChameleonMini device. 7 | 8 | ## discord server 9 | The new Proxmark community discord server is a great place to discuss Chameleon Mini GUI releated stuff. [discord server](https://discord.gg/zjxc8ZB) 10 | 11 | 12 | ## Which device does GUI support? 13 | in short, the GUI, it's 14 | - Device agnostic 15 | - Firmware independent 16 | 17 | you can connect any known chameleon mini device, installed with any known firmware. 18 | 19 | - [RevG, (RevE)](https://kasper-oswald.de/gb/chameleonmini/), 20 | - RevE Rebooted, 21 | - [RevG Rebooted, ChameleonTiny](https://www.indiegogo.com/projects/chameleonmini-rev-g-chameleontiny-by-proxgrind#/) 22 | 23 | ## Changelog 24 | You find the [changelog](https://github.com/iceman1001/ChameleonMini-rebootedGUI/blob/master/CHANGELOG.md) 25 | 26 | 27 | ## Binary distribution / windows installer 28 | For the sake of easiness or for those who can't compile this project there is a _click-once deployment_ installation located here. 29 | 30 | Release: [v1.3.0.6](http://www.icesql.se/download/ChameleonMiniGUI/publish.htm) 31 | 32 | __Prerequisite__ 33 | * dot.net 4.7.2 34 | * Application needs full rights. 35 | 36 | ### About _click once technology_ 37 | The application is being deployed with Click-Once technology, this means that the application phones home to see if there is an update available everytime you start it. If there is an update you get an choice to install or skip. I do recommend that you update. If you think this is not good for your privacy, feel free to block the application from reaching internet. It should work but its untested. 38 | 39 | 40 | ## Roadmap 41 | There isn't a roadmap for this software. Go in under _issues_ and see which ideas / known bugs there is. 42 | 43 | ## Code Quality 44 | This projoect uses the CI service _Appveyor_. Thanks to @merlokk for adding some tests and hooking it up. 45 | This project doesn't use any code quality service like _Coverity scan_ 46 | It would be nice if we did, feel free to contribute! 47 | 48 | ## Screenshots 49 | ![chameleon1](https://user-images.githubusercontent.com/34060135/37828799-90af7bba-2e94-11e8-98d2-d832ddfd720d.jpg) 50 | 51 | ![chameleon2a](https://user-images.githubusercontent.com/34060135/37828802-9261fd02-2e94-11e8-8e30-b4b075d51043.jpg) 52 | 53 | ![chameleon2b](https://user-images.githubusercontent.com/34060135/37828804-942a1a3e-2e94-11e8-895c-339078081a95.jpg) 54 | 55 | ![chameleon3](https://user-images.githubusercontent.com/34060135/37828807-95be31e6-2e94-11e8-8bcd-e8a35ecd1cde.jpg) 56 | 57 | 58 | ## Perpetual glory! 59 | 60 | A list of those who contributed to this repo in order to make it work. The community owns you all a deep and sincere thank you. 61 | - @bogiton 62 | - @kevin2008-01 (French translations) 63 | - @proxgrind (Chinese translations) 64 | - @asper (Italian translations) 65 | - @djbiohazard (Dutch translations) 66 | - @hiwanz 67 | - @kgamecarter 68 | - @Vrumfondel 69 | - @neijpass (spanish translations) 70 | - @shinhub 71 | - @mceloff 72 | - @uspilot 73 | - @grspy 74 | - @merlokk 75 | 76 | 77 | ## Donate 78 | If you feel the love, do feel free to become a Iceman patron. 79 | https://www.patreon.com/iceman1001 80 | 81 | All support is welcome. 82 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | image: 2 | - Visual Studio 2017 3 | 4 | install: 5 | - choco install gitversion.portable -pre -y 6 | 7 | clone_folder: C:\ChameleonGUI 8 | 9 | before_build: 10 | - ps: $env:IGNORE_NORMALISATION_GIT_HEAD_MOVE=1;gitversion $env:APPVEYOR_BUILD_FOLDER /l console /output buildserver /updateAssemblyInfo /nofetch /b $env:APPVEYOR_REPO_BRANCH 11 | - ps: cd C:\ChameleonGUI\ChameleonMiniGUI; nuget restore -PackagesDirectory ..\packages 12 | 13 | build_script: 14 | - ps: pwd;cd C:\ChameleonGUI;msbuild 15 | - ps: Copy-Item C:\ChameleonGUI\Be.Windows.Forms.HexBox\bin\Debug\*.dll C:\ChameleonGUI\ChameleonMiniGUI\bin\Debug\ 16 | - ps: Copy-Item C:\ChameleonGUI\packages\Crapto1Sharp.1.2.2\lib\net45\*.dll C:\ChameleonGUI\ChameleonMiniGUI\bin\Debug\ 17 | - ps: Copy-Item C:\ChameleonGUI\packages\DynamicExpresso.Core.2.0.0\lib\net461\*.dll C:\ChameleonGUI\ChameleonMiniGUI\bin\Debug\ 18 | - ps: 7z a release.zip C:\ChameleonGUI\ChameleonMiniGUI\bin\Debug\ 19 | 20 | test_script: 21 | - ps: if(!(Test-Path C:\ChameleonGUI\Be.Windows.Forms.HexBox\bin\Debug\Be.Windows.Forms.HexBox.dll)){throw "Exe file do not exists."} 22 | - ps: if(!(Test-Path C:\ChameleonGUI\ChameleonMiniGUI\bin\Debug\ChameleonMiniGUI.exe)){throw "Exe file do not exists."} 23 | - ps: cd C:\ChameleonGUI\ChameleonTest; nuget restore -PackagesDirectory packages 24 | - ps: cd C:\ChameleonGUI\ChameleonTest;msbuild 25 | - ps: if(!(Test-Path C:\ChameleonGUI\ChameleonTest\ChameleonTest\bin\Debug\ChameleonTest.dll)){throw "Cant build tests."} 26 | - ps: vstest.console.exe ChameleonTest\bin\Debug\ChameleonTest.dll 27 | 28 | pull_requests: 29 | do_not_increment_build_number: true 30 | 31 | deploy_script: 32 | - ps: cd C:\ChameleonGUI 33 | - ps: Push-AppveyorArtifact release.zip -DeploymentName "$env:GitVersion_MajorMinorPatch";Write-Host "Artefact deploy [ OK ]" -ForegroundColor Green 34 | 35 | on_success: 36 | - ps: Write-Host "Build success..." -ForegroundColor Green 37 | on_failure: 38 | - ps: Write-Host "Build error." -ForegroundColor Red 39 | on_finish: 40 | - ps: $blockRdp = $false; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) 41 | 42 | --------------------------------------------------------------------------------