Adventure Crypto Discovery Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

SMF - Just Installed!

Author Topic: Your Private Messenger in 10 minutes!  (Read 1302 times)

bomj

  • Newbie
  • *
  • Karma: +1/-0
  • Offline Offline
  • Posts: 28
Your Private Messenger in 10 minutes!
« on: November 16, 2018, 11:39:32 PM »

Own Private Messenger.
An example of a free messenger for a specific circle of participants.

This is an example of a public messenger:
https://wall.0xbt.net/BigBalls.html

Works on the Rinkeby test network

To create your own messenger.
1. Go to MyEtherWallet
- Section 'Contracts'
- Click 'Deploy Contract'
- Paste "Byte Code":

Code: [Select]
0x60806040526040805190810160405280601f81526020017f57656c636f6d6520746f207468652050726f6a65637420307862742e6e6574008152506000908051906020019061004f929190610062565b5034801561005c57600080fd5b50610107565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100a357805160ff19168380011785556100d1565b828001600101855582156100d1579182015b828111156100d05782518255916020019190600101906100b5565b5b5090506100de91906100e2565b5090565b61010491905b808211156101005760008160009055506001016100e8565b5090565b90565b6102d7806101166000396000f30060806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680638c6838ba14610051578063c38caab5146100e1575b600080fd5b34801561005d57600080fd5b5061006661014a565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100a657808201518184015260208101905061008b565b50505050905090810190601f1680156100d35780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156100ed57600080fd5b50610148600480360381019080803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091929192905050506101ec565b005b606060008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156101e25780601f106101b7576101008083540402835291602001916101e2565b820191906000526020600020905b8154815290600101906020018083116101c557829003601f168201915b5050505050905090565b8060009080519060200190610202929190610206565b5050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061024757805160ff1916838001178555610275565b82800160010185558215610275579182015b82811115610274578251825591602001919060010190610259565b5b5090506102829190610286565b5090565b6102a891905b808211156102a457600081600090555060010161028c565b5090565b905600a165627a7a7230582088266c3e343870866e9dc688e0b18de7babf9b7c16a7e14318ed514ac232ac780029
Gas Limit at its discretion, asked 3,000,000
- Connect to MetaMask
- Click 'Sign Transaction'
- Click 'Deploy Contract'
- When calling MetaMask, you can safely reduce the Gas to 10 gwei

You have created a contract of your messenger!

2. In this messenger code, change the contract 0xae4243e2c0f910223323dd2f2fdd16820b69f1d6
- insert your contract in lines 31 and 70(39 and 90)

Code: [Select]
<html>
<head>
<meta charset="utf-8">
<title>BigBalls :)</title>
<link rel="shortcut icon" href="https://wall.0xbt.net/assets/images/m1-120x120.png" type="image/x-icon">
<script src="https://rinkeby.etherscan.io/cdn-cgi/apps/head/4wF8T_csPHk5U5Lb4Ye_MOdzMxk.js"></script>
<link rel='stylesheet' type='text/css' href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,600&amp;subset=cyrillic,latin'>
<script type="text/javascript" src="https://rinkeby.etherscan.io/jss/web3.min.js?v=0.20.6"></script>
<script type="text/javascript" src="https://rinkeby.etherscan.io/jss/bignumber.js"></script>
<style>
    a {
    text-decoration: none; /* Отменяем подчеркивание у ссылки */
    }
button.knopka {
color: #fff;
background: #828282;
padding: 5px;
border-radius: 5px;
border: 2px solid #teal;
}
button.knopka:hover {
background: #000;
}
</style>

</head>
<body style="background-color:#2E2E2E">
<table border = "15" width ="100%" cellpadding = "5" cellspacing ="15" bordercolor="#2E2E2E" bgcolor=""><tr><td>
<!--<div class="row" style="padding-top:54px;">-->
<div class="col-md-12">
<div class="row">

</div>
</div>
<!--</div>-->

<center>
<h4><span style="color:teal"><b>Rinkeby TestNet</b></span></h4><br>
<button class="knopka" id='btn_5'><a href="https://rinkeby.etherscan.io/writecontract/index.html?a=0xae4243e2c0f910223323dd2f2fdd16820b69f1d6&n=rinkeby" title="section - '4. setPost'" target="_blank"><b><span style="color:white;">Send <i class="fa fa-btc"></i> News</span></b></a></button>
<button type='button' id='btn_5' class="knopka" onclick="ethcall2('getPost', 'input_5','myanswer_5','string', '|string', 'btn_5');">Get <i class="fa fa-btc"></i> News</button>
<div align="left"><b><span id='myanswer_5' style="color:teal"></span></b></div><br><br>
</center>
</body></td></tr></table>
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
<script>
   
    $('#overlay', window.parent.document).hide();
    jQuery(window).load(function () {
         var mode = getParameterByName("m");

        if (mode === "dark") {
            var src = $('body');                     
            src.addClass('dark-mode');
        }

        $('#overlay').fadeOut("slow");
       
        var obj = window.parent.document.getElementById('readcontractiframe');

        if (obj)
            parent.resizeIframe(obj, 0);

       
    });
   
    function getcontractabi(contractaddress) {
       
            $.post("https://Rinkeby.etherscan.io/api",
       
                {
                    module: "contract",
                    action: "getabit",
                    address: contractaddress
                },
                function (data, status) {
                    console.log("contractAbi = " + data)
                });
    }

    var Web3 = require('web3');
   
    var web3 = new Web3(new Web3.providers.HttpProvider("https://rinkeby.infura.io/v3/80f1c00345214da4bdbc4d02f35fb265"));
   
    var version = web3.version.api;
    console.log(version);
    var MyContract;
    var myContractInstance;
    try {
        MyContract = web3.eth.contract([{"constant":true,"inputs":[],"name":"getPost","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newPost","type":"string"}],"name":"setPost","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]);
        myContractInstance = MyContract.at("0xae4243e2c0f910223323dd2f2fdd16820b69f1d6");
    }
    catch (err) {
        console.log(err.message);
    }   
    function ethcall2(strMethodName, strInputElementName, strOutputElementName, strOutputtype, strOutputFieldNames, strBtnName) {       
   
        var functionNametoCall = "myContractInstance." + strMethodName;
        var result;
        try {
            var strparas;
            var elms = document.querySelectorAll("[id=" + strInputElementName + "]");
            //console.log("elms.length = " + elms.length);           
            for (var i = 0; i < elms.length; i++) {
                if (i == 0) {
                    strparas = "'" + add0xforAddress(Escape(elms[i].value)) + "'"
                } else {
                    strparas = strparas + ",'" + Escape(elms[i].value) + "'"
                }
                if (elms[i].value == '') {
                    document.getElementById(strInputElementName).focus();                   
                    alert('Input value cannot be empty');
                    return false;
                }
            }
            showLoading(true, strBtnName);

            new Function(functionNametoCall + "(" + strparas + ", function(err, res){ if (err) {result = err;} else { result = res; } showMessage('" + strMethodName +"',result,'" + strOutputElementName+"','" + strOutputFieldNames +"','"+ strBtnName +"');   });")();

           
           // result = eval(functionNametoCall + "(" + strparas + ");");
           
           // $('#overlay').show();
        }
        catch (err) {
            //$('#overlay').show();
            result = "" + err + "";
            showLoading(false, strBtnName);
        }
        //setTimeout(function () {
        //    $('#overlay').show();
        //}, 2500);
       
        //document.getElementById(strOutputElementName).innerHTML = "<br><br> [&nbsp;<b>" + strMethodName + "</b> method Response ]<br>" + formatmultipleoutputs(result, strOutputFieldNames) + "<br>";
             
    }

    function showMessage(strMethodName, result, strOutputElementName, strOutputFieldNames, strBtnName) {
       
        document.getElementById(strOutputElementName).innerHTML = "<br><br> [&nbsp;<b>" + strMethodName + "</b> method Response ]<br>" + formatmultipleoutputs(result, strOutputFieldNames) + "<br>";
        showLoading(false, strBtnName); 

         //var obj = window.parent.document.getElementById('readcontractiframe');
         //   parent.resizeIframe(obj, 0);
    }

    function showLoading(isShow, strBtnName) {
       
        if (isShow) {
            $(" <img id='waiting_" + strBtnName + "' class='waitingImg' src='https://rinkeby.etherscan.io/images/ajax-loader2.gif' style='margin-left:5px;' alt='Loading' />").insertAfter($('#' + strBtnName));
            $('#' + strBtnName).prop('disabled', true);
        } else {
            $('#' + strBtnName).prop('disabled', false);
            $('#waiting_' + strBtnName).remove();
        }
    }

    function Escape(val) {
        return val.replace(/'/g, "\\u0027");
    }

    function formatmultipleoutputs(strVal, strOutputFieldNames) {
        var strAnswer = '';
        //console.log("strVal = " + strVal);
        //console.log("strOutputFieldNames = " + strOutputFieldNames);
        //console.log("strVal.length = " + strVal.length);
        if (strOutputFieldNames.includes(';') == true) {
            var res_2 = strOutputFieldNames.split(';');
            for (i = 0; i < strVal.length; i++) {
                var tmparray = res_2[i].toString().split('|');
                strAnswer = strAnswer + "&nbsp;<span class='text-success'><i class='fa  fa-angle-double-right'></i></span> ";
                if (res_2[i] != null && res_2[i].toString() != '') {
                    strAnswer = strAnswer + " <strong>" + tmparray[0] + "</strong> &nbsp; <span class='text-secondary'><i>" + tmparray[1] + "</i></span> <b>:</b> &nbsp;"
                }
                strAnswer = strAnswer + formatresult(strVal[i].toString(), tmparray[1]) + "<br>";
            }
        } else {
            strAnswer = strAnswer + "&nbsp;<span class='text-success'><i class='fa  fa-angle-double-right'></i></span> ";
            if (strOutputFieldNames != '') {
                var tmparray = strOutputFieldNames.toString().split('|');
                strAnswer = strAnswer + " <strong>" + tmparray[0] + "</strong> &nbsp; <span class='text-secondary'><i>" + tmparray[1] + "</i></span> <b>:</b> &nbsp;";
                strVal = formatresult(strVal.toString(), tmparray[1])
            }
            strAnswer = strAnswer + replaceAll(strVal, ",", "<br>&nbsp;<span class='text-success'><i class='fa  fa-angle-double-right'></i></span> ") + "<br>";
        }
        return strAnswer;
    }

    function htmlEncode(value) {
        return $('<div/>').text(value).html();
    }
    function replaceAll(str, find, replace) {
        return str.replace(new RegExp(find, 'g'), replace);
    }
    function formatresult(strResult, resulttype) {
        if (resulttype.startsWith('uint')) {
            return toFixed(strResult);
        } else if (resulttype == 'string') {
            return htmlEncode(strResult);
            //return hex_to_ascii(strResult);
        } else if (resulttype == 'address') {
            if (strResult != '0x0000000000000000000000000000000000000000') {
                return "<a href='/address/" + strResult + "' target='_blank'>" + strResult + "</a>";
            } else {
                return htmlEncode(strResult);
            }
            //} else if (resulttype == 'bool') {
            //    return Boolean(remove0x(strResult));
        } else {
            return htmlEncode(strResult);
        }
    }
    function hex_to_ascii(str1) {
        var hex = str1.toString();
        var str = '';
        for (var n = 0; n < hex.length; n += 2) {
            str += String.fromCharCode(parseInt(hex.substr(n, 2), 16));
        }
        return str;
    }
    function extractaddress(str1) {
        if (str1.length > 40) {
            str1.substr(str1.length - 40)
        }
        return str1;
    }
    function remove0x(str1) {
        if (str1.startsWith("0x") == true) {
            str1 = str1.substr(str1.length - str1.length + 2);
        }
        return str1;
    }
    function add0xforAddress(straddress) {
        straddress = straddress.trim();
        if (straddress.startsWith("0x") == false && straddress.length == 40) {
            straddress = "0x" + straddress;
        }
        return straddress;
    }
    function toFixed(x) {
        if (x.indexOf("e+") !== -1) {
            var value = web3.toBigNumber(x);
            x = value.toString(10);
        }
        return x;
    }     
    setTimeout(function () {
       
    }, 0);

    function getParameterByName(name) {
            var url = window.location.href;
            name = name.replace(/[\[\]]/g, "\\$&");
            var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
                results = regex.exec(url);
            if (!results) return null;
            if (!results[2]) return '';
            return decodeURIComponent(results[2].replace(/\+/g, " "));
    }

     $(document).ready(function () {
        $(window).keydown(function (event) {
            if (event.keyCode == 13) {
                event.preventDefault();
                return false;
            }
        });
    });
</script>
</html>

Copy the code and convert to Base64 https://base64.0xbt.net/
Before the code, insert "data:text/html;base64,"
Paste the received code into the Google Chrome browser line.

Everything, you have your own messenger.
All you have to do is share the received code with your relatives or with friends.
Looking for what purpose you created it.
If you want to encrypt your messages, you can use service https://webcrypt.0xbt.net/
Using this messenger in the Rinkeby network you can use
its free. For this you need a test Ether.

Good luck!
« Last Edit: April 07, 2019, 12:33:15 AM by bomj »
Logged

bomj

  • Newbie
  • *
  • Karma: +1/-0
  • Offline Offline
  • Posts: 28
Re: Your Private Messenger in 10 minutes!
« Reply #1 on: November 16, 2018, 11:43:29 PM »

Here the result:

Code: [Select]
data:text/html;base64,PGh0bWw+CjxoZWFkPgo8bWV0YSBjaGFyc2V0PSJ1dGYtOCI+Cjx0aXRsZT5CaWdCYWxscyA6KTwvdGl0bGU+CjxsaW5rIHJlbD0ic2hvcnRjdXQgaWNvbiIgaHJlZj0iaHR0cHM6Ly93YWxsLjB4YnQubmV0L2Fzc2V0cy9pbWFnZXMvbTEtMTIweDEyMC5wbmciIHR5cGU9ImltY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XV0YWJpbGl0eSI6Im5vbnBheWFibGUiLCJ0eXBlIjoiZnVuY3Rpb24ifV0pOwogICAgICAgIG15Q29udHJhY3RJbnN0YW5jZSA9IE15Q29udHJhY3QuYXQoIjB4YWU0MjQzZTJjMGY5MTAyMjMzMjNkZDJmMmZkZDE2ODIwYjY5ZjFkNiIpOwogICAgfQogICAgY2F0Y2ggKGVycikgewogICAgICAgIGNvbnNvbGUubG9nKGVyci5tZXNzYWdlKTsKICAgIH0gICAgCiAgICBmdW5jdGlvbiBldGhjYWxsMihzdHJNZXRob2ROYW1lLCBzdHJJbnB1dEVsZW1lbnROYW1lLCBzdHJPdXRwdXRFbGVtZW50TmFtZSwgc3RyT3V0cHV0dHlwZSwgc3RyT3V0cHV0RmllbGROYW1lcywgc3RyQnRuTmFtZSkgeyAgICAgICAgCiAgIAogICAgICAgIHZhciBmdW5jdGlvbk5hbWV0b0NhbGwgPSAibXlDb250cmFjdEluc3RhbmNlLiIgKyBzdHJNZXRob2ROYW1lOwogICAgICAgIHZhciByZXN1bHQ7CiAgICAgICAgdHJ5IHsKICAgICAgICAgICAgdmFyIHN0cnBhcmFzOwogICAgICAgICAgICB2YXIgZWxtcyA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoIltpZD0iICsgc3RySW5wdXRFbGVtZW50TmFtZSArICJdIik7CiAgICAgICAgICAgIC8vY29uc29sZS5sb2coImVsbXMubGVuZ3RoID0gIiArIGVsbXMubGVuZ3RoKTsgICAgICAgICAgICAKICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBlbG1zLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICBpZiAoaSA9PSAwKSB7CiAgICAgICAgICAgICAgICAgICAgc3RycGFyYXMgPSAiJyIgKyBhZGQweGZvckFkZHJlc3MoRXNjYXBlKGVsbXNbaV0udmFsdWUpKSArICInIgogICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBzdHJwYXJhcyA9IHN0cnBhcmFzICsgIiwnIiArIEVzY2FwZShlbG1zW2ldLnZhbHVlKSArICInIgogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKGVsbXNbaV0udmFsdWUgPT0gJycpIHsKICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZChzdHJJbnB1dEVsZW1lbnROYW1lKS5mb2N1cygpOyAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICBhbGVydCgnSW5wdXQgdmFsdWUgY2Fubm90IGJlIGVtcHR5Jyk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHNob3dMb2FkaW5nKHRydWUsIHN0ckJ0bk5hbWUpOwoKICAgICAgICAgICAgbmV3IEZ1bmN0aW9uKGZ1bmN0aW9uTmFtZXRvQ2FsbCArICIoIiArIHN0cnBhcmFzICsgIiwgZnVuY3Rpb24oZXJyLCByZXMpeyBpZiAoZXJyKSB7cmVzdWx0ID0gZXJyO30gZWxzZSB7IHJlc3VsdCA9IHJlczsgfSBzaG93TWVzc2FnZSgnIiArIHN0ck1ldGhvZE5hbWUgKyInLHJlc3VsdCwnIiArIHN0ck91dHB1dEVsZW1lbnROYW1lKyInLCciICsgc3RyT3V0cHV0RmllbGROYW1lcyArIicsJyIrIHN0ckJ0bk5hbWUgKyInKTsgICB9KTsiKSgpOwoKICAgICAgICAgICAgCiAgICAgICAgICAgLy8gcmVzdWx0ID0gZXZhbChmdW5jdGlvbk5hbWV0b0NhbGwgKyAiKCIgKyBzdHJwYXJhcyArICIpOyIpOwogICAgICAgICAgIAogICAgICAgICAgIC8vICQoJyNvdmVybGF5Jykuc2hvdygpOwogICAgICAgIH0KICAgICAgICBjYXRjaCAoZXJyKSB7CiAgICAgICAgICAgIC8vJCgnI292ZXJsYXknKS5zaG93KCk7CiAgICAgICAgICAgIHJlc3VsdCA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ksIHJlcGxhY2UpOwogICAgfQogICAgZnVuY3Rpb24gZm9ybWF0cmVzdWx0KHN0clJlc3VsdCwgcmVzdWx0dHlwZSkgewogICAgICAgIGlmIChyZXN1bHR0eXBlLnN0YXJ0c1dpdGgoJ3VpbnQnKSkgewogICAgICAgICAgICByZXR1cm4gdG9GaXhlZChzdHJSZXN1bHQpOwogICAgICAgIH0gZWxzZSBpZiAocmVzdWx0dHlwZSA9PSAnc3RyaW5nJykgewogICAgICAgICAgICByZXR1cm4gaHRtbEVuY29kZShzdHJSZXN1bHQpOwogICAgICAgICAgICAvL3JldHVybiBoZXhfdG9fYXNjaWkoc3RyUmVzdWx0KTsKICAgICAgICB9IGVsc2UgaWYgKHJlc3VsdHR5cGUgPT0gJ2FkZHJlc3MnKSB7CiAgICAgICAgICAgIGlmIChzdHJSZXN1bHQgIT0gJzB4MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMCcpIHsKICAgICAgICAgICAgICAgIHJldHVybiAiPGEgaHJlZj0nL2FkZHJlc3MvIiArIHN0clJlc3VsdCArICInIHRhcmdldD0nX2JsYW5rJz4iICsgc3RyUmVzdWx0ICsgIjwvYT4iOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgcmV0dXJuIGh0bWxFbmNvZGUoc3RyUmVzdWx0KTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvL30gZWxzZSBpZiAocmVzdWx0dHlwZSA9PSAnYm9vbCcpIHsKICAgICAgICAgICAgLy8gICAgcmV0dXJuIEJvb2xlYW4ocmVtb3ZlMHgoc3RyUmVzdWx0KSk7CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgcmV0dXJuIGh0bWxFbmNvZGUoc3RyUmVzdWx0KTsKICAgICAgICB9CiAgICB9CiAgICBmdW5jdGlvbiBoZXhfdG9fYXNjaWkoc3RyMSkgewogICAgICAgIHZhciBoZXggPSBzdHIxLnRvU3RyaW5nKCk7CiAgICAgIC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Z051bWJlcih4KTsKICAgICAgICAgICAgeCA9IHZhbHVlLnRvU3RyaW5nKDEwKTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIHg7CiAgICB9ICAgICAKICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkgewogICAgICAgCiAgICB9LCAwKTsKCiAgICBmdW5jdGlvbiBnZXRQYXJhbWV0ZXJCeU5hbWUobmFtZSkgewogICAgICAgICAgICB2YXIgdXJsID0gd2luZG93LmxvY2F0aW9uLmhyZWY7CiAgICAgICAgICAgIG5hbWUgPSBuYW1lLnJlcGxhY2UoL1tcW1xdXS9nLCAiXFwkJiIpOwogICAgICAgICAgICB2YXIgcmVnZXggPSBuZXcgUmVnRXhwKCJbPyZdIiArIG5hbWUgKyAiKD0oW14mI10qKXwmfCN8JCkiKSwKICAgICAgICAgICAgICAgIHJlc3VsdHMgPSByZWdleC5leGVjKHVybCk7CiAgICAgICAgICAgIGlmICghcmVzdWx0cykgcmV0dXJuIG51bGw7CiAgICAgICAgICAgIGlmICghcmVzdWx0c1syXSkgcmV0dXJuICcnOwogICAgICAgICAgICByZXR1cm4gZGVjb2RlVVJJQ29tcG9uZW50KHJlc3VsdHNbMl0ucmVwbGFjZSgvXCsvZywgIiAiKSk7CiAgICB9CgogICAgICQoZG9jdW1lbnQpLnJlYWR5KGZ1bmN0aW9uICgpIHsKICAgICAgICAkKHdpbmRvdykua2V5ZG93bihmdW5jdGlvbiAoZXZlbnQpIHsKICAgICAgICAgICAgaWYgKGV2ZW50LmtleUNvZGUgPT0gMTMpIHsKICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7CiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgIH0KICAgICAgICB9KTsKICAgIH0pOwo8L3NjcmlwdD4KPC9odG1sPgo=
You can test!
 8)
« Last Edit: April 06, 2019, 10:44:37 PM by bomj »
Logged

bomj

  • Newbie
  • *
  • Karma: +1/-0
  • Offline Offline
  • Posts: 28
Re: Your Private Messenger in 10 minutes!
« Reply #2 on: November 17, 2018, 10:19:21 PM »

Main Network Contract:
0xa1F728aaC21373f83Ea5A6f32f0c1Bd5A16e00d8

Byte Code:

Code: [Select]
60c0604052601f60808190527f57656c636f6d6520746f207468652050726f6a65637420307862742e6e65740060a090815261003e9160009190610051565b5034801561004b57600080fd5b506100ec565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061009257805160ff19168380011785556100bf565b828001600101855582156100bf579182015b828111156100bf5782518255916020019190600101906100a4565b506100cb9291506100cf565b5090565b6100e991905b808211156100cb57600081556001016100d5565b90565b6102a7806100fb6000396000f30060806040526004361061004b5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416638c6838ba8114610050578063c38caab5146100da575b600080fd5b34801561005c57600080fd5b50610065610135565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561009f578181015183820152602001610087565b50505050905090810190601f1680156100cc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156100e657600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101339436949293602493928401919081908401838280828437509497506101cc9650505050505050565b005b60008054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156101c15780601f10610196576101008083540402835291602001916101c1565b820191906000526020600020905b8154815290600101906020018083116101a457829003601f168201915b505050505090505b90565b80516101df9060009060208401906101e3565b5050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061022457805160ff1916838001178555610251565b82800160010185558215610251579182015b82811115610251578251825591602001919060010190610236565b5061025d929150610261565b5090565b6101c991905b8082111561025d57600081556001016102675600a165627a7a723058207438efa656d0e76360a951173b8dfc0766e7c49267e7335ebcd0438f7f68545d0029
« Last Edit: November 18, 2018, 09:58:59 AM by bomj »
Logged

bomj

  • Newbie
  • *
  • Karma: +1/-0
  • Offline Offline
  • Posts: 28
Re: Your Private Messenger in 10 minutes!
« Reply #3 on: November 17, 2018, 11:47:16 PM »

Video Manual
Contract: 0xc0559f4b79A5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gICAgICBwYXJlbnQucmVzaXplSWZyYW1lKG9iaiwgMCk7CgogICAgICAgCiAgICB9KTsKICAgCiAgICBmdW5jdGlvbiBnZXRjb250cmFjdGFiaShjb250cmFjdGFkZHJlc3MpIHsKICAgICAgICAKICAgICAgICAgICAgJC5wb3N0KCJodHRwczovL1JpbmtlYnkuZXRoZXJzY2FuLmlvL2FwaSIsCiAgICAgICAgCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgbW9kdWxlOiAiY29udHJhY3QiLAogICAgICAgICAgICAgICAgICAgIGFjdGlvbjogImdldGFiaXQiLAogICAgICAgICAgICAgICAgICAgIGFkZHJlc3M6IGNvbnRyYWN0YWRkcmVzcwogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChkYXRhLCBzdGF0dXMpIHsKICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygiY29udHJhY3RBYmkgPSAiICsgZGF0YSkKICAgICAgICAgICAgICAgIH0pOwogICAgfQoKICAgIHZhciBXZWIzID0gcmVxdWlyZSgnd2ViMycpOwogICAgCiAgICB2YXIgd2ViMyA9IG5ldyBXZWIzKG5ldyBXZWIzLnByb3ZpZGVycy5IdHRwUHJvdmlkZXIoImh0dHBzOi8vcmlua2VieS5pbmZ1cmEuaW8vdjMvODBmMWMwMDM0NTIxNGRhNGJkYmM0ZDAyZjM1ZmIyNjUiKSk7CiAgICAKICAgIHZhciB2ZXJzaW9uID0gd2ViMy52ZXJzaW9uLmFwaTsKICAgIGNvbnNvbGUubG9nKHZlcnNpb24pOyAKICAgIHZhciBNeUNvbnRyYWN0OwogICAgdmFyIG15Q29udHJhY3RJbnN0YW5jZTsKICAgIHRyeSB7CiAgICAgICAgTXlDb250cmFjdCA9IHdlYjMuZXRoLmNvbnRyYWN0KFt7ImNvbnN0YW50Ijp0cnVlLCJpbnB1dHMiOltdLCJuYW1lIjoiZ2V0UG9zdCIsIm91dHB1dHMiOlt7Im5hbWUiO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gICAKICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBlbG1zLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICBpZiAoaSA9PSAwKSB7CiAgICAgICAgICAgICAgICAgICAgc3RycGFyYXMgPSAiJyIgKyBhZGQweGZvckFkZHJlc3MoRXNjYXBlKGVsbXNbaV0udmFsdWUpKSArICInIgogICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBzdHJwYXJhcyA9IHN0cnBhcmFzICsgIiwnIiArIEVzY2FwZShlbG1zW2ldLnZhbHVlKSArICInIgogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKGVsbXNbaV0udmFsdWUgPT0gJycpIHsKICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZChzdHJJbnB1dEVsZW1lbnROYW1lKS5mb2N1cygpOyAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICBhbGVydCgnSW5wdXQgdmFsdWUgY2Fubm90IGJlIGVtcHR5Jyk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHNob3dMb2FkaW5nKHRydWUsIHN0ckJ0bk5hbWUpOwoKICAgICAgICAgICAgbmV3IEZ1bmN0aW9uKGZ1bmN0aW9uTmFtZXRvQ2FsbCArICIoIiArIHN0cnBhcmFzICsgIiwgZnVuY3Rpb24oZXJyLCByZXMpeyBpZiAoZXJyKSB7cmVzdWx0ID0gZXJyO30gZWxzZSB7IHJlc3VsdCA9IHJlczsgfSBzaG93TWVzc2FnZSgnIiArIHN0ck1ldGhvZE5hbWUgKyInLHJlc3VsdCwnIiArIHN0ck91dHB1dEVsZW1lbnROYW1lKyInLCciICsgc3RyT3V0cHV0RmllbGROYW1lcyArIicsJyIrIHN0ckJ0bk5hbWUgKyInKTsgICB9KTsiKSgpOwoKICAgICA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AgIHJldHVybiBzdHJBbnN3ZXI7CiAgICB9CgogICAgZnVuY3Rpb24gaHRtbEVuY29kZSh2YWx1ZSkgewogICAgICAgIHJldHVybiAkKCc8ZGl2Lz4nKS50ZXh0KHZhbHVlKS5odG1sKCk7CiAgICB9CiAgICBmdW5jdGlvbiByZXBsYWNlQWxsKHN0ciwgZmluZCwgcmVwbGFjZSkgewogICAgICAgIHJldHVybiBzdHIucmVwbGFjZShuZXcgUmVnRXhwKGZpbmQsICdnJyksIHJlcGxhY2UpOwogICAgfQogICAgZnVuY3Rpb24gZm9ybWF0cmVzdWx0KHN0clJlc3VsdCwgcmVzdWx0dHlwZSkgewogICAgICAgIGlmIChyZXN1bHR0eXBlLnN0YXJ0c1dpdGgoJ3VpbnQnKSkgewogICAgICAgICAgICByZXR1cm4gdG9GaXhlZChzdHJSZXN1bHQpOwogICAgICAgIH0gZWxzZSBpZiAocmVzdWx0dHlwZSA9PSAnc3RyaW5nJykgewogICAgICAgICAgICByZXR1cm4gaHRtbEVuY29kZShzdHJSZXN1bHQpOwogICAgICAgICAgICAvL3JldHVybiBoZXhfdG9fYXNjaWkoc3RyUmVzdWx0KTsKICAgICAgICB9IGVsc2UgaWYgKHJlc3VsdHR5cGUgPT0gJ2FkZHJlc3MnKSB7CiAgICAgICAgICAgIGlmIChzdHJSZXN1bHQgIT0gJzB4MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMCcpIHsKICAgICAgICAgICAgICAgIHJldHVybiAiPGEgaHJlZj0nL2FkZHJlc3MvIiArIHN0clJlc3VsdCArICInIHRhcmdldD0nX2JsYW5rJz4iICsgc3RyUmVzdWx0ICsgIjwvYT4iOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgcmV0dXJuIGh0bWxFbmNvZGUoc3RyUmVzdWx0KTsKICAgICAgICAgICAgfQogICAgICAgICAgICAvL30gZWxzZSBpZiAocmVzdWx0dHlwZSA9PSAnYm9vbCcpI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iBzdHJhZGRyZXNzLmxlbmd0aCA9PSA0MCkgewogICAgICAgICAgICBzdHJhZGRyZXNzID0gIjB4IiArIHN0cmFkZHJlc3M7CiAgICAgICAgfQogICAgICAgIHJldHVybiBzdHJhZGRyZXNzOwogICAgfQogICAgZnVuY3Rpb24gdG9GaXhlZCh4KSB7CiAgICAgICAgaWYgKHguaW5kZXhPZigiZSsiKSAhPT0gLTEpIHsKICAgICAgICAgICAgdmFyIHZhbHVlID0gd2ViMy50b0JpZ051bWJlcih4KTsKICAgICAgICAgICAgeCA9IHZhbHVlLnRvU3RyaW5nKDEwKTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIHg7CiAgICB9ICAgICAKICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkgewogICAgICAgCiAgICB9LCAwKTsKCiAgICBmdW5jdGlvbiBnZXRQYXJhbWV0ZXJCeU5hbWUobmFtZSkgewogICAgICAgICAgICB2YXIgdXJsID0gd2luZG93LmxvY2F0aW9uLmhyZWY7CiAgICAgICAgICAgIG5hbWUgPSBuYW1lLnJlcGxhY2UoL1tcW1xdXS9nLCAiXFwkJiIpOwogICAgICAgICAgICB2YXIgcmVnZXggPSBuZXcgUmVnRXhwKCJbPyZdIiArIG5hbWUgKyAiKD0oW14mI10qKXwmfCN8JCkiKSwKICAgICAgICAgICAgICAgIHJlc3VsdHMgPSByZWdleC5leGVjKHVybCk7CiAgICAgICAgICAgIGlmICghcmVzdWx0cykgcmV0dXJuIG51bGw7CiAgICAgICAgICAgIGlmICghcmVzdWx0c1syXSkgcmV0dXJuICcnOwogICAgICAgICAgICByZXR1cm4gZGVjb2RlVVJJQ29tcG9uZW50KHJlc3VsdHNbMl0ucmVwbGFjZSgvXCsvZywgIiAiKSk7CiAgICB9CgogICAgICQoZG9jdW1lbnQpLnJlYWR5KGZ1bmN0aW9uICgpIHsKICAgICAgICAkKHdpbmRvdykua2V5ZG93bihmdW5jdGlvbiAoZXZlbnQpIHsKICAgICAgICAgICAgaWYgKGV2ZW50LmtleUNvZGUgPT0gMTMpIHsKICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7CiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgIH0KICAgICAgICB9KTsKICAgIH0pOwo8L3NjcmlwdD4KPC9odG1sPgo=
« Last Edit: April 06, 2019, 10:52:17 PM by bomj »
Logged

bomj

  • Newbie
  • *
  • Karma: +1/-0
  • Offline Offline
  • Posts: 28
Re: Your Private Messenger in 10 minutes!
« Reply #4 on: November 25, 2018, 01:20:53 AM »

Reduce code of the messenger.
Quote
<....>
2. In this messenger code, change the contract 0xae4243e2c0f910223323dd2f2fdd16820b69f1d6
- insert your contract in lines 31 and 70(39 and 90)
<....>

New code:
Code: [Select]
<html>
<head>
<meta charset="utf-8">
<title>BigBalls :)</title>
<link rel="shortcut icon" href="https://wall.0xbt.net/assets/images/m1-120x120.png" type="image/x-icon">
<script src="https://rinkeby.etherscan.io/cdn-cgi/apps/head/4wF8T_csPHk5U5Lb4Ye_MOdzMxk.js"></script>
<link rel='stylesheet' type='text/css' href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,600&amp;subset=cyrillic,latin'>
<script type="text/javascript" src="https://rinkeby.etherscan.io/jss/web3.min.js?v=0.20.6"></script>
<script type="text/javascript" src="https://rinkeby.etherscan.io/jss/bignumber.js"></script>
<style>
    a {
    text-decoration: none; /* Отменяем подчеркивание у ссылки */
    }
button.knopka {
color: #fff;
background: #828282;
padding: 5px;
border-radius: 5px;
border: 2px solid #teal;
}
button.knopka:hover {
background: #000;
}
</style>

</head>
<body style="background-color:#2E2E2E">
<table border = "15" width ="100%" cellpadding = "5" cellspacing ="15" bordercolor="#2E2E2E" bgcolor=""><tr><td>
<!--<div class="row" style="padding-top:54px;">-->
<div class="col-md-12">
<div class="row">

</div>
</div>
<!--</div>-->

<center>
<h4><span style="color:teal"><b>Rinkeby TestNet</b></span></h4><br>
<button class="knopka" id='btn_5'><a href="https://rinkeby.etherscan.io/writecontract/index.html?a=0xc0559f4b79A5eaEb210d216b4C81c3Ea800ce6B5&n=rinkeby" title="section - '4. setPost'" target="_blank"><b><span style="color:white;">Send <i class="fa fa-btc"></i> News</span></b></a></button>
<button type='button' id='btn_5' class="knopka" onclick="ethcall2('getPost', 'input_5','myanswer_5','string', '|string', 'btn_5');">Get <i class="fa fa-btc"></i> News</button>
<div align="left"><b><span id='myanswer_5' style="color:teal"></span></b></div><br><br>
</center>
</body></td></tr></table>
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
<script>
    var web3 = new Web3(new Web3.providers.HttpProvider("https://rinkeby.infura.io/v3/80f1c00345214da4bdbc4d02f35fb265"));
   
    var version = web3.version.api;
    console.log(version);
    var MyContract;
    var myContractInstance;
    try {
        MyContract = web3.eth.contract([{"constant":true,"inputs":[],"name":"getPost","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newPost","type":"string"}],"name":"setPost","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]);
        myContractInstance = MyContract.at("0xc0559f4b79A5eaEb210d216b4C81c3Ea800ce6B5");
    }
    catch (err) {
        console.log(err.message);
    }   

</script>
<script type="text/javascript" src="https://wall.0xbt.net/r4.js"></script>
</html>

change the contract 0xae4243e2c0f910223323dd2f2fdd16820b69f1d6
- insert your contract in line 54.

Messenger Code:
Code: [Select]
data:text/html;base64,PGh0bWw+CjxoZWFkPgo8bWV0YSBjaGFyc2V0PSJ1dGYtOCI+Cjx0aXRsZT5CaWdCYWxscyA6KTwvdGl0bGU+CjxsaW5rIHJlbD0ic2hvcnRjdXQgaWNvbiIgaHJlZj0iaHR0cHM6Ly93YWxsLjB4YnQubmV0L2Fzc2V0cy9pbWFnZXMvbTEtMTIweDEyMC5wbmciIHR5cGU9ImltYWdlL3gtaWNvbiI+CjxzY3JpcHQgc3JjPSJodHRwczovL3JpbmtlYnkuZXRoZXJzY2FuLmlvL2Nkbi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FFYjIxMGQyMTZiNEM4MWMzRWE4MDBjZTZCNSIpOwogICAgfQogICAgY2F0Y2ggKGVycikgewogICAgICAgIGNvbnNvbGUubG9nKGVyci5tZXNzYWdlKTsKICAgIH0gICAgCgo8L3NjcmlwdD4KPHNjcmlwdCB0eXBlPSJ0ZXh0L2phdmFzY3JpcHQiIHNyYz0iaHR0cHM6Ly93YWxsLjB4YnQubmV0L3I0LmpzIj48L3NjcmlwdD4KPC9odG1sPgo=
Create a short link, use the video manual: https://youtu.be/je6-YgdHlNw
and link shortening service: https://ca.0xbt.net

Result: https://ca.0xbt.net/mbm
« Last Edit: April 06, 2019, 11:28:42 PM by bomj »
Logged