Code Monkey home page Code Monkey logo

bitjack21-radiojack.one-radiocoin-dogecoin-blackjack's Introduction

bitjack21 - radiojack.one (radiocoin blackjack) **** DEBIAN 10 suggested ONLY (different php versions)

requires selinux disabled or a policy has to be set with selinux if set to enforcing to let the coin daemon connect with rpc or Bitcoin daemon -323 errors

#replace 22555 with port matching dogecoin.conf

test getnewaddress (dogecoin-cli genewaddress # for receiving)

 curl -L --user root:root --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getnewaddress","params":[]}' -H 'content-type:text/plain;' http://127.0.0.1:22555

test getinfo

  curl -L --user root:root --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getinfo","params":[]}' -H 'content-type:text/plain;' http://127.0.0.1:22555
  • could be a docker image but its not

  • changed chips from a floating decimal only to a round number as a balance or playable balance or withdraw-able balance

  • to do, change 1,5,10 chips to 10,50,100 via png edit

-> done * readded deposit by QR code

s1

bitjack21.com

code has pre-existing graphs in graph_profits.php
code uses pre-existing crude admin.php panel 
must change if user != c4pt to admin username for site

admin.php:if(!isset($_SESSION['username']) || ($_SESSION['username'] != 'c4pt' && $_SESSION['username'] != 'c4pt'))
admin.php:  $q1 = mysqli_query($con, "select sum(netGain)/-100 as gain from games where player != 'c4pt'");

game play logic and min / max bet in control.php

define('MAX_BET', 1000);
define('MIN_BET', 100);

requires radiocoin, mysql, httpd, phpmyadmin (or managing the database manually with mysql)

  yum install nano sudo wget git-core httpd ufw mysql-server mysql phpMyAdmin.noarch -y
  yum install radio*rpm -y
  rpm -e --nodeps firewalld firewalld-filesystem
  echo "IPV6=no" >> /etc/ufw/ufw.conf
  systemctl enable ufw
  ufw enable
  ufw allow in 80
  ufw allow out 53
  ufw allow out 80
  ufw allow out 443
  ufw allow out 9332
  ufw allow out 9333
  ufw allow out 3306
  ufw status verbose
  ufw status numbered
  ufw show listening

disable phpmyadmin (if not in use or safe guarded) will be visible and accessible from outside WAN

phpMyAdmin.conf goes in /etc/httpd/conf.d/
welcome.conf goes in /etc/httpd/conf.d/
radiocoin.conf goes in /root/.radiocoin/radiocoin.conf
fix-perm.sh to set permissions for /var/www/html
setenforce 0 (disable selinux, at your own risk)
install mariadb (formerly mysql) + httpd (and or phpmyadmin)
 systemctl start mariadb
 systemctl enable mariadb

systemctl enable httpd
systemctl start httpd
copy * to /var/www/html
sh fix-perm.sh
systemctl restart httpd
mysql_secure_installation 
create database "radiojack" or change database name accordingly in common.php
install database template
mysql -u root -p radiojack < bitjack21_DB.sql

navigate to 127.0.0.1/phpMyAdmin where 127.0.0.1 is your WAN ip

use your own security guidelines this is just a template set mysql connection in common.php change yourpassword-here to the root password (or user password) that can access "radiojack"

function connectDB()
{

$sql = new mysqli('localhost', 'root', 'yourpassword-here', 'radiojack');
 
if($sql->connect_errno > 0){
    die('Unable to connect to database [' . $sql->connect_error . ']');
}
 
$con = mysqli_connect("localhost","root","yourpassword-here","radiojack") or die("Some error occurred during connection " . mysqli_error($con));


  return $con;


}

also in common.php the radiocoin.conf connection (must match radiocoin.conf rpcuser/rpcpassword) rpcallowip=127.0.0.1 in radiocoin.conf only allows connections from your local LAN (no WAN access) to safe guard rpc commands remotely must also keep paytxfee=1.00 for a minimum to remove from the site wallet balance in order to be able to send

function connectBitcoin()
{


          $bitcoin = new jsonRPCClient('http://root:[email protected]:9332/');

	  return $bitcoin;
}

s1 s1 s1 s1 s1 s1

bitjack21-radiojack.one-radiocoin-dogecoin-blackjack's People

Contributors

c4pt000 avatar moesizlak avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.