Bitcoin Forum
May 13, 2024, 04:13:06 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1] 2 3 4 5 6 7 8 9 »
1  Other / Off-topic / Do you still believe in bitcoin on: January 14, 2016, 01:49:28 AM
I joined up over here in 2012-13. At the time it seemed like a way to make a quick buck. Overtime as i read about it more and more, i became interested in the freedom it provides. As time has went on however, my interest and belief in bitcoin have waned. I won't get into the details of why, but i'm wondering what your honest opinion of bitcoin is, with a simple vote, and possibly an explanation.
2  Other / Meta / Credibility Feedback Attack: on: April 30, 2015, 10:14:18 PM
Michael65 is a malicious user. He has scammed under several accounts. He finds himself at odds with the trusted member titsmoker89, who has caught him in a scam an negative trusted one of his main accounts. He hatches a plan, and painstakingly carries it out over the next several months.

First he starts by picking 10 of his sock puppets. All registered on different days at different time periods, to throw off the scent of any potential investigations.

He starts executing deals with titsmoker89, and exchanging feedback with titsmoker. Now he executes his plan by scamming or attempting to scam with these sockpuppets and subsequently his sockpuppets are all tagged for scamming.


Now titsmoker89 through no fault of his own is associated with scammers, having received many positive feedback from these scammers, which might make titsmoker89 appear to be associated with scamming, causing users to lose trust in him.

What can we do to resolve situations like this?
3  Bitcoin / Bitcoin Discussion / IDEA: Transaction forwarding on: April 20, 2015, 03:25:24 PM
I was thinking about a common problem we have with transaction/wallet bloat. One of the main problems with swapping out wallets in an exchange environment is the risk that a customer will deposit to an old address and then cause a big shit fit about it on social media.

So i had a small idea. Not sure if its been proposed before, but i thought i would mention it.

I would love to see a scheme implemented whereby you could setup transaction forwarding, by destroying the address and replacing it with the address to forward to, so all transactions to the old address would be forwarded to the new address.


A2A's:

1. Is it even technically possible?

2. Is it a bad idea?

3. What could be some possible problems with this idea?

4. Is it a security vulnerability?

5. could this be encoded in a transaction somehow?
4  Other / Meta / TradeFortress(aka $username): Trust Abuse on: April 16, 2015, 03:17:00 AM
copy and pasted a feedback i sent, added a sentence to make it appear as if it was about me and posted it on my profile

the sent feedback posted by me on ekrem's trust profile:



tradefortress's feedback posted on my profile:




User drippx also did the same thing, copying a feedback i left on his profile and then pasting it back on mine:



5  Alternate cryptocurrencies / Altcoin Discussion / Could Dash realistically compete with bitcoin on: April 15, 2015, 01:37:14 PM
https://www.cryptocoinsnews.com/evan-duffield-dash-darkcoin-dash-will-position-direct-competitor-bitcoin/

The creator thinks it can
6  Bitcoin / Bitcoin Technical Support / Bitcoin overheats and crashes my computer on: March 25, 2015, 11:53:25 AM
I think its safe to say that this model is unsustainable on consumer grade hardware. This is now the 10th time in 3 months ive had to complete resynch the chain. My computer doesn't have sufficient cooling to keep from overheating, and bitcoin happily overheats it in about 30 minutes. this only happens during syncing. any other time, bitcoin is fine if the wallet is already synced. also, i left it running overnight to resync after the crash. its been frozen on block 316268 since i got up, 2 hours ago. restarting the client does no good. still stuck.
7  Alternate cryptocurrencies / Service Discussion (Altcoins) / [Self Moderated] OpenEx repayments on: October 17, 2014, 07:45:10 PM
This thread will be used to log repayments to openex creditors or investors.


Users with BITCOIN ONLY stuck on the exchange
- To get on the list, you need to email me your confirmation code and/or amount to my email address. the email must come from the email you used at OpenEx. if you are unable to meet any of these parameters, instead you may send me an email detailing the problem and your story. i will work with you to confirm your claim and if it all checks out, you go on the list.

Users with ALTCOINS stuck on the exchange
- To get on the list, you need to email me your username @ openex from the email you registered with. i will check your account and notify you of your holding at the date of the exchanges close. it would be easiest for me to pay you in btc, but if you want paid in your currency of choice, some delays and tx fee's may apply.
Investors
- Pm me a btc address to receive your payments.

Investors

21 cassie heart  Transaction ID: 18bd66104a7053ffff4b269239a96bf0f82dbe3333e456f848dc4852f712738f
2 shakezula Transaction ID: 7e6016ddbcf8618cafb8e30f14e93a1f478b3e92df85a7aa9c60b36ce1432341
5 aldrin Transaction ID: 0a092cdce16178588593ca77ed6fc163559f5a45364e98ce067a506526c64083
2 verloren TXid: c9ae8cbcc081d07250f91df22b7d0aed6cba5983a35651ed8164844722a22b03
2 number6 Transaction ID: c7ae9802053a334811f0351a2cc699832568acc02c539920e731b1ebd04609ac
20 slavo https://blockchain.info/tx/e73c759154172422d2d5fbf0eaf15d1898a01d786c87a75acf551881cb414460
2 newflesh https://blockchain.info/address/1AtgocBpBKCsTV4zejmAmKty3CCtU69VJj
2 koontas(lajz99) https://blockchain.info/tx/9d1a0d2ec7b5e6125f02f9e6c9028329da8098325acadc9f8635194a53bc7d7e
3 Krichwins Transaction ID: 1b661de2852657055892e5f330b2d7dc5865b9d4d65e3c60c455c1f648cec457
20 jpmi1 https://blockchain.info/address/17t67dLuCibReLXPQ2BG428gs6nHcok2wT
40 wtman Transaction ID: 0cc0186c51e25a7db066855c4d368c5cc55cf5984b2215dddd1045da9ea4e4af
16 Lboss Transaction ID: b8e190c27f2f0fee3695ef41fee6c597867873f554a8e7f78d24ec28926810fa
21 slavo  Trx ID: https://blockchain.info/tx/deead4a499fe143a1c8bba18f8bc8e42321c23a742f9d4dbb89043dcfe5a31c8
80 wtman  Tx ID: https://blockchain.info/tx/e14b06c4c2563f9263c7f0b5c40a15703180c6afb4248dd87c93e7ff3d2007ec
40 wtman Transaction ID: d9a9e6d7b83f57d0bff63632a190d04f1e89989226fc49ee4b39a1455e60343e



to email me use the following

admin@openex.pw

stuckinabox@live.com

paying
wtman
jpmi1
slavo
Ajeje38
Lboss


NameDebtPaidRemain
wtman4.883.12
jpmi1.5.38.12
Lboss.4.25.15
slavo1.025.405.62
Ajeje38 .539685.369685.15





paid in full
cassieheart -- dev work
number6     -- .05 btc
newflesh     -- .05 btc
lajz99         -- .05 btc
Krichwins    -- .075 btc
shakezula   -- .05 btc
verloren    -- .05 btc
Gerrit       -- .09741742 btc
sacskate   -- 0.055 btc
aldrin       -- .125 btc



Don't remember if you invested in OpenEx? no problem, here's the fee share thread.
https://bitcointalk.org/index.php?topic=344084.0
8  Economy / Service Discussion / coinbase lies on: October 14, 2014, 03:51:29 PM
they trade with your shit while they claim "ACH is pending".

7 days for an ACH transfer? takes 3 business days at most.



so lets confront  coinbase about it, here is the company line. hmm..



then lying about columbus day.



coinbase, real winners aren't they?
9  Economy / Services / Chunk host $5 VPS Double Ram for life on: October 04, 2014, 01:13:45 PM
Hi, Chunkhost is now running a special where you can receive double ram for life on a $5 vps. They are vastly superior to digital ocean in performance and availability. Your chunk will never be bogged down by other vps consuming to many resources like at digital ocean.

1gb ram, 4 cores, 20 gb ssd storage for 5 bucks a month.

If you want you can use my referal link to sign up(I would appreciate it. if not, you can use the normal link) and i will receive a bonus for every 50 dollars you spend.

Non Referral Link
https://chunkhost.com/
10  Economy / Auctions / [WTS] qwikdice.com on: September 07, 2014, 05:43:19 PM
start the bidding at $20.

include ssl certificate if it is able to transfer

any takers?
11  Economy / Service Discussion / In your opinion, what is the best Bitcoin Gambling website on: September 07, 2014, 02:16:42 AM
I would like a rundown of the best gambling sites. I've played a few, and some of them are pretty good, but i'm looking to spread out a bit more and try some other things. what sites do you recommend?
12  Alternate cryptocurrencies / Altcoin Discussion / Congratulations Scammers, you've killed the altcoin market on: August 18, 2014, 03:37:20 PM
Alt coin market has now dropped below 200 million USD. Discuss.
13  Alternate cryptocurrencies / Altcoin Discussion / [POLL & Discussion] Recent Decline in the Alt Coin Market on: July 08, 2014, 06:11:49 PM
Day by day.
Hour by hour.
Minute by minute.

Your altcoin portfolio is losing its value.

It's lurking in the shadows like a 30 foot elephant and no one wants to address. Seemingly, it would appear that the growth in february and mark was a fluke, and the altcoin market appears to be in a rapid decline once more, despite bitcoin relative stability around 620. So it begs the questions:


Is crypto dying?

Is the AltCoin Market dying?

It looks as if now, more than ever Older alts are continuing to fall while the turnover rate of pump and dumps is steadily increasing. These days, coins pump and dump within as little as a week before going into a gradual, predictable, and steady decline. Correct me if i'm wrong, but it sure looks like the Altcoin Market is dying. I've talked with many others who are pulling their assets out into BTC to wait out the panic that will surely ensue as the decline creates a snowball effect of panic dumps.

Thoughts?
14  Economy / Services / Coin creation 0.1 btc a pop on: July 02, 2014, 05:20:08 AM
You provide logos, name and specifications. 0.1 btc is the minimum rate. extra features means extra money. i can crank them out in as little as 24 hours, with windows installer package and github included.

to apply, simply post in this thread the word "bump" then send me a pm with your inquiry.
15  Alternate cryptocurrencies / Altcoin Discussion / [Theoretical]The Short-Circuit 51% attack vulnerability in non Sha256 altcoins. on: June 29, 2014, 01:35:17 AM
preamble

What is proof of work, and why should i care?

From the bitcoin wiki:

For a block to be valid it must hash to a value less than the current target; this means that each block indicates that work has been done generating it. Each block contains the hash of the preceding block, thus each block has a chain of blocks that together contain a large amount of work. Changing a block (which can only be done by making a new block containing the same predecessor) requires regenerating all successors and redoing the work they contain. This protects the block chain from tampering.

The most widely used proof-of-work scheme is SHA-256, which was introduced by Bitcoin. Some other hashing algorithms that are used for proof-of-work include scrypt, Blake-256, CryptoNight,[1] HEFTY1, Quark, SHA-3, scrypt-jane, scrypt-n, and combinations.

The reality:

the checksum method only validates that a block  is a valid sha256 hash less than or equal to  the target described in the equation. this means, that at the hashing level there are nothing to verify how a hash was produced, only that it confirms all previous work and contains valid transaction data, satisfying the "Proof of Work" concept.

What does this mean for altcoins?

Typically, altcoins rely on hashing blocks using a different algorithm, then converting the hashed block to a sha256 unsigned integer.

This means that an attacker only has to have enough Sha-256 asics to account for 51% or more of the network hashrate and a modified client designed to hash with sha256 instead of all of these algorithm's that have been piggy backed on top of sha256.

What about chained hashing?

Chained hashing provides only the illusion of security, or security through obscurity as we like to call it. this collection of algorithms:

Here's a case study:

Logicoin:

https://github.com/Logicoin/logicoin/blob/master/src/hash.h

now, lets look at bitcoin:

https://github.com/bitcoin/bitcoin/blob/master/src/hash.h


As you can see, these alternative hashing implementations are reliant on conversion back to uint256 then hashed as sha256, meaning that the entire hashing process can simply be shortcircuited back to sha256, bypassing these algorithms entirely, making the coin mineable by sha256 asics.

Additionally, the flaws with chained hashing algorithm's do not stop here. With WildKeccak derivates such as Boolberry and JackpotCoin, it is possible to short circuit the internal switch statements that chooses which hash to use in a given round. An attacker could modify his client to use the weakest, fastest hash every round, producing a clear advantage for his miners.

Additionally, this exposes a flaw in every coin other than bitcoin, and there in also reiterates the true strength of bitcoin, which relies solely on the strength of the sha256 algorithm and the proof of work concept to secure the blockchain. If you are looking for innovation in altcoins, it simply doesn't exist in a true form to date.

Conclusion

How can this issue be addressed?
Through mathematics, plain and simple. If you want to add additional hashing algorithms to bitcoin, you need to modify proof of work with additional checksum algorithms to confirm a given hash satisfies the specifications of your hashing algorithm. With chained hashing, you want to make a requirement that will show the block was hashed in a specific order. adding this data to the block defeats the purpose and a method of bypassing this will be discovered relatively easily. Instead, you might want to follow the approach of the BCRYPT hashing algorithm, which appends data to the beggining and end of a hash, offering information as to how the hash was produced.

One might be able to determine an algorithm for appending a secret to the end of the hash, and number for each round of hashing to the beginning.

say we have four rounds of hashing well to illustrate my point this is what our block hashing method might look like.

step1:

input -> 0xfe 0xdd 0xbe 0xfd //some random data
secret[0]-> //some random data computed from our input
hash-> create a hash from secret and input

result:

secret[0].hash.input  //our result hash string would

at the end of 4 rounds our hash would look like

secret[3].secret[2].secret[1].secret[0].hash / input

in this example, we can easily prove all subsequent steps in the chained hashing algorithm originated from the original input, while making it difficult to replicate without performing the entirety of the work.

Again mathematics, plain and simple.


is the claim so outrageous. what does checkProofOfWork do exactly?

i'll comment it for you so you understand.

Code:
bool CheckProofOfWork(uint256 hash, unsigned int nBits)
{
    CBigNum bnTarget;
    bnTarget.SetCompact(nBits);

    // Check range
    if (bnTarget <= 0 || bnTarget > bnProofOfWorkLimit) // if Target <= 0 OR target > limit
        return error("CheckProofOfWork() : nBits below minimum work");

    // Check proof of work matches claimed amount
    if (hash > bnTarget.getuint256())  //if hash > Target
        return error("CheckProofOfWork() : hash doesn't match nBits");


    return true;//it passed the test, it must be valid.
}
https://github.com/Logicoin/logicoin/blob/master/src/main.cpp  line 1420


now, for CheckWork:

Code:
bool CheckWork(CBlock* pblock, CWallet& wallet, CReserveKey& reservekey)
{
    uint256 hash = pblock->GetPoWHash(); //get the block hash, which is obviously sha256


    uint256 hashTarget = CBigNum().SetCompact(pblock->nBits).getuint256();

    if (hash > hashTarget)
        return false;

    //// debug print
    printf("LogiCoinMiner:\n");
    printf("proof-of-work found  \n  hash: %s  \ntarget: %s\n", hash.GetHex().c_str(), hashTarget.GetHex().c_str());
    pblock->print();
    printf("generated %s\n", FormatMoney(pblock->vtx[0].vout[0].nValue).c_str());

    // Found a solution
    {
        LOCK(cs_main);
        if (pblock->hashPrevBlock != hashBestChain)
            return error("LogiCoinMiner : generated block is stale");

        // Remove key from key pool
        reservekey.KeepKey();

        // Track how many getdata requests this block gets
        {
            LOCK(wallet.cs_wallet);
            wallet.mapRequestCount[pblock->GetHash()] = 0;
        }

        // Process this block the same as if we had received it from another node
        CValidationState state;
        if (!ProcessBlock(state, NULL, pblock))
            return error("LogiCoinMiner : ProcessBlock, block not accepted");
    }

    return true;
}

The hashings itself may occur in other algorithms, but the checks are only ran on sha256 hashes, which was my point all along. if the sha256 hash satisfies the target it doesn't matter whether the extra hashing ever occured.

I'm having trouble understanding what the argument against my theory is? is it that short circuiting can't possibly produce a valid hash without all the extra hashing? i don't believe that to be true.
16  Economy / Services / PHP/CSS/Jquery developer Looking for work. on: June 25, 2014, 02:01:58 AM
Hi, you may know me from my time spent working on OpenEx. You may also remember that the product i delivered was subpar and very unacceptable. As a result of the closure of the exchange, i now owe about 10,000 dollars at the time of investment worth of bitcoin to 20 or so investors. I have been working very hard for the last 3 months improving my skills, and i am close to being able to relaunch OpenEx.

I will display a small showcase of my skills here, as well as a link to my stackoverflow profile. I am looking for small jobs in php, jquery, or css/html so that i can begin working on paying off the investors who got the brunt of the demise of OpenEx. I feel very responsible for this. If you are willing at all to give me a shot, even on a trial basis i will work very hard for you and or your company.

I have grown familiar with two sets of front end developer frameworks:
Bootstrap and Ink Interface Kit(http://ink.sapo.pt)

my stackoverflow profile
http://stackoverflow.com/users/2401804/r3wt

live demo of OpenEx current version
https://openex.info

Here's a few code snippets and/or live examples of sites i am actively developing.


An ajax Profile Picture and Profile Information Update. (jquery,php,ink ui kit)

jquery
Code:
//the profile fields form
$('#profile-up').submit(function() {
var queryString = $(this).formSerialize();
$.post('./ajax/private/?do=profileupdate', queryString, function(data){
var d = JSON.parse(data);
for(var i = 0; i < d.length; i++)
{
if(d[i].type == 'success')
{
$('#'+d[i].message+'').val(d[i].update);
notify('Your '+d[i].message+' was succesfully updated','false');
}
if(d[i].type == 'error')
{
notify(d[i].message,'true');
}
}
});
return false;
});


//the image form
$("#image-up").submit(function(){
$('#loading').show();
$('#overlay').show();
$.ajax({
url: "./upload.php",
type: "POST",
data:  new FormData(this),
contentType: false,
cache: false,
processData:false,
success: function(data){
var d = JSON.parse(data);
console.log(d);
for(var i = 0; i < d.length; i++)
{
if(d[i].type == 'error')
{
notify(d[i].message,"true");
}
if(d[i].type == 'success')
{
notify(d[i].message,"true");
$('#profile-pic').attr('src','http://website.com/uploads/'+d[i].update+'');
}
}
},
error: function(){
}        
});
$('#overlay').hide();
$('#loading').hide();
return false;
});

//pre upload file tests using html5 file api.
function beforeSubmit() {
if (window.File && window.FileReader && window.FileList && window.Blob)
{
if( !$('#image-input').val())
{
notify("Please select a file to continue",'true');//notify is just a wrapper function to jGrowl.
return false;
}  
var fsize = $('#image-input')[0].files[0].size; //get file size
var ftype = $('#image-input')[0].files[0].type; // get file type
switch(ftype)
{
case 'image/png': case 'image/gif': case 'image/jpeg':
break;
default:
notify("Unsupported File Type",'true');
return false;
}
var mbyte = 1048576;
if(fsize> mbyte)
{
notify("Image is too large. Maximum upload size is 1 Mb.","true");
return false;
}
}else{
//the browser doesn't support the html5 api, but we need to upload the image. we'll validate the file size and type serverside.
return return true;
}
return true;
}

HTML(Ink UI Kit), rendered from php view function

Code:
function profileView($profile)
{
global $loggedInUser,$cfg;
@$pub = security($_GET['pub-view']) or null;
if(!profileExists($profile))
{
jumpTo('/error/?t=418',0); die;
}else{
if($loggedInUser->profile_id == $profile && $pub == null)
{
echo
'
<center>
<h3>'. $loggedInUser->username .'\'s Profile</h3>
</center>
<hr>
<div class="column-group quarter-gutters">
<form action="" name="profile-up" id="profile-up" class="ink-form all-50 small-100 tiny-100">
<center>
<h5>
<div class="ink-dropdown push-left" data-target="#prof-options" id="prof-dropdown" style="display:inline-block;">
<button class="ink-button fa fa-cog"></button>
<ul id="prof-options" class="dropdown-menu hide-all">
<li class="heading">Settings</li>
<li class="separator-above"><a href="#">Privacy</a></li>
<li><a href="#">Change Password</a></li>
<li><a href="#">Channel Settings</a></li>
<li class="separator-above disabled"><a href="#">...</a></li>
</ul>
</div>
<script>
new Dropdown(\'#prof-dropdown\');
</script>
Your Profile Settings
</h5></center>
                    <fieldset>
                        <div class="control-group column-group quarter-gutters">
                            <label for="username" class="all-20 align-right">Username</label>
                            <div class="control all-80">
                                <input type="text" id="username" name="username" value="'. $loggedInUser->username .'">
                                <p class="tip">Subject to Admin approval</p>
                            </div>
</div>
                        <div class="control-group column-group quarter-gutters">
                            <label for="email" class="all-20 align-right">Email</label>
                            <div class="control all-80">
                                <input type="text" id="email" name="email" value="'. $loggedInUser->email .'">
<p class="tip">Change Your Email</p>
                            </div>
                        </div>
                        <div class="control-group column-group quarter-gutters">
                            <label for="caption" class="all-20 align-right">Caption</label>
                            <div  class="control all-80">
                                <textarea id="caption" name="caption">'. $loggedInUser->caption .'</textarea>
<p class="tip">Change your public profile description</p>
                            </div>
                        </div>
                        
<div class="control-group column-group quarter-gutters">
                            <label for="submit" class="all-20 align-right">&nbsp;</label>
                            <div  class="control all-80">
'.form_protect($loggedInUser->csrf_token).'
                                <input type="submit" value="Update" id="submit-form">
                            </div>
                        </div>
                    </fieldset>
                </form>

                <div class="all-50 small-100 tiny-100">
<center><h5>Your Profile Picture</h5>
                    <img id="profile-pic" src="/uploads/'. $loggedInUser->avatar .'" alt="" class="all-100 small-100 tiny-100 push-center">
<br/>
<form name="image-up" method="post" action="" enctype="multipart/form-data" id="image-up" class="ink-form all-100 small-100 tiny-100">
<div class="control-group column-group">
                            <div  class="control all-100">
                                <div class="input-file all-100">
                                    <input type="file" id="image-input" name="image-input" class="all-100" />
'.form_protect($loggedInUser->csrf_token).'
<input type="submit" value="Update" id="submit-file" class="all-25 ink-button" />
                                </div>
                            </div>
                        </div>
</form>
</center>
                </div>
            </div>
<hr>
';

}else{
$info = getProfile($profile);
$vids = getVideos($profile);
$foto = getPhotos($profile);
//to do: finish public profile view
}
}
}


Profile Field server side code for ajax request(PHP)

this function handles the ajax request, validates the request, and if the request is valid it returns a json encoded response.
Code:
if(isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
if(isUserLoggedIn() && $loggedInUser !== null && is_object($loggedInUser) !== false) {
#rate limiting#
$minute = 60;
$minute_limit = 100;
$last_ajax_request = $loggedInUser->last_ajax_request;
$last_ajax_diff = time() - $last_ajax_request; # in seconds
$minute_throttle = $loggedInUser->minute_throttle;
if (is_null($minute_limit)) {
$new_minute_throttle = 0;
}else{
$new_minute_throttle = $minute_throttle - $last_ajax_diff;
$new_minute_throttle = $new_minute_throttle < 0 ? 0 : $new_minute_throttle;
$new_minute_throttle += $minute / $minute_limit;
$minute_hits_remaining = floor(($minute - $new_minute_throttle ) * $minute_limit / $minute);
$minute_hits_remaining = $minute_hits_remaining >= 0 ? $minute_hits_remaining : 0;
}

if ($new_minute_throttle > $minute) {
$wait = ceil($new_minute_throttle - $minute);
$response = ['type'=>'error','message'=>'rate limit exceeded wait '.$wait.' seconds.'];
die(json_encode($response));//ajax rate limiting exceeded.
}
$loggedInUser->last_ajax_request = time();
$loggedInUser->minute_throttle   = $new_minute_throttle;
#end#

@$do   = security($_GET["do"]);
@$csrf = security($_POST["csrf_token"]);
if(isset($csrf))
{
if($loggedInUser->csrf_validate($csrf) === true)
{
if($do == 'profileupdate')
{
$response = updateProfile();
}
elseif($do == 'somethingelse')
{
//for other ajax methods to be added later.
}else{
$response = ['type'=>'error','message'=>'failed'];
}
if(isset($response) && !empty($response))
{
die(json_encode($response));
}else{
http_response_code(500);
die;
}
}else{
http_response_code(404);
die;
}
}else{
http_response_code(404);
die;
}
}else{
http_response_code(401);
die;
}
}else{
http_response_code(405);
die;
}

update profile function from above example

This function updates the user's session object($loggedInUser) and updates the database, but only if each field differs from the session object.
Code:
function updateProfile()
{
global $loggedInUser;
$response = [];
if($loggedInUser == null || isUserLoggedIn() === false)
{
$response[] = json_encode(['type'=>'error','message'=>'login']);
}else{
if(!empty($_POST))
{

$uid = $loggedInUser->user_id;
$uname = sanitize(trim($_POST["username"]));
$captn = sanitize($_POST["caption"]);//leave spaces in tact for caption.
$ename = sanitize(trim($_POST["email"]));
if(!empty($uname) && ($uname !== $loggedInUser->username))
{
if(!ctype_alnum($uname)){
$response[] = ['type'=>'error','message'=>lang("ACCOUNT_USER_INVALID_CHARACTERS")];
}else{
if(!usernameExists($uname))
{
if(updateUsername($uid,$uname))
{
$loggedInUser->username = $uname;
$response[] = ['type'=>'success','message'=>'username','update'=>security($uname)];
}else{
$response[] = ['type'=>'error','message'=>'an error occured. please try again.'];
}
}else{
$response[] = ['type'=>'error','message'=>'Username is taken. try again.'];
}
}
}
if((!empty($captn)) &&($captn !== $loggedInUser->caption))
{
if(updateCaption($uid,$captn))
{
$loggedInUser->caption = $captn;
$response[] = ['type'=>'success','message'=>'caption','update'=>$captn];
}else{
$response[] = ['type'=>'error','message'=>'an error occured. please try again.'];
}
}
if((!empty($ename)) && ($ename !== $loggedInUser->email))
{
if(!emailExists($ename))
{
if(updateEmail($ename))
{
$loggedInUser->email = $ename;
$response[] = ['type'=>'success','message'=>'email','update'=>security($ename)];
}
}
}
}else{
$response[] = ['type'=>'error','message'=>'empty'];
}
}
return $response;
}

Image upload processing script(PHP)

Code:
if(isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
if(isUserLoggedIn() === true && $loggedInUser !== null && is_object($loggedInUser) !== false) {
if(isset($_POST) && !empty($_POST))
{
$response = [];
@$csrf = security($_POST['csrf_token']);
if($loggedInUser->csrf_validate($csrf) === true)
{
if($_FILES)
{
$BigImageMaxSize        = 300; //Image Maximum height or width
//$maxheight = 200;
$DestinationDirectory   = 'uploads/'; //specify upload directory
$Quality                = 90; //jpeg quality
if(!isset($_FILES['image-input']) || !is_uploaded_file($_FILES['image-input']['tmp_name']))
{
$response[] = ['type'=>'error','message'=>'empty file upload'];
}else{
$RandomNumber   = rand(0, 9999999999);
$rand2 = rand(0, 999);
$ImageName      = $RandomNumber .'-'. md5(openssl_random_pseudo_bytes(4)) . '-da-' . $rand2 . time();
$ImageSize      = $_FILES['image-input']['size'];
$TempSrc        = $_FILES['image-input']['tmp_name'];
$ImageType      = $_FILES['image-input']['type'];
$mbyte          = 1048576;//1 megabyte
if( (int) $ImageSize > $mbyte)
{
die(json_encode(['type'=>'error','message'=>'F_SIZE_EXCEEDS']));//kill script and return json error response.
}
switch(strtolower($ImageType))
{
case 'image/png':
//Create a new image from file
$CreatedImage =  imagecreatefrompng($_FILES['image-input']['tmp_name']);
break;
case 'image/gif':
$CreatedImage =  imagecreatefromgif($_FILES['image-input']['tmp_name']);
break;          
case 'image/jpeg':
case 'image/pjpeg':
$CreatedImage = imagecreatefromjpeg($_FILES['image-input']['tmp_name']);
break;
default:
$response[] = ['type'=>'error','message'=>'unsupported file type']; //output error and exit
}
list($CurWidth,$CurHeight) = getimagesize($TempSrc);
if($CurWidth == null || $CurHeight == null)
{
die(json_encode(['type'=>'error','string'=>'418']));
}
$ImageExt = substr($_FILES['image-input']['name'], strrpos($_FILES['image-input']['name'], '.'));
$ImageExt = str_replace('.','',$ImageExt);
$NewImageName = $ImageName.'.'.$ImageExt;
$DestRandImageName = $DestinationDirectory.$NewImageName; // Image with destination directory
}
if(resizeImage($CurWidth,$CurHeight,$BigImageMaxSize,$DestRandImageName,$CreatedImage,$Quality,$ImageType))
{
$uid = $loggedInUser->user_id;
if(updateAvatar($uid,$NewImageName))
{
$loggedInUser->avatar = $NewImageName;
$response[] = ['type'=>'success','message'=>'your profile picture was updated','update'=>$NewImageName];
}
}else{
$response[] = ['type'=>'error','message'=>'error resizing image'];
}

if(isset($response) && !empty($response))
{
die(json_encode($response));
}else{
die(json_encode(['type'=>'error','message'=>'script error occured']));
}
}
}else{
http_response_code(403);
}
}else{
http_response_code(401);
}
}else{
http_response_code(403);
}
}else{
http_response_code(405);
}

Thanks for your time
17  Alternate cryptocurrencies / Altcoin Discussion / Razorcoin the next big thing? on: June 19, 2014, 01:40:07 AM
It certainly seems like it. looks to be the first truly anonymous coin. i just threw my measly 11 mh/s at it and the network hash rate is @ 3.5gh! i think this is one to keep an eye on.
18  Alternate cryptocurrencies / Altcoin Discussion / Final Notice: Withdraw your coins from OpenEx on: March 25, 2014, 03:52:38 PM
the deadline is 3/27/14 11pm UTC.

It is necessary to withdraw your coins before this date, as the wallets are most likely compromised. the server its self is compromised, i'm not sure why the wallets aren't being stolen/drained but the point remains.

for more information, you can see the main thread detailing the situation.

https://bitcointalk.org/index.php?topic=508674.msg5613536#msg5613536
19  Economy / Service Discussion / Bryce Weiner reports: on: March 20, 2014, 11:57:46 AM
"Since Blockchain's downtime, the binary tree of the TXs of the recent 200k BTC moved by MtGox is "not found".
https://blockchain.info/tree/114684155 "


https://twitter.com/BryceWeiner/status/446613790323265536


BOOM

20  Alternate cryptocurrencies / Altcoin Discussion / OpenEx to be shut down[Hacked] on: March 10, 2014, 12:05:47 AM
3/25/14 UPDATE
THIS IS  A FINAL NOTICE WITHDRAW YOUR COINS IMMEDIATELY(BEFORE 3/27/14 11pm UTC) OR YOU WILL FORFEIT THEM. Take note of any debt repayment codes credited to you in the "funds owed" tab of your account page. These will be redeemable when the new exchange is launched.

Thanks,
         Garrett

3/20/14 UPDATE
ATTENTION:

my cellphone quit working, and i cannot login to my normal email account(the one used for support) which is protected by 2fa. so in the meantime,if you need to contact with me about anything support related, please use the following email address


admin @ openex.pw



3/19/14 UPDATE
PLEASE READ THIS IMMEDIATELY.
https://bitcointalk.org/index.php?topic=508674.msg5788345#msg5788345

3/17/14 UPDATE

You have until 3/27/14 to withdraw all funds. if you choose not to, you are surrendering these funds.

Repayment System Complete. Details:

ok, the new system is up a few things to take note of:

withdrawals process normally, until a situation is encountered where there is not enough in the wallet to pay a withdrawal. in this situation, 10% of the withdrawal is paid, and the remaining 90% is placed in the funds owed table. from the user account page, you will see a new tab that says funds owed. in this tab you will find an explanation for everything, and a table containing:

coin | amount owed | confirmation code

you will be required to copy your confirmation codes. when you sign up for the new site, in the account page you will see a link to claim your confirmation codes. after a code is verified, a share is issued for the amount you are owed of a particular currency. this share will either be paid on a daily or weekly basis, probably daily just to keep you happy. each payout will subtract from the remaining debt. once the debt reaches 0, the share will expire, as you have been paid in full amount of what you are owed. i know this is a terrible inconvenience and many people will probably not be happy with it, but something is better than nothing and this is the best possible way of us to settle our debts with our customers.

if you have any questions or concerns, please continue to voice them in this thread, and i will answer you in due time. i check this thread for new replies several times per day.

thanks,
          Garrett



Police Situation
The police have been contacted, but have yet to do anything. Server company is not answering requests for reverse proxy logs. For the time being we are assuming all responsibility for the loss.



Future of OpenEx

OpenEx will return to operations once the Luapod platform is complete. All debts owed to customers will carry over to the new system, where you will be able to retrieve your "debt share" by providing your confirmation code. It is not necessary to sign up with the same account name or email address, however doing so would be advantageous in the event a dispute arises over the ownership of a "debt share".



We will entertain and discuss any other questions, especially those of customers.



Other Information
BCX is a troll. he knows damn well i'm not hydroponica, he just loves stirring the pot.

evidence?/??

what like the cold storage and master accounts to prove i had nothing to do with it:

COLD(rec'd : 68.92 BTC)
https://blockchain.info/address/1JDo3Nws2X2A7ictiXAX7cmeYFuKYkVuWn


MASTER(rec'd : 66.61 BTC)
https://blockchain.info/address/19TKnov5V2XVrWQ8K5ei2Y7EzzaeMXARSd


and the payout log:

FEE SHARES SCRATCH PAD::->

FIRST PAYOUT

Total   0.795444697264894
staff   0.47726681835894 -- Paid
shares   0.15908893945298 -- UNPAID
site   0.15908893945298 -- Spent on Doge


SECOND PAYOUT


Total   0.31044333542066
staff   0.1862660012524 -- Paid
shares   0.062088667084132 -- UNPAID
site   0.062088667084132 -- Spent on doge

THIRD PAYOUT

wasn't payed out because of hack we are in no position to take money, but it was around .41

<-X
In addition some btc was used to buy coins at cryptsy(doge and 42), and some SKC & BLC @ (atomic trade), however 1.4 btc remains in the cold storage wallet, albeit it is tucked safely at other addresses. this means we are pretty damn near not a satoshi missing on our end.
The next step is notifying the police with all of this information as well as the server logs. something tell me this guy may have made a mistake and he will be caught. even if he is not, we will settle with the customers. we have yet to reach a consensus on the manner of repayment, but like poloniex we will settle with the customers. the website will be down for some months while we continue to work on LUAPOD and a open source rails project we are looking at. however, just as we have always been open and honest we will continue to remain transparent. we may have failed at this point but we are optimistic that we can still right the ship by doing the right thing.
Pages: [1] 2 3 4 5 6 7 8 9 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!