Programming Archives - Hacker Bits https://hackerbits.com/category/programming/ Learn more, work less, stay current Sat, 07 Aug 2021 23:39:32 +0000 en-US hourly 1 What is Skycoin? https://hackerbits.com/programming/what-is-skycoin/ https://hackerbits.com/programming/what-is-skycoin/#comments Wed, 07 Feb 2018 13:30:31 +0000 https://hackerbits.com/?p=5795 Skycoin is more than meets the eye. In this article, we partner with Henry Benjamin (from Skycoin) to learn more about Skycoin and Skywire. Read on to find out how this up-and-coming cryptocurrency works and what it means to be ...

The post What is Skycoin? appeared first on Hacker Bits.

]]>

Skycoin is more than meets the eye. In this article, we partner with Henry Benjamin (from Skycoin) to learn more about Skycoin and Skywire.

Read on to find out how this up-and-coming cryptocurrency works and what it means to be the next generation Internet.

Skycoin vs. Bitcoin

Bitcoin has much more market share than Skycoin, yet that doesn’t make it superior even if it was the first cryptocurrency to hit the market. It is true they took the world by storm and the value has done nothing but rise in the past few years. However…

What is Skywire?

Skywire is the technological breakthrough that will change how we interact with the internet. Some altcoins aim to offer similar functionality yet they are not bringing with it dedicated hardware for the purpose.

Obelisk algorithm

Some of the cryptocurrency problems stem from the Proof of Work (PoW) and Proof of Stake (PoS). With SKY these have been replaced by Obelisk which was developed to correct the inherent security flaws and the centralizing that happened with Bitcoin and the many altcoins that have followed in its footsteps.

What happens next for Skycoin?

SKY and Skywire-meshnet are still in their infancy as previously mentioned. They are not rushing and want things to be right when they release to market. It is not easy to bring a “New Internet” to the world without making sure it does what you say, and it is for this reason they are the best long-term cryptocurrency to invest in.

The post What is Skycoin? appeared first on Hacker Bits.

]]>
https://hackerbits.com/programming/what-is-skycoin/feed/ 1
Obelisk algorithm https://hackerbits.com/programming/obelisk-algorithm/ https://hackerbits.com/programming/obelisk-algorithm/#respond Wed, 07 Feb 2018 13:00:44 +0000 https://hackerbits.com/?p=5792 Some of the cryptocurrency problems stem from the Proof of Work (PoW) and Proof of Stake (PoS).With SKY these have been replaced by Obelisk which was developed to correct the inherent security flaws and the centralizing that happened with Bitcoin ...

The post Obelisk algorithm appeared first on Hacker Bits.

]]>

Some of the cryptocurrency problems stem from the Proof of Work (PoW) and Proof of Stake (PoS).

With SKY these have been replaced by Obelisk which was developed to correct the inherent security flaws and the centralizing that happened with Bitcoin and the many altcoins that have followed in its footsteps.

In some ways, even Ethereum is affected in the same way to a lesser degree.

This distributed consensus algorithm tackles the centralizing problem and creates the "Web of Trust." With this concept, each node connects directly to the other nodes on the network where it has a list of all other nodes in its routing tables.

From here each node has its own personal blockchain that acts as a public broadcasting channel. As these are visible and all the consensus decisions are made through these personal chains, the community can perform audits for collusion or cheating.

About the Author

Henry Benjamin

Henry Benjamin is an online privacy and security advocate. Henry is very active in the cryptocurrency and blockchain community and currently works with the Skycoin Team. Outside of writing he enjoys surfing and spending time with his friends and family.

The post Obelisk algorithm appeared first on Hacker Bits.

]]>
https://hackerbits.com/programming/obelisk-algorithm/feed/ 0
Skycoin vs. Bitcoin https://hackerbits.com/programming/skycoin-vs-bitcoin/ https://hackerbits.com/programming/skycoin-vs-bitcoin/#respond Wed, 07 Feb 2018 13:00:29 +0000 https://hackerbits.com/?p=5783 Bitcoin has much more market share than Skycoin, yet that doesn't make it superior even if it was the first cryptocurrency to hit the market. It is true they took the world by storm and the value has done nothing ...

The post Skycoin vs. Bitcoin appeared first on Hacker Bits.

]]>

Bitcoin has much more market share than Skycoin, yet that doesn't make it superior even if it was the first cryptocurrency to hit the market. It is true they took the world by storm and the value has done nothing but rise in the past few years.

However...

BTC is flawed

Although it has done great things for the world and has shown what cryptocurrencies are able to achieve from an investment and an operational point of view.

BTC is flawed in quite a few areas. Some of these are due to popularity, and some are due to basic design faults in BTC and Blockchain.

SKY, however, has taken its time during its development and fixes a host of these flaws while bringing some radical changes with it along the way. BTC is not the only crypto that suffers from these weaknesses as many of them have been developed to just take advantage of the cryptocurrency scene.

The same systems have been used, so the same flaws exist in these altcoins which do not bode well for them in the future.

The cryptocurrency market is over saturated, and any of the 1000's of altcoins that are available can vanish overnight as they have little to offer apart from false promises.

About the Author

Henry Benjamin

Henry Benjamin is an online privacy and security advocate. Henry is very active in the cryptocurrency and blockchain community and currently works with the Skycoin Team. Outside of writing he enjoys surfing and spending time with his friends and family.

The post Skycoin vs. Bitcoin appeared first on Hacker Bits.

]]>
https://hackerbits.com/programming/skycoin-vs-bitcoin/feed/ 0
What happens next for Skycoin? https://hackerbits.com/programming/what-happens-next-skycoin/ https://hackerbits.com/programming/what-happens-next-skycoin/#respond Wed, 07 Feb 2018 13:00:12 +0000 https://hackerbits.com/?p=5789 SKY and Skywire-meshnet are still in their infancy as previously mentioned. They are not rushing and want things to be right when they release to market.It is not easy to bring a "New Internet" to the world without making sure ...

The post What happens next for Skycoin? appeared first on Hacker Bits.

]]>

SKY and Skywire-meshnet are still in their infancy as previously mentioned. They are not rushing and want things to be right when they release to market.

It is not easy to bring a "New Internet" to the world without making sure it does what you say, and it is for this reason they are the best long-term cryptocurrency to invest in.

Many of the developers on SKY and the supporting network were original developers on BTC and Ethereum. This is a good thing as they have a solid reputation behind them.

The vision that Satoshi had for a decentralized cryptocurrency is close to becoming a reality. SKY was stripped back and designed with his real concept in mind. The more users who use this meshnet, the better it becomes.

Scalability improves as the network grows, as routes are aggregated, so downtimes and slowdowns are a thing of the past. Each user has the chance to gain from the other connections it totals with.

All around it is a secure and safe win-win situation, and SKY & the Skywire-mesh will not only bring about a new internet, but they will also introduce a free internet.

About the Author

Henry Benjamin

Henry Benjamin is an online privacy and security advocate. Henry is very active in the cryptocurrency and blockchain community and currently works with the Skycoin Team. Outside of writing he enjoys surfing and spending time with his friends and family.

The post What happens next for Skycoin? appeared first on Hacker Bits.

]]>
https://hackerbits.com/programming/what-happens-next-skycoin/feed/ 0
What is Skywire? https://hackerbits.com/programming/what-is-skywire/ https://hackerbits.com/programming/what-is-skywire/#respond Wed, 07 Feb 2018 13:00:09 +0000 https://hackerbits.com/?p=5786 Skywire is the technological breakthrough that will change how we interact with the internet. Some altcoins aim to offer similar functionality yet they are not bringing with it dedicated hardware for the purpose.Skywire minersPiggybacking on the back of current technology ...

The post What is Skywire? appeared first on Hacker Bits.

]]>

Skywire is the technological breakthrough that will change how we interact with the internet. Some altcoins aim to offer similar functionality yet they are not bringing with it dedicated hardware for the purpose.

Skywire miners

Piggybacking on the back of current technology isn't creating a real decentralized mesh.

Skywire miners perform a similar task to BTC miners yet rather than consuming vast amounts of energy to conduct the transactions that are choking the network, the miners on this mesh-network improve connectivity and are paid for providing forwarding and bandwidth.

No ISP's?

The beauty of the Skywire-mesh is that it is not reliant on current infrastructure. The mining rigs are all connected together and provide the access while consuming much less power. It offers a truly decentralized mesh network that is highly secure and anonymous for the users.

Skycoin transactions

As you might have noticed the SKY coins have no mining associated with them. This in itself brings many benefits. Every transaction is free and fast.

As all communications are open source and full peer to peer, there will be no mining pools that can influence the SKY coin in any way. No 51% attacks can be performed, and all transactions are anonymous.

At present BTC transaction charges are shooting through the roof where users are paying for their transaction to be processed first.

This makes the whole concept a mockery when it is compared to no-charge transactions from SKY where no coins are mined, so there is no backlog or contention.

About the Author

Henry Benjamin

Henry Benjamin is an online privacy and security advocate. Henry is very active in the cryptocurrency and blockchain community and currently works with the Skycoin Team. Outside of writing he enjoys surfing and spending time with his friends and family.

The post What is Skywire? appeared first on Hacker Bits.

]]>
https://hackerbits.com/programming/what-is-skywire/feed/ 0
Cryptojacking tutorial https://hackerbits.com/programming/cryptojacking-how-to/ https://hackerbits.com/programming/cryptojacking-how-to/#comments Sun, 24 Dec 2017 14:48:04 +0000 https://hackerbits.com/?p=5706 This tutorial is a cryptojacking how-to detailing exactly what you need to setup an opt-in WordPress Coinhive miner for the Monero cryptocurrency.The 4 basic steps are:Get a mymonero.com account.Get a coinhive.com account.Customize JavaScript code.Add JavaScript code to your site. Get ...

The post Cryptojacking tutorial appeared first on Hacker Bits.

]]>

This tutorial is a cryptojacking how-to detailing exactly what you need to setup an opt-in WordPress Coinhive miner for the Monero cryptocurrency.

The 4 basic steps are:

  1. Get a mymonero.com account.
  2. Get a coinhive.com account.
  3. Customize JavaScript code.
  4. Add JavaScript code to your site.

Get a mymonero.com account

  • Navigate to https://mymonero.com.
  • Create an account.
  • Copy down your Private Login Key.
  • Store your Address.

Private Login Key

Cryptojacking How To: MyMonero Private

Address

Cryptojacking How To: MyMonero Address

Get a coinhive.com account

Cryptojacking How To: Coinhive

Customize JavaScript code

Cryptojacking How To: Coinhive Site Key

Add JavaScript code to your site

If you're using a WordPress site, there are WordPress plugins that should make this super easy to configure.

However...

If you don't want to install yet another plugin to simply add JavaScript to your posts, here's what I did...

  • Install the Ad Inserter WordPress plugin.
  • Ad Inserter provides many advanced options to insert any JavaScript, CSS, HTML, PHP or advert code anywhere on the page.
  • In your WordPress Admin page, go to Settings > Ad Inserter.
  • Add your JavaScript snippet.
  • Set Automatic Insertion to Before Post.
  • Set the Posts dropdown to Individually enabled. If you want the code on all posts, change this to Individually disabled.
  • Click Save All Settings.
  • Navigate to your post, scroll to the bottom, and enable it in the post.

Ad Inserter settings

Cryptojacking How To: Ad Inserter

Enable Ad Inserter

Cryptojacking How To: Enable Ad Inserter

About the Author

Ray Li

Ray is a software engineer and data enthusiast who has been blogging for over a decade. He loves to learn, teach and grow. You’ll usually find him wrangling data, programming and lifehacking.

The post Cryptojacking tutorial appeared first on Hacker Bits.

]]>
https://hackerbits.com/programming/cryptojacking-how-to/feed/ 8
Cryptojacking scripts https://hackerbits.com/programming/cryptojacking-scripts/ https://hackerbits.com/programming/cryptojacking-scripts/#comments Wed, 20 Dec 2017 07:55:03 +0000 https://hackerbits.com/?p=5664 Cryptojacking scripts allow you to quickly install a miner on your website. Coinhive's set of AuthedMine scripts is the only solution I can recommend. The reason is the miner will never start without getting explicit consent from the page visitor.  ...

The post Cryptojacking scripts appeared first on Hacker Bits.

]]>

Cryptojacking scripts allow you to quickly install a miner on your website.

Coinhive's set of AuthedMine scripts is the only solution I can recommend. The reason is the miner will never start without getting explicit consent from the page visitor. 

AuthedMine script

Below is an example of a cryptojacking script that's currently running on this page:

[sourcecode lang="javascript"] [/sourcecode]

What is the code doing?

Line 1 is including a JavaScript cryptomining library from Coinhive.

Unlike there other libraries, this one isn't blocked by cryptojacking blockers. Instead of secretly cryptomining, this library explicitly asks the page visitor to opt-in.

Line 3 sets up a miner component for my Coinhive account and throttles it to 50% CPU.

Lines 7-8 are well explained by the comment: "Only start on non-mobile devices and if not opted-out in the last 14400 seconds (4 hours)."

Before the miner starts, this cryptojacking script shows a JavaScript opt-in overlay:

Cryptojacking scripts - AuthedMine opt-in

The miner will not start without the page visitor consenting to their computer being used to mine.

About the Author

Ray Li

Ray is a software engineer and data enthusiast who has been blogging for over a decade. He loves to learn, teach and grow. You’ll usually find him wrangling data, programming and lifehacking.

The post Cryptojacking scripts appeared first on Hacker Bits.

]]>
https://hackerbits.com/programming/cryptojacking-scripts/feed/ 10
Cryptojacking: How to protect yourself? https://hackerbits.com/programming/cryptojacking-blocker/ https://hackerbits.com/programming/cryptojacking-blocker/#respond Wed, 13 Dec 2017 17:03:36 +0000 https://hackerbits.com/?p=5636 The simplest way to protect yourself from cryptojacking is to install a cryptojacking blocker. Installing a cryptojacking blocker means adding a browser extension that blocks a list of domains associated with cryptojacking code. NoCoin cryptojacking blockerNoCoin is currently the most ...

The post Cryptojacking: How to protect yourself? appeared first on Hacker Bits.

]]>

The simplest way to protect yourself from cryptojacking is to install a cryptojacking blocker.

Installing a cryptojacking blocker means adding a browser extension that blocks a list of domains associated with cryptojacking code.

NoCoin cryptojacking blocker

NoCoin is currently the most widely installed extension. Rafael Keramidas, the extension author, created extensions for both Chrome (over 225K installations) and Firefox (close to 20K installations).

NoCoin seems to have one of the most comprehensive blacklists with at least 5 known contributors.

Maybe one day the capability to block cryptojacking will be built into the browser.

If this interests you, make sure to checkout this thread from the folks at Chromium: 766068 - Please consider intervention for high cpu usage js.

Will you notice if a web page is cryptojacking?

It depends.

If the mining is being throttled to stay below a certain threshold, you may not notice any performance degradation.

If the mining is not being throttled, you will likely notice some impact on performance. 

After Jascha's email, I navigated to the article and noticed my laptop fan whirring loudly.

My laptop fan starts whirring whenever the CPU usage jumps up from my normal CPU usage, so I was definitely suspicious.

What devices are affected?

In-browser cryptojacking can happen to any computing device that can run JavaScript. This means your desktop, laptop and even mobile device could be potential targets for in-browser cryptomining.

Is it dangerous?

Once again, it depends.

If you're on a desktop or laptop with lots of processor speed and memory, you might not even notice in-browser cryptojacking.

On the other hand, cryptojacking on a mobile device like a phone or tablet could be a significant drain on your battery. 

What sites do cryptojacking?

Although some of these sites have removed the cryptojacking code, here are a few sites that were reported for cryptojacking:

About the Author

Ray Li

Ray is a software engineer and data enthusiast who has been blogging for over a decade. He loves to learn, teach and grow. You’ll usually find him wrangling data, programming and lifehacking.

The post Cryptojacking: How to protect yourself? appeared first on Hacker Bits.

]]>
https://hackerbits.com/programming/cryptojacking-blocker/feed/ 0
Cryptojacking with JavaScript https://hackerbits.com/programming/cryptojacking-javascript/ https://hackerbits.com/programming/cryptojacking-javascript/#comments Mon, 11 Dec 2017 15:42:30 +0000 https://hackerbits.com/?p=5617 A cryptojacking JavaScript web page uses your computer to mine for cryptocurrencies.More importantly...You don't need to be tricked into installing cryptojacking JavaScript, because it doesn't need to be installed.Simply stated:You don't need to download anything more than the web page ...

The post Cryptojacking with JavaScript appeared first on Hacker Bits.

]]>

A cryptojacking JavaScript web page uses your computer to mine for cryptocurrencies.

More importantly...

You don't need to be tricked into installing cryptojacking JavaScript, because it doesn't need to be installed.

Simply stated:

You don't need to download anything more than the web page with cryptojacking JavaScript, because JavaScript is already the world's most ubiquitous computing runtime.

Let's take a closer look...

What does the code look like?

I navigated to a site that does cryptojacking and tracked down the JavaScript code that performs the cryptomining.

Here's the source code:

[js] [/js]

The code snippet:

  1. Loads Coinhive's JavaScript library.
  2. Tells Coinhive which Monero account to give the mining credit.
  3. Starts the miner.

Ok, what's Coinhive?

Coinhive offers a JavaScript miner for the Monero blockchain.

The basic idea is to offer alternatives to online advertising. Instead of showing ads to customers, leverage their devices to mine cryptocurrencies to "pay" for the free article, video, game, etc.

Customers have full privacy. Just "pay" with their capability to mine cryptocurrencies.

How much money can be made from cryptojacking?

The short answer is not much, but it depends on how much website traffic you get.

Maxence Cornet did a cryptomining experiment on a website that gets approximately 1k visits per day with a 0:55 second session duration.

The website mined 0.00947 XMR in 60 hours. That's a total of $0.89 or $0.36 per day.

About the Author

Ray Li

Ray is a software engineer and data enthusiast who has been blogging for over a decade. He loves to learn, teach and grow. You’ll usually find him wrangling data, programming and lifehacking.

The post Cryptojacking with JavaScript appeared first on Hacker Bits.

]]>
https://hackerbits.com/programming/cryptojacking-javascript/feed/ 3