ChannelFuture future = endpoint.start( new InetSocketAddress(port)); Runtime.getRuntime().addShutdownHook(new Thread() { @Override public void run() { endpoint.destroy(); } }); future.channel().closeFuture().syncUninterruptibly(); } } 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11....
call_sync('snmp.init_v3_user') users = [] if cmd := get_users_cmd(): try: # This call will timeout if SNMP is not running res = subprocess.run(cmd, capture_output=True) users = [x.split()[-1].strip('\"') for x in res.stdout.decode().splitlines()] except Exception: ...
init_snmp("spine"); } else { /* report the error and quit spine */ die("ERROR: SNMP Library Version Mismatch (%s vs %s)",PACKAGE_VERSION,netsnmp_get_version()); } #else SPINE_LOG_DEBUG(("DEBUG: Issues with SNMP Header Version information, assuming old version of Net-SNMP...
package util import ( "gopkg.in/cheggaaa/pb.v2" "x-crack/models" "x-crack/logger" "x-crack/vars" "net" "sync" "fmt" ) var ( AliveAddr []models.IpAddr mutex sync.Mutex ) func init() { AliveAddr = make([]models.IpAddr, 0) } func CheckAlive(ipList []models.IpAddr) ([]...
packageutilimport("gopkg.in/cheggaaa/pb.v2""x-crack/models""x-crack/logger""x-crack/vars""net""sync""fmt")var( AliveAddr []models.IpAddr mutex sync.Mutex )funcinit(){ AliveAddr =make([]models.IpAddr,0) }funcCheckAlive(ipList []models.IpAddr)([]models.IpAddr){ logger.Log.Info...
package util import ( "gopkg.in/cheggaaa/pb.v2" "x-crack/models" "x-crack/logger" "x-crack/vars" "net" "sync" "fmt" ) var ( AliveAddr []models.IpAddr mutex sync.Mutex ) func init() { AliveAddr = make([]models.IpAddr, 0) } func CheckAlive(ipList []models.IpAddr) ([]...
package util import ( "gopkg.in/cheggaaa/pb.v2" "x-crack/models" "x-crack/logger" "x-crack/vars" "net" "sync" "fmt" ) var ( AliveAddr []models.IpAddr mutex sync.Mutex ) func init() { AliveAddr = make([]models.IpAddr, 0) } func CheckAlive(ipList []models.IpAddr) ([]...
package util import ( "gopkg.in/cheggaaa/pb.v2" "x-crack/models" "x-crack/logger" "x-crack/vars" "net" "sync" "fmt" ) var ( AliveAddr []models.IpAddr mutex sync.Mutex ) func init() { AliveAddr = make([]models.IpAddr, 0) } func CheckAlive(ipList []models.IpAddr) ([]...