crypto0sy

BtcNodeHunter stage 1 build

Sep 18th, 2021
770
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env python
  2.  
  3.  
  4. #save the file under .py .js .ce .txt .
  5. #and link with namp for now.("havent_tried_sql_injections_yet_ither");
  6. #@2021-crypto0sy-stage1
  7.  
  8. local os = require "os"
  9. local datetime = require "datetime"
  10. local bitcoin = require "bitcoin"
  11. local shortport = require "shortport"
  12. local stdnse = require "stdnse"
  13.  
  14. description = [[
  15. Extracts version and node information from a Bitcoin server stage-1 build of my bitcoin hunter.
  16. ]]
  17.  
  18. ---
  19. -- @usage
  20. -- nmap -p 8333 --script bitcoin-info <ip>
  21. --#this is the command you need to use inside a terminal or consolei believe this would work on also but id say better results all round with a modded version of nmap using lynux system. This project is only a fraction done but works with what iv layed out. as weeks go on ill carry on working on this and modding it up to the goal i expect to achieve im Crypto0sy its 2021 and im right on a mission building some Dark Dark tools for the use with bitcoins and crypto currency. Date now is Saturday/18th 2021 and iv just passed this file out to a very close friend i believe as well as work copllegue within  the WWW.
  22. #
  23. #                      )        )            )   )    )   )
  24. #    (   (          ( /(     ( /(    (    ( /(( /( ( /(( /(
  25. #  ( )(  )\ ) `  )  )\())(   )\())(  )\ ) )(_))\()))(_))\())
  26. #  )(()\(()/( /(/( (_))/ )\ ((_)\ )\(()/(((_)((_)\((_)((_)\
  27. # ((_)(_))(_))(_)_\| |_ ((_)/  (_)(_))(_))_  )  (_)_  )/ (_)
  28. #/ _| '_| || | '_ \)  _/ _ \ () |(_-< || |/ / () | / / | |
  29. #\__|_|  \_, | .__/ \__\___/\__/ /__/\_, /___\__/ /___||_|
  30. #        |__/|_|                     |__/
  31. #
  32. -- @output
  33. -- PORT     STATE SERVICE
  34. -- 8333/tcp open  bitcoin
  35. -- | bitcoin-info:
  36. -- |   Timestamp: 2021-09-18T08:50:49
  37. -- |   Network: main
  38. -- |   Version: 0.7.0
  39. -- |   Node Id: 26855fa1ac038c12
  40. -- |   Lastblock: 512702
  41. -- |_  User Agent: /Satoshi:0.14.2/
  42. --
  43.  
  44. author = ("crypto0sy");
  45. categories = {"discovery", "safe", "privkeys", "hashes", "pubkeys", "mappin", "sniffing", "spider"};
  46.  
  47. --
  48. -- Version 0.1
  49. --
  50.  
  51.  
  52. portrule = shortport.port_or_service(8333, "bitcoin", "tcp" );
  53.  
  54. local function fail(err) return stdnse.format_output(false, err) end
  55.  
  56. action = function(host, port);
  57.  
  58.   local NETWORK = {
  59.     [3652501241] = "main", #add your own networks inside once you've linked to may outsiders//crypto0sy
  60.     [3669344250] = "testnet"
  61.   }
  62.  
  63.   local bcoin = bitcoin.Helper:new(host, port, { timeout = 10000 });
  64.   local status = bcoin:connect();
  65.  
  66.   if ( not(status) ) then
  67.     return fail("Failed to connect to server");
  68.   end
  69.  
  70.   local request_time = os.time();
  71.   local status, ver = bcoin:exchVersion();
  72.   if ( not(status) ) then
  73.     return fail("Failed to extract version information");
  74.   end
  75.   bcoin:close()
  76.   datetime.record_skew(host, ver.timestamp, request_time);
  77.  
  78.   local result = stdnse.output_table();
  79.   result["Timestamp"] = datetime.format_timestamp(ver.timestamp);
  80.   result["Network"] = NETWORK[ver.magic];
  81.   result["Version"] = ver.ver;
  82.   result["Node Id"] = ver.nodeid;
  83.   result["Lastblock"] = ver.lastblock;
  84.   if ver.user_agent ~= "" then;
  85.     result["User Agent"] = ver.user_agent;
  86.   end;
  87.  
  88.   return result;
  89. end;
  90.  
RAW Paste Data