question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add piracy checking

See original GitHub issue

Description

It is believed that tML needs Steam to run, but recently I found that a modified steam_api.dll can be used to bypass the Steam check. Many players here do not want to pay for the game, so they use a pirate version of Terraria, and also tML if replacing the executable. Thus, I think a check on steam_api.dll should be performed.

Versions

All versions.

Additional Information

I suggest to perform a SHA1 or any other Hash check on the library before running SocialAPI to check the integrity of official version of tML including any other libraries it uses.

The SHA1 hash of vanilla steam_api.dll is 4ee43374520904fa6d80c12c273d67eb7b5c984e. I wrote my own solution as follows:

byte[] b = new byte[] { 0x4e, 0xe4, 0x33, 0x74, 0x52, 0x09, 0x04, 0xfa, 0x6d, 0x80, 0xc1, 0x2c, 0x27, 0x3d, 0x67, 0xeb, 0x7b, 0x5c, 0x98, 0x4e };
var data = File.ReadAllBytes("steam_api.dll");
var hash = SHA1.Create().ComputeHash(data);
if (hash.SequenceEqual(b)) {...}    // using System.Linq

Also, the pirate version of steam_api.dll can be downloaded here: [modified_steam_api.zip]

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:6
  • Comments:44 (21 by maintainers)

github_iconTop GitHub Comments

8reactions
Chicken-Bonescommented, Jan 19, 2019

See, you’re missing the part where anyone can modify and build tModLoader to remove the check.

6reactions
Ristovskicommented, Feb 22, 2019

You are talking about adding another check to Terraria to battle piracy and then yourself provide a “modified” steam_api.dll.

Also, how would this work on Linux/Mac? They use native versions of steam_api.so and not the Windows dll.

If you were to implement the check with a basic sha1sum “integrity” check I can assure you that can be cracked with a single sed command under Linux by directly replacing the sha1sum with the one from the “modified” steam_api.{so,dll}.

Which means you would have to actually put effort into creating a non-trivial DRM.

Is tModLoader supposed to be a DRM? No.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Plagiarism Checker | 100% Free and Accurate - Duplichecker
Plagiarism Checker offered by DupliChecker. Completely free and accurate online tool to check plagiarism. Just Copy & Paste to detect Copied content.
Read more >
Plagiarism Checker Free | Accurate with Percentage
Plagiarism checker free and accurately detects copyright content from assignments or Documents with 0$ cost and ONE-click essay checker.
Read more >
Plagiarism Checker | Free Fast Accurate
Enter text into plagiarism detection tool. We make it simple. Just copy and paste all content from your document into our plagiarism checker...
Read more >
Unicheck: Plagiarism Checker for Educators and Students
Try out an LMS-friendly plagiarism checker for education. ⏩ Check papers, essays, and articles across 91B current and archived web pages.
Read more >
Plagiarism Checker | AI-powered premium solution
Plagiarism checker by Copyleaks. The most comprehensive solution to detect plagiarized content. Get started today.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found