Bitcoin Forum
November 18, 2018, 07:41:31 PM *
News: Latest Bitcoin Core release: 0.17.0 [Torrent].
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [ANN] BTC Sniffer: Bitcoin P2P Network Sniffer & Events Trigger  (Read 2818 times)
sebicas
Member
**
Offline Offline

Activity: 69
Merit: 10


View Profile WWW
August 23, 2012, 04:01:25 PM
 #1

Github URL: https://github.com/sebicas/bitcoin-sniffer

BTC Sniffer is a Python script based on an easy version of jgarzik / pynode ( https://github.com/jgarzik/pynode ) that connects to any node on the Bitcoin Network and triggers the folloing events:

* new_block_event(block): Triggers when a Block is found
* new_tx_event(tx): Triggers when a Transactions is found

The purpose of BTC Sniffer is the add an easy way to listen to Bitcoin Network events and facilitate extensions without having to alter bitcoind's code itself, making it easy to upgrade you bitcoind node without having to rewrite your extensions.

The best possible scenario is having BTC Sniffer listening to a local bitcoind node, since we can assume you can trust your own node. But tecnicly, it can connect to any node on the network ( http://blockchain.info/connected-nodes )

IMPORTANT: BTC Sniffer doesn't do any validation, it just trust the node it connects for that, so if you use it on production, make sure you connect to a node you trust.

See how it works
------------------------------

Here is an example of the script output:

Code:
MacBook-Pro:bitcoin-sniffer sebicas$ ./sniffer.py

 Bitcoin Network Sniffer v0.0.1
 -------------------------------------------------------------------------
 Connecting to Bitcoin Node IP # 173.242.112.53:8333
 Connected & Sniffing :)

 - Valid TX: 68ca213684e40a673dba7bbcb1d9bebb2c696eb8da92f8e8d853cab772e92f52
 - Valid TX: 8192c04854d635755184f0f5a6444becba051750ef1ab8bf39967785f377d89e
 - Valid TX: 433b0f7f8b343d0ce25c0ad1e22b42fc57526cfa9ecc86511440d2d5f63961ec
 - Valid TX: 3839d9a481606105ae9f0513e66305cdb6e18149f8c7ae7aea0550d77b443f56
 - Valid TX: 12afb272778079c36f0e35ad9d147b37c9e34f42b12133efca6f57d68a68e548

 - Valid Block: 0000000000000408f197ce13e2271edc889b6ef3109036ce6ff2e30f2e9023df

 - Valid TX: 4649725078f30f4b18099a6ede4c991c16c16887e4ff860b33cb7fa8d6c01c3a
 - Valid TX: 712419473ed2a429de1757030d8551f6ee5d360fdfc9648f5647fbd6f166ed2b
 - Valid TX: 17546dea9122dc13c81fc177c2fba0eda30674fbc29619f24b556095a52efdc3
 - Valid TX: da2621f6ef147e78dfe210e3d3718fb620dc9c8bfbbebd3b1e7e49645e20c53f
 - Valid TX: ddc70dc5119150d2731f6b4193522ad22cbe3800164022a34b94b2c2e899cc1c

Use Case Examples
------------------------------

You can use BTC Sniffer to easily:

1. Push notifications to an external messaging server ( Amazon SNS, ZeroMQ, RabbitMQ, etc )
2. Store real time transactions on any database format you want ( MySQL, MongoDB, etc )
3. Use sockets to display real time stream of network events on your website
4. Create a real time charts and statistics

And anything else you can think of. Smiley

Any questions you can find me at #bitcoin-dev IRC Channel.
1542570091
Hero Member
*
Offline Offline

Posts: 1542570091

View Profile Personal Message (Offline)

Ignore
1542570091
Reply with quote  #2

1542570091
Report to moderator
1542570091
Hero Member
*
Offline Offline

Posts: 1542570091

View Profile Personal Message (Offline)

Ignore
1542570091
Reply with quote  #2

1542570091
Report to moderator
1542570091
Hero Member
*
Offline Offline

Posts: 1542570091

View Profile Personal Message (Offline)

Ignore
1542570091
Reply with quote  #2

1542570091
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1542570091
Hero Member
*
Offline Offline

Posts: 1542570091

View Profile Personal Message (Offline)

Ignore
1542570091
Reply with quote  #2

1542570091
Report to moderator
sebicas
Member
**
Offline Offline

Activity: 69
Merit: 10


View Profile WWW
October 06, 2017, 03:19:49 AM
 #2

Unfortunately not, when I did this, not much existed... I am sure today you can find way more completed libraries.
BitcoinsGreat
Sr. Member
****
Offline Offline

Activity: 388
Merit: 250


View Profile
October 11, 2017, 06:11:39 PM
 #3

Open source? I hope so, since this is about ten minutes of coding and is the easiest thing to do. Would hate to have someone install a Trojan over some elementary school code signal and triggers, not even real coding in the first place, just response triggers. So, please tell us that it is all out there for everyone to see, because otherwise, no one will touch it.

TryNinja
Hero Member
*****
Offline Offline

Activity: 826
Merit: 801


ChipMixer's Badge of Honor


View Profile
October 11, 2017, 08:07:08 PM
 #4

Open source? I hope so, since this is about ten minutes of coding and is the easiest thing to do. Would hate to have someone install a Trojan over some elementary school code signal and triggers, not even real coding in the first place, just response triggers. So, please tell us that it is all out there for everyone to see, because otherwise, no one will touch it.
You could have spent 10 seconds of your life to at least read the first 2 lines of the thread where OP links his GitHub repo and says that "BTC Sniffer is a Python script" instead of posting this.

Edit: LOL. Just saw after the last post that this was posted 5 years ago.

CasinoKiller
Sr. Member
****
Offline Offline

Activity: 308
Merit: 250



View Profile
October 11, 2017, 11:34:43 PM
 #5

My granny would do better coding, ha-ha  Roll Eyes

FundYourselfNow
Revolutionizing CrowdfundingJOIN ICO NOW!

itod
Legendary
*
Offline Offline

Activity: 1386
Merit: 1015


^ Will code for Bitcoins


View Profile
October 12, 2017, 11:01:30 PM
 #6

My granny would do better coding, ha-ha  Roll Eyes


Man, this was pioneer coding from the early days, when there was almost nothing like such library. Look at the timestamps, Aug 25, 2012 = more than 5 years ago, have some respect.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!