-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a malware database to detect bad programs on the system (Window…
…s only) Added 204 toolbars to malware list (Windows only) Added support to Linux and others mono compatible systems Added a 'build.bat' file to compile project under Windows (Visual Studio required) Added a 'Makefile' file to compile project under Linux systems using Mono (mono-complete required) Changed program will now be executed using 64bit process under 64bit systems, otherwise 32bit will be used Changed GUI update timer interval to 1s rather than 500ms Changed uptime values are now represented by: days.hours:minutes:seconds Changed controls postion to bottom left instead of top right Changed page title build date to use CurrentCulture instead of InvariantCulture Changed rewrite whole reports using HtmlTextWriter wich use a StringBuilder instead a single string with concatenation Changed program will now run with less privileges (from full to admin) Improved report generation performance Removed Service type from report
- Loading branch information
Showing
36 changed files
with
1,586 additions
and
375 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# | ||
# SystemInfoSnapshot | ||
# Author: Tiago Conceição | ||
# http://systeminfosnapshot.com | ||
# | ||
# Makefile - build and compile project | ||
# | ||
|
||
# Project file | ||
PROJECTFILE=SystemInfoSnapshot.sln | ||
|
||
# Configuration to use: Release or Debug | ||
CONFIGURATION="Release" | ||
#CONFIGURATION="Debug" | ||
|
||
# The compiler to use. | ||
CC=xbuild | ||
|
||
# Properties will be the options pass to the compiler. | ||
PROPERTIES = \ | ||
/property:Configuration=$(CONFIGURATION) | ||
|
||
all: app | ||
|
||
app: | ||
$(CC) $(PROPERTIES) $(PROJFILE) | ||
|
||
rebuild: clean app | ||
|
||
clean: | ||
$(CC) $(PROPERTIES) /target:clean $(PROJECTFILE) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
/* | ||
* SystemInfoSnapshot | ||
* Author: Tiago Conceição | ||
* | ||
* http://systeminfosnapshot.com/ | ||
* https://github.com/sn4k3/SystemInfoSnapshot | ||
*/ | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Web.UI; | ||
|
||
namespace SystemInfoSnapshot.Components | ||
{ | ||
public class HtmlTextWriterEx : HtmlTextWriter | ||
{ | ||
private Dictionary<HtmlTextWriterAttribute, List<string>> _attrValues = new Dictionary<HtmlTextWriterAttribute, List<string>>(); | ||
private readonly HtmlTextWriterAttribute[] _allowedMultiValueAttrs = { HtmlTextWriterAttribute.Class, HtmlTextWriterAttribute.Style }; | ||
|
||
public HtmlTextWriterEx(TextWriter writer) : base(writer) { } | ||
|
||
public override void AddAttribute(HtmlTextWriterAttribute key, string value) | ||
{ | ||
if (_allowedMultiValueAttrs.Contains(key)) | ||
{ | ||
if (!_attrValues.ContainsKey(key)) | ||
_attrValues.Add(key, new List<string>()); | ||
|
||
_attrValues[key].Add(value); | ||
} | ||
else | ||
{ | ||
base.AddAttribute(key, value); | ||
} | ||
} | ||
|
||
public bool RemoveAttribute(HtmlTextWriterAttribute key, string value) | ||
{ | ||
return _allowedMultiValueAttrs.Contains(key) && _attrValues.Remove(key); | ||
} | ||
|
||
public override void RenderBeginTag(HtmlTextWriterTag tagKey) | ||
{ | ||
AddMultiValuesAttrs(); | ||
base.RenderBeginTag(tagKey); | ||
} | ||
|
||
public override void RenderBeginTag(string tagName) | ||
{ | ||
AddMultiValuesAttrs(); | ||
base.RenderBeginTag(tagName); | ||
} | ||
|
||
public void RenderTag(HtmlTextWriterTag tagKey, string html) | ||
{ | ||
RenderBeginTag(tagKey); | ||
if (!string.IsNullOrEmpty(html)) | ||
Write(html); | ||
RenderEndTag(); | ||
} | ||
|
||
public void RenderTag(string tagKey, string html) | ||
{ | ||
RenderBeginTag(tagKey); | ||
Write(html); | ||
RenderEndTag(); | ||
} | ||
|
||
public void RenderTag(HtmlTextWriterTag tagKey, HtmlTextWriterAttribute attribute, string attributeVal, string html) | ||
{ | ||
AddAttribute(attribute, attributeVal); | ||
RenderTag(tagKey, html); | ||
} | ||
|
||
public void RenderTag(HtmlTextWriterTag tagKey, string attribute, string attributeVal, string html) | ||
{ | ||
AddAttribute(attribute, attributeVal); | ||
RenderTag(tagKey, html); | ||
} | ||
|
||
|
||
private void AddMultiValuesAttrs() | ||
{ | ||
foreach (var key in _attrValues.Keys) | ||
AddAttribute(key.ToString(), string.Join(" ", _attrValues[key].ToArray())); | ||
|
||
_attrValues = new Dictionary<HtmlTextWriterAttribute, List<string>>(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* SystemInfoSnapshot | ||
* Author: Tiago Conceição | ||
* | ||
* http://systeminfosnapshot.com/ | ||
* https://github.com/sn4k3/SystemInfoSnapshot | ||
*/ | ||
using System; | ||
|
||
namespace SystemInfoSnapshot.Extensions | ||
{ | ||
public static class StringExtensions | ||
{ | ||
public static bool Contains(this string source, string toCheck, StringComparison comp) | ||
{ | ||
return source.IndexOf(toCheck, comp) >= 0; | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/* | ||
* SystemInfoSnapshot | ||
* Author: Tiago Conceição | ||
* | ||
* http://systeminfosnapshot.com/ | ||
* https://github.com/sn4k3/SystemInfoSnapshot | ||
*/ | ||
using System; | ||
using System.Linq; | ||
using SystemInfoSnapshot.Extensions; | ||
|
||
namespace SystemInfoSnapshot.Malware | ||
{ | ||
public sealed class MalwareItem | ||
{ | ||
#region Properties | ||
/// <summary> | ||
/// Gets or sets the malware name | ||
/// </summary> | ||
public string Name { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the malware type | ||
/// </summary> | ||
public MalwareType Type { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets if this malware must exactly match with a software name or only need to contains all words in it | ||
/// </summary> | ||
public bool ExactMatch { get; set; } | ||
#endregion | ||
|
||
#region Constructor | ||
public MalwareItem() | ||
{ | ||
} | ||
|
||
public MalwareItem(string name, MalwareType type, bool exactMatch = false) | ||
{ | ||
Name = name; | ||
Type = type; | ||
ExactMatch = exactMatch; | ||
} | ||
#endregion | ||
|
||
# region Overrides | ||
public override string ToString() | ||
{ | ||
return string.Format("Name: {0}, Type: {1}", Name, Type); | ||
} | ||
|
||
private bool Equals(MalwareItem other) | ||
{ | ||
return string.Equals(Name, other.Name); | ||
} | ||
|
||
public override bool Equals(object obj) | ||
{ | ||
if (ReferenceEquals(null, obj)) return false; | ||
if (ReferenceEquals(this, obj)) return true; | ||
return obj is MalwareItem && Equals((MalwareItem) obj); | ||
} | ||
|
||
public bool Equals(string name) | ||
{ | ||
return ExactMatch ? Name.Equals(name) : Name.Split(' ').All(word => name.Contains(word, StringComparison.OrdinalIgnoreCase)); | ||
} | ||
|
||
public override int GetHashCode() | ||
{ | ||
return (Name != null ? Name.GetHashCode() : 0); | ||
} | ||
#endregion | ||
} | ||
} |
Oops, something went wrong.