[{"data":1,"prerenderedAt":366},["ShallowReactive",2],{"project-23446123":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":29,"sentiment":30,"stance_mix":31,"scored_comments":36,"aspects":37,"strip":46,"post_text":48,"what":49,"said":73,"maker_in_thread":156,"shape":165,"grid":169,"attempts":330,"same_week":331,"maker_shows":41,"maker_hidden":358,"reader_version":359,"card":360},"23446123","libmish","A library to add a command promp (and telnet) to your programs","title","Show HN: A library to add a command promp (and telnet) to your programs","https:\u002F\u002Fgithub.com\u002Fbuserror\u002Flibmish","github.com","buserror",1591523833,2020,82,60,771,3028,26,"notable","dev_tools","debugging library","library",[24,25,26,27,28],"command prompt","telnet","introspection","c library","debugging","curious",0.065,{"positive":32,"neutral":33,"mixed":34,"critical":35},6,11,0,4,21,{"design":38,"idea":39,"execution":42,"privacy":44,"docs":45},{"positive":34,"critical":34},{"positive":40,"critical":41},5,2,{"positive":43,"critical":34},1,{"positive":34,"critical":41},{"positive":34,"critical":34},[47,34,47,47,40,34,34,34,34,47,47,47,40,47,34,43,34,34,34,34,34,40,34,34,34,34,47,40,34,40,34,43,34,40,34,43,34,34,34,34],3,null,{"problem":50,"audience":57,"pricing":48,"motivation":62,"time_to_build":48,"stack":66,"openness":71,"stage":72,"team_size":71},{"value":51,"source":52,"evidence":53},"Lets you introspect a running long-lived program without building a dedicated subsystem","maker",[54],{"id":55,"by":11,"text":56},"23446141","This is a \"C19 lockdown project\" -- I always want that feature in long running processes: quick way to do introspection in a program without having to create a whole subsystem…",{"value":58,"source":59,"evidence":60},"C programmers with long-running processes","inferred",[61],{"id":55,"by":11,"text":56},{"value":63,"source":52,"evidence":64},"Wanted quick introspection into long-running programs; built during lockdown",[65],{"id":55,"by":11,"text":56},[67],{"value":68,"source":52,"evidence":69},"C",[70],{"id":55,"by":11,"text":56},"unknown","prototype",{"praise":74,"objections":91,"requests":107,"questions":122,"alternatives":131},[75],{"value":76,"source":77,"evidence":78},"Useful for introspecting long-running jobs and processes","commenter",[79,83,87],{"id":80,"by":81,"text":82},"23464466","p4bl0","The first thing I thought of is \"I could use this to telnet into long running computation processes and force them to flush those buffers to see where they're at and how it…",{"id":84,"by":85,"text":86},"23465985","neverartful","I have an existing use case for this. One of the music players that I use a lot is command line based and I start it to run with shuffle-play (i.e., play songs randomly).…",{"id":88,"by":89,"text":90},"23466970","Quarrel","Very nice. Now just need a small wrapper around ptrace to inject the library and call mish_prepare(0), so can just dynamically add it as needed to running programs.",[92],{"value":93,"source":77,"evidence":94},"Telnet is insecure and exposes an unauthenticated port; no security",[95,99,103],{"id":96,"by":97,"text":98},"23464936","amelius","Be aware that random websites can access localhost through your browser.",{"id":100,"by":101,"text":102},"23468435","antoineMoPa","Can't complain about the security; there is no security.",{"id":104,"by":105,"text":106},"23464036","j1elo","Given the explanation from the Security section (i.e. \"libmish is really made for developement purpose\"), it might make more sense that telnet access is disabled by default and…",[108,115],{"value":109,"source":77,"evidence":110},"Support Unix domain sockets",[111],{"id":112,"by":113,"text":114},"23464530","skissane","> 'telnet' on linux doesn't handle UNIX sockets Someone should write a patch to fix that. There is no reason why the telnet protocol can't be used over UNIX domain sockets. As…",{"value":116,"source":77,"evidence":117},"Simpler command registration macro",[118],{"id":119,"by":120,"text":121},"23464826","cheez","I feel like this should be simpler: ``` MISH_CMD_NAMES(set, \"set\"); MISH_CMD_HELP(set, \"set 'cnt' variable\", \"test command for libmish!\"); MISH_CMD_REGISTER(set, _test_set_cnt);…",[123],{"value":124,"source":77,"evidence":125},"Can random websites access localhost through the browser?",[126,127],{"id":96,"by":97,"text":98},{"id":128,"by":129,"text":130},"23465756","sadfklsjlkjwt","Can they? I thought this recent issue was related only to websockets?",[132,139,149],{"value":133,"source":77,"evidence":134},"mpd or VLC telnet interface",[135],{"id":136,"by":137,"text":138},"23466297","ComodoHacker","Try mpd or VLC with telnet interface.",{"value":140,"source":77,"evidence":141},"SIGUSR1 signal handlers",[142,146],{"id":143,"by":144,"text":145},"23465367","dspillett","Some tools respond to a Unix signal (https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FSignal_(IPC)) this way, usually SIGUSR1 or SIGUSR2 though I've seen SIGCONT used too. SIGINT also, though that…",{"id":147,"by":81,"text":148},"23466401","Yes that's actually what I did for my last long running jobs: I trapped SIGUSR1 so that when my process receives it it flushes its buffers.",{"value":150,"source":77,"evidence":151},"JMX",[152],{"id":153,"by":154,"text":155},"23465976","tyingq","In the Java world, it's very common to use JMX for that, and there are several JMX clients to read\u002Fset variables, watch logs, etc.",{"comments":35,"answered":43,"key":157},[158,159,162],{"id":55,"text":56},{"id":160,"text":161},"23464752","Good idea, altho I will have to check if busybox telnet for example supports it.",{"id":163,"text":164},"23464975","Yes, I like the single macro, but that doesn't handle the multiple possible names, and multiple lines of help... but I agree, I probably will add a single alias for simple cases.",{"commenters":166,"max_depth":167,"maker_replies":35,"first_comment_mins":47,"lifespan_hours":168},40,10,102,[170,172,174,178,180,182,185,187,190,192,195,198,200,202,203,205,208,212,215,218,223,226,230,235,238,241,243,245,247,249,251,253,255,256,257,259,262,265,266,268,270,272,277,280,284,287,289,293,296,298,300,304,308,310,313,316,318,321,323,327],[104,34,47,171,105,34],"project\u002Fneutral\u002Fdesign",[55,43,34,173,11,43],"maker\u002Fpositive\u002Fidea",[175,43,34,176,177,34],"23464275","commenter\u002Fneutral\u002Fnone","ggerganov",[112,41,47,179,113,34],"project\u002Fneutral\u002Fidea",[160,41,34,181,11,43],"maker\u002Fneutral\u002Fnone",[183,41,47,184,113,34],"23465122","project\u002Fneutral\u002Fexecution",[80,47,40,186,81,34],"project\u002Fpositive\u002Fidea",[188,47,34,176,189,34],"23464482","onion2k",[191,47,34,176,81,34],"23464639",[193,47,34,176,194,34],"23465292","jacobush",[196,47,34,176,197,34],"23466167","kingosticks",[199,47,34,176,194,34],"23466355",[201,47,34,176,197,34],"23466443",[143,47,47,179,144,34],[147,47,47,204,81,34],"project\u002Fneutral\u002Fnone",[206,35,47,171,207,34],"23463861","dpenguin",[209,35,34,210,211,34],"23465496","other\u002Fneutral\u002Fnone","jddj",[213,40,47,171,214,34],"23469425","eqvinox",[216,32,40,186,217,34],"23453716","fomojola",[219,220,47,221,222,34],"23464011",7,"project\u002Fneutral\u002Fprivacy","tn1",[224,220,47,225,85,34],"23465943","project\u002Fneutral\u002Fdocs",[227,228,34,210,229,34],"23466009",8,"jonahbenton",[231,232,43,233,234,34],"23464039",9,"project\u002Fcritical\u002Fidea","mishoo",[236,232,34,210,237,34],"23464376","hnlmorg",[239,232,34,210,240,34],"23464822","lispm",[242,232,34,176,237,34],"23465797",[244,232,34,176,240,34],"23467434",[246,232,34,176,237,34],"23467671",[248,232,34,176,240,34],"23471140",[250,232,34,176,237,34],"23471969",[252,232,34,176,240,34],"23482842",[254,232,34,176,237,34],"23490190",[84,167,40,186,85,34],[136,167,34,210,137,34],[258,167,34,210,85,34],"23466791",[260,33,34,210,261,34],"23465764","msravi",[263,33,34,210,264,34],"23465950","sk0g",[153,33,34,210,154,34],[267,33,34,210,85,34],"23465994",[119,269,47,171,120,34],12,[163,269,34,271,11,43],"maker\u002Fneutral\u002Fdesign",[273,274,40,275,276,34],"23467031",13,"project\u002Fpositive\u002Fexecution","jhallenworld",[278,274,34,176,279,34],"23467318","lunixbochs",[281,282,40,186,283,34],"23465097",14,"ktpsns",[285,282,34,176,286,34],"23465139","aargh_aargh",[288,282,34,176,283,34],"23466944",[290,291,34,210,292,34],"23465320",15,"VadimPR",[96,294,43,295,97,34],16,"project\u002Fcritical\u002Fprivacy",[128,294,34,297,129,34],"commenter\u002Fneutral\u002Fprivacy",[88,299,40,186,89,34],17,[301,302,47,225,303,34],"23465503",18,"andybak",[305,306,34,210,307,34],"23466538",19,"brockrockman",[100,309,43,295,101,34],20,[311,36,43,233,312,34],"23464601","jbverschoor",[314,36,34,210,315,34],"23464722","michaelmcmillan",[317,36,34,176,11,43],"23464957",[319,36,34,176,320,34],"23465083","0x0",[322,36,34,210,312,34],"23475564",[324,325,34,210,326,34],"23464127",22,"TedDoesntTalk",[328,325,34,176,329,34],"23466323","derision",[],[332,336,341,345,349,354],{"id":333,"name":334,"points":335,"category":20},"23420091","Grid.js",390,{"id":337,"name":338,"points":339,"category":340},"23418796","C0D3",261,"learning_science",{"id":342,"name":343,"points":344,"category":20},"23466506","topngx",219,{"id":346,"name":347,"points":348,"category":20},"23433290","Jqview",208,{"id":350,"name":351,"points":352,"category":353},"23448608","Puree",190,"security_privacy",{"id":355,"name":356,"points":357,"category":20},"23443430","Weylus",176,false,"v2",{"id":361,"name":5,"line":6,"ai":358,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":362,"top":18,"kw":363,"maker":11,"domain":10,"tier":19,"attempts":34,"strip":364,"url":9,"mix":365,"praise":76,"objection":93,"sub":21},23446123,0.07,[24,25,26,27,28],"3033500003335301000005000035050105010000",[32,33,34,35],1794036591734]