Skip to content

Commit

Permalink
removed endorsing option, include version/sha in install report, link…
Browse files Browse the repository at this point in the history
… sha to virustotal
  • Loading branch information
halgari committed Sep 5, 2019
1 parent 62a1776 commit 064cef8
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ to be a list of other profiles to be included in the install. This list should b
* Config files that don't otherwise match a rule are inlined into the modlist
* Warn users before installing into an existing MO2 install folder (prevents unintentional data loss from overwriting existing data #24)
* Fix for read only folder deletion bug (#23)
* Include version numbers and SHAs in the install report
* Removed option to endorse mods, Nexus devs mentioned it was of questionable worth, I (halgari) agree

#### Version 0.8.1 - 8/29/2019
* Fixed a bug that was causing VFS temp folders not to be cleaned
Expand Down
10 changes: 10 additions & 0 deletions Wabbajack.Common/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,16 @@ public static string ToBase64(this byte[] data)
return Convert.ToBase64String(data);
}

public static string ToHEX(this byte[] bytes)
{
StringBuilder builder = new StringBuilder();
for (int i = 0; i < bytes.Length; i++)
{
builder.Append(bytes[i].ToString("x2"));
}
return builder.ToString();
}

/// <summary>
/// Returns data from a base64 stream
/// </summary>
Expand Down
4 changes: 3 additions & 1 deletion Wabbajack/Installer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ public void Install()
BuildBSAs();

Info("Installation complete! You may exit the program.");
AskToEndorse();
// Removed until we decide if we want this functionality
// Nexus devs weren't sure this was a good idea, I (halgari) agree.
//AskToEndorse();
}

private void AskToEndorse()
Expand Down
10 changes: 9 additions & 1 deletion Wabbajack/ReportBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,31 @@ public void Build(ModList lst)
Text($"#### Download Summary ({lst.Archives.Count} archives)");
foreach (var archive in SortArchives(lst.Archives))
{
var hash = archive.Hash.FromBase64().ToHEX();
switch (archive)
{
case NexusMod m:
var profile = m.UploaderProfile.Replace("/games/", "/"+NexusAPI.ConvertGameName(m.GameName).ToLower()+"/");
NoWrapText($"* [{m.UploadedBy}]({profile}) - [{m.Name}](http://nexusmods.com/{NexusAPI.ConvertGameName(m.GameName)}/mods/{m.ModID})");
NoWrapText($"* [{m.Name}](http://nexusmods.com/{NexusAPI.ConvertGameName(m.GameName)}/mods/{m.ModID})");
NoWrapText($" * Author : [{m.UploadedBy}]({profile})");
NoWrapText($" * Version : {m.Version}");
NoWrapText($" * SHA256 : [{hash}](https://www.virustotal.com/gui/file/{hash})");
break;
case MODDBArchive m:
NoWrapText($"* MODDB - [{m.Name}]({m.URL})");
NoWrapText($" * SHA256 : [{hash}](https://www.virustotal.com/gui/file/{hash})");
break;
case MEGAArchive m:
NoWrapText($"* MEGA - [{m.Name}]({m.URL})");
NoWrapText($" * SHA256 : [{hash}](https://www.virustotal.com/gui/file/{hash})");
break;
case GoogleDriveMod m:
NoWrapText($"* GoogleDrive - [{m.Name}](https://drive.google.com/uc?id={m.Id}&export=download)");
NoWrapText($" * SHA256 : [{hash}](https://www.virustotal.com/gui/file/{hash})");
break;
case DirectURLArchive m:
NoWrapText($"* URL - [{m.Name} - {m.URL}]({m.URL})");
NoWrapText($" * SHA256 : [{hash}](https://www.virustotal.com/gui/file/{hash})");
break;
}
}
Expand Down

0 comments on commit 064cef8

Please sign in to comment.