Welcome to the Dash Forum!

Please sign up to discuss the most innovative cryptocurrency!

Free SMUT! (Simple Masternode Update Tool)

Discussion in 'Tips and Tricks' started by thelonecrouton, Oct 18, 2014.

  1. thelonecrouton

    thelonecrouton Well-known Member
    Foundation Member

    Joined:
    Apr 15, 2014
    Messages:
    1,135
    Likes Received:
    813
    Trophy Points:
    283
    Behold, SMUT - Simple Masternode Update Tool!

    It's *very* simple!

    [​IMG]

    Get it here: http://s000.tinyupload.com/?file_id=71603269094175566716 !

    Latest version: SMUTv45 http://s000.tinyupload.com/index.php?file_id=61591165846494453877

    Start from a terminal with 'python smut25.py'

    For those of you who hate the CLI but have no problem typing stuff into a GUI! Probably wont work on Windows, I have no idea! You may need to pip install urllib2 and pxssh!
    Code:
    sudo apt-get install python-pip
    sudo pip install urllib2
    sudo pip install pxssh
    sudo pip install anything else it complains is missing!
    
    It works for me! Feel free to try it!

    Usage:
    Create a textfile called masternodes.txt and put in it your MN wallet address and corresponding IP, separated by a space. Have as many MNs in there as you like.
    Code:
    Xjhgvbvge7y6g78vgdhbihtybg89yb 12.34.56.789
    Xmn;klvj90867anLiobhiapd7yp9q3 23.456.78.910
    ...
    etc. (Yes, I know those aren't valid IP addresses!)
    
    Then start darkcoind either yourself or you can start it from within the About tab! You may need to give darkcoind a minute to sync up and sort itself out. If you are running your QT wallet already, you'll be syced but you'll have to shut down the QT wallet before you start darkcoind!

    Click Felch! Wonder at the result!

    For updating, enter your username, serverIP and password. The app should get the download link for you from www.darkcoin.io (that's what the two second startup delay is!) but if not, or if darkcoin.io hasn't been updated to the latest version yet, enter it yourself! When you have entered all the details, click Update, and start drinking!

    If you are experiencing bugs, try a mosquito net!

    :eek:
     
    #1 thelonecrouton, Oct 18, 2014
    Last edited by a moderator: Dec 17, 2014
    • Like Like x 8
  2. bertlebbert

    bertlebbert Active Member

    Joined:
    Jul 17, 2014
    Messages:
    669
    Likes Received:
    289
    Trophy Points:
    133
    Lol, I just downloaded a file titled "SMUT.zip"
     
  3. thelonecrouton

    thelonecrouton Well-known Member
    Foundation Member

    Joined:
    Apr 15, 2014
    Messages:
    1,135
    Likes Received:
    813
    Trophy Points:
    283
    Let me know anyone if you've got it working?

    I'm going to upgrade it a bit when I get time so it does a full MN install if you don't already have one running, since it already does most of it. Really just need to add some stuff to test your firewall and set one up if needed, let you know when it's fully synced up so you can run the remote start etc. Eventually I'll maybe see about getting it to autogenerate your whole .conf file too.
     
  4. MrMime

    MrMime Well-known Member
    Foundation Member

    Joined:
    Mar 9, 2014
    Messages:
    169
    Likes Received:
    36
    Trophy Points:
    188
    YES YES YES!! <3 Where are the redheads?....

    This is awesome. For logging into MN's, does it use ssh?
     
  5. thelonecrouton

    thelonecrouton Well-known Member
    Foundation Member

    Joined:
    Apr 15, 2014
    Messages:
    1,135
    Likes Received:
    813
    Trophy Points:
    283
    Yes, it's just a scripted ssh session.

    The redheads got stripped from this version, sorry, redheads can be high maintenance, but they may make a comeback...
     
  6. MrMime

    MrMime Well-known Member
    Foundation Member

    Joined:
    Mar 9, 2014
    Messages:
    169
    Likes Received:
    36
    Trophy Points:
    188
    Awesome job tlc. Can't wait to try it out on 10.16. Tip address?
     
  7. thelonecrouton

    thelonecrouton Well-known Member
    Foundation Member

    Joined:
    Apr 15, 2014
    Messages:
    1,135
    Likes Received:
    813
    Trophy Points:
    283
    Please try it sooner if you can, even just to test the get MN balances/health bit, nobody has confirmed it works for them yet, I've probably forgotten to mention some dependency or other... :confused:
     
  8. MrMime

    MrMime Well-known Member
    Foundation Member

    Joined:
    Mar 9, 2014
    Messages:
    169
    Likes Received:
    36
    Trophy Points:
    188
    ya, it shows the amount in masternodes correctly but reports them all as not in list. Are you pulling from ./darkcoind get masternode list?

    *Edit: Just restarted and they are showing up in SMUT! Nice =D
     
    #8 MrMime, Oct 20, 2014
    Last edited by a moderator: Oct 20, 2014
  9. MrMime

    MrMime Well-known Member
    Foundation Member

    Joined:
    Mar 9, 2014
    Messages:
    169
    Likes Received:
    36
    Trophy Points:
    188
    ya, it shows the amount in masternodes correctly and reporting the ones online! This is sweet =)
     
  10. stonehedge

    stonehedge Well-known Member
    Foundation Member

    Joined:
    Jul 31, 2014
    Messages:
    696
    Likes Received:
    333
    Trophy Points:
    233
    You're right, it is a bit of a pain in Windows. Mainly due to "inconsistent tabs and spaces" because of charset differences.

    Nice looking tool though! I won't be using it for masternode updates but will butcher the code to keep an eye on my masternodes...

    Thanks for your work on this.
     
  11. thelonecrouton

    thelonecrouton Well-known Member
    Foundation Member

    Joined:
    Apr 15, 2014
    Messages:
    1,135
    Likes Received:
    813
    Trophy Points:
    283
    Thanks for the feedback guys! :)

    stonehedge: Yeah, sorry I've been Windows free for over 15 years, in fact I think between me and the local OSX loony we've more or less eradicated Microsoft from the whole neighbourhood. I'll fiddle with making it properly platform agnostic when I've got it doing everything else I want! :D
     
    • Like Like x 1
  12. thelonecrouton

    thelonecrouton Well-known Member
    Foundation Member

    Joined:
    Apr 15, 2014
    Messages:
    1,135
    Likes Received:
    813
    Trophy Points:
    283
    SMUTv28: http://s000.tinyupload.com/?file_id=28547846413533586096

    Finally added some exception handling, which should leave you with a running darkcoind on your server even if there wasn't one, or wasn't even a .darkcoin directory there before. Haven't actually tested this yet, will do when I'm setting up a new MN tomorrow, but the update bit works well, just updated all my MNs to 15.14 with it. :)

    To do: add firewall check/setup and automatic darkcoin.conf generation. Plus whatever else needs doing. Then make it work properly on Windows.

    1-click masternode installs getting closer!
     
    • Like Like x 1
  13. coingun

    coingun Active Member
    Masternode Owner/Operator

    Joined:
    Jul 8, 2014
    Messages:
    489
    Likes Received:
    402
    Trophy Points:
    133
    Great work on this. I have just found it and am going to run it through it's paces on some of my testnet gear. Will report back!

    Edit: Had a quick peak through the source code. Doesn't appear to be any Masternode coin stealing hidden features. Must have been those red head's you took you earlier!
     
  14. coingun

    coingun Active Member
    Masternode Owner/Operator

    Joined:
    Jul 8, 2014
    Messages:
    489
    Likes Received:
    402
    Trophy Points:
    133
    What flavor was this built on? I'm testing it on 14.04 and am having trouble finding both the pip install's suggested.

    [email protected]:~/Desktop/smut28$ sudo pip install urllib2
    Downloading/unpacking urllib2
    Real name of requirement urllib2 is urllib3
    Could not find any downloads that satisfy the requirement urllib2
    Cleaning up...
    No distributions at all found for urllib2
    Storing debug log for failure in /home/tester/.pip/pip.log
    [email protected]:~/Desktop/smut28$ sudo pip install pxssh
    Downloading/unpacking pxssh
    Could not find any downloads that satisfy the requirement pxssh
    Cleaning up...
    No distributions at all found for pxssh
    Storing debug log for failure in /home/tester/.pip/pip.log
     
  15. calnaughtonjnr

    calnaughtonjnr Well-known Member
    Foundation Member

    Joined:
    May 25, 2014
    Messages:
    221
    Likes Received:
    157
    Trophy Points:
    203
    This looks excellent. Love the name too :D
     
  16. thelonecrouton

    thelonecrouton Well-known Member
    Foundation Member

    Joined:
    Apr 15, 2014
    Messages:
    1,135
    Likes Received:
    813
    Trophy Points:
    283
    Hmm, need to try it on a clean box and see... will have a go tonight.
     
  17. coingun

    coingun Active Member
    Masternode Owner/Operator

    Joined:
    Jul 8, 2014
    Messages:
    489
    Likes Received:
    402
    Trophy Points:
    133
    This is 14.04 LTS Desktop. Seems like perhaps you were building for 12.04 or back? Most of the stuff on 14.04 seems to mention either python-pip or python3-pip. Let me know if you need any other test boxen. Would love to get this rolling for all the testnet masternodes!
     
  18. thelonecrouton

    thelonecrouton Well-known Member
    Foundation Member

    Joined:
    Apr 15, 2014
    Messages:
    1,135
    Likes Received:
    813
    Trophy Points:
    283
    Fired up Ubuntu 14.04 under virtualbox, installed darkcoind with a barebones .conf file and let it sync up, downloaded SMUT from the link above, unzipped, and ran...

    Felch function worked OK so whatever urllib was present served.

    Update function connected to server fine so pxssh must have been there already, I used it to run a few simple commands like ls, uptime, top etc. but any daemon call gave me:
    Code:
    terminate called after throwing an instance of 'std::runtime_error'
    what(): locale::facet::_S_create_c_locale name not valid
    Aborted
    
    ...which I guess is some locale problem with the virtualbox VDI, haven't had time to resolve it yet.

    But, I didn't have to install python-pip or then pip install anything beyond what came with the default 14.04 image.

    python -V on the VM gave me 2.7.6, same as my home box.
     
    #18 thelonecrouton, Oct 25, 2014
    Last edited by a moderator: Oct 25, 2014
  19. coingun

    coingun Active Member
    Masternode Owner/Operator

    Joined:
    Jul 8, 2014
    Messages:
    489
    Likes Received:
    402
    Trophy Points:
    133
    LOL! i never even actually tried running it. I was like oh i can't get hte dep's no way it will work stop!!!! I'll test again and let you know.
     
  20. coingun

    coingun Active Member
    Masternode Owner/Operator

    Joined:
    Jul 8, 2014
    Messages:
    489
    Likes Received:
    402
    Trophy Points:
    133
    Great job. Works perfectly on 14.04 without any deps. Keep up the good work.
     
  21. weirdgod

    weirdgod Well-known Member
    Foundation Member

    Joined:
    Jun 4, 2014
    Messages:
    91
    Likes Received:
    51
    Trophy Points:
    168
    Very nice!

    my wishlist:

    -1- console output - for us who have no xwindows
    -2- further automation - it would be nice to be able to automagically update all servers on masternodelist.txt (the IPs are already there!).
    This is something that seems not too complicated to add, assuming the same user/pw for all.... ?

    Also, please post your drk address, so we can donate!
     
  22. thelonecrouton

    thelonecrouton Well-known Member
    Foundation Member

    Joined:
    Apr 15, 2014
    Messages:
    1,135
    Likes Received:
    813
    Trophy Points:
    283
    Thanks werdgod!

    1. Yeah I could do a CLI version I suppose...
    2. I tried this in previous versions, you're right it's just a simple loop, but I was trying to keep the interface as simple as possible, if I'd released it as it was I would have had to call it Complicated Update Node Tool and that might have offended people. I'll see what I can do, latest version autoinstalls a darkcoin.conf on the server and sets up a simple ufw firewall, I'll upload it as soon as I've tested it a bit more.

    Thanks for the donations offer but any actual programmer would laugh at my efforts, and previous experience as a dispatch rider and porn star have taught me never again to monetize my hobbies... :D
     
    • Like Like x 2
  23. yidakee

    yidakee Well-known Member
    Foundation Member

    Joined:
    Apr 16, 2014
    Messages:
    1,812
    Likes Received:
    1,168
    Trophy Points:
    283
    Oh well done dude! Niiice! :D
     
  24. coingun

    coingun Active Member
    Masternode Owner/Operator

    Joined:
    Jul 8, 2014
    Messages:
    489
    Likes Received:
    402
    Trophy Points:
    133
    I just spit coffee onto the screen. Thanks for that!!! LOL
     
  25. thelonecrouton

    thelonecrouton Well-known Member
    Foundation Member

    Joined:
    Apr 15, 2014
    Messages:
    1,135
    Likes Received:
    813
    Trophy Points:
    283
    SMUT v42:lumberjack!

    [​IMG]

    Now with logging, geddit? I find it useful for keeping a record of MN balances over time, you might too!

    Works fine on linux, probably looks a bit funny on Win, no Mac crash test dummies yet that I know of:

    http://s000.tinyupload.com/?file_id=73743521721716758543

    Other things previously talked about all mostly work and are coming soon! Maybe! :confused:
     
    #25 thelonecrouton, Nov 4, 2014
    Last edited by a moderator: Nov 4, 2014
  26. thelonecrouton

    thelonecrouton Well-known Member
    Foundation Member

    Joined:
    Apr 15, 2014
    Messages:
    1,135
    Likes Received:
    813
    Trophy Points:
    283
    Minor update, v44 separates out the update and fresh install functions for easier debugging, and has some slightly improved exception handling.

    Tested working multiple times today both updating and doing a clean install.

    (Install still needs you to run masternode genkey and stick that and your server IP in the serverside conf file, and take care of your own firewall.)

    [​IMG]
     
  27. oaxaca

    oaxaca Well-known Member
    Foundation Member

    Joined:
    Jul 8, 2014
    Messages:
    573
    Likes Received:
    832
    Trophy Points:
    263
    Can you share a link to v44?
     
  28. thelonecrouton

    thelonecrouton Well-known Member
    Foundation Member

    Joined:
    Apr 15, 2014
    Messages:
    1,135
    Likes Received:
    813
    Trophy Points:
    283
  29. camosoul

    camosoul Grizzled Member

    Joined:
    Sep 19, 2014
    Messages:
    2,266
    Likes Received:
    1,130
    Trophy Points:
    1,183
    Code:
    $ python smut44.py
    Traceback (most recent call last):
      File "smut44.py", line 4, in <module>
      from PyQt4.QtGui import *
    ImportError: No module named PyQt4.QtGui
    $
    
    so I...
    Code:
    $ sudo pip install PyQt4
    Downloading/unpacking PyQt4
      Could not find any downloads that satisfy the requirement PyQt4
    Cleaning up...
    No distributions at all found for PyQt4
    Storing debug log for failure in /home/anon/.pip/pip.log
    $
    
    Then I look at this:
    https://pypi.python.org/pypi/PyQt4/4.11.3

    Code:
    $ pip search PyQt4
    pyqtrailer  - PyQt4 application to download trailers from www.apple.com/trailers
    pydee  - Pydee development environment and its PyQt4-based IDE tools: interactive Python shell, Python code editor, workspace (dict/list/string/array editor), doc viewer, history log, environment variables editor, ...
    htmlPy  - A wrapper around PyQt4's webkit library which helps developer create beautiful UI with HTML5, CSS and Javascript for standalone applications.
    formlayout  - Module for creating Qt form dialogs/widgets to edit various type of parameters, compatible with both PyQt4 and PySide
    fluid-nexus  - PyQt4 application that enables one to share messages and data independent of centralized data networks
    qt_backport  - Makes PySide/PyQt4 code work with Qt5 (using PyQt5)
    altf2  - Simple program launcher (Alt-F2 handler). Requires PyQt4
    pyqode.qt  - Provides an abstraction layer on top of the various Qt bindings (PyQt5, PyQt4 and PySide)
    PyQtX  - Mimics the structure of PyQt5 but provides PyQt4 as a fallback solution.
    pdb4qt  - A set_trace() that works with PyQt4
    PyQt4  - Python bindings for the Qt cross platform GUI toolkit
    pyqterm  - Simple terminal/console widget for PyQt4 with vt100 support
    qgmap  - Google Map widget for PySyde/PyQt4
    PyQtdesignerplugins  - PyQtdesignerplugins installs Qt Designer plugins for PyQt4
    OpenGLContext_qt  - PyQt4/PySide context for OpenGLContext
    Getting-Started-With-PyQt4 - An introduction to PyQt4 for Python programmers.
    PyQtdoc  - PyQtdoc installs Qt documentation for PyQt4
    EuroPython2006_PyQt4_Examples - PyQt4 examples from a talk at EuroPython 2006.
    python-qt  - Python compatibility wrapper for Qt Bindings (PySide/PyQt4)
    jlib  - PyQt4 library for writing XMPP applications
    $
    
    See line 13?

    I realize pip simply lies and refuses to do it's job... Nothing I can do about it since no docs for impossible problems that can't happen... It just plain refuses to install it even though it very much does exist. I'm looking right at it... Lies of busted nerd junk.

    So then I:
    Code:
    $ python3 smut44.py
      File "smut44.py", line 21
      global results, dpath, ip, username, password, updatepath, txtfile, cb, now
                                                                                ^
    TabError: inconsistent use of tabs and spaces in indentation
    $
    
    Everything about python is broken.
     
    #29 camosoul, Nov 19, 2014
    Last edited by a moderator: Nov 19, 2014
  30. thelonecrouton

    thelonecrouton Well-known Member
    Foundation Member

    Joined:
    Apr 15, 2014
    Messages:
    1,135
    Likes Received:
    813
    Trophy Points:
    283
    Try python 2.7, never tried it in 3, should have specified the version I used.

    edit: http://stackoverflow.com/questions/7942887/how-to-configure-pyqt4-for-python-3-in-ubuntu - looks like a little extra hassle to get QT4 for python 3.