Skip to content

Instantly share code, notes, and snippets.

@ddelazerda
ddelazerda / console.txt
Created February 20, 2020 00:09
ipmitool vs gebn/bmc
$ ipmitool -I lanplus -H 192.168.1.20 -U user -P password chassis status
System Power : on
Power Overload : false
Power Interlock : inactive
Main Power Fault : false
Power Control Fault : false
Power Restore Policy : always-on
Last Power Event : command
Chassis Intrusion : inactive
Front-Panel Lockout : inactive
@ddelazerda
ddelazerda / main.go
Created February 20, 2020 00:03
golang gebn/bmc library test
package main
import (
"context"
"fmt"
"github.com/gebn/bmc"
"github.com/gebn/bmc/pkg/ipmi"
"io"
"log"
"time"

Keybase proof

I hereby claim:

  • I am ddelazerda on github.
  • I am ddelazerda (https://keybase.io/ddelazerda) on keybase.
  • I have a public key whose fingerprint is 3A88 D985 C90C 36CC B20A CFBB 22E6 8AC5 A4D7 07B5

To claim this, I am signing this object:

diff --git a/authheader.go b/authheader.go
index 4ca6f1b..959a811 100644
--- a/authheader.go
+++ b/authheader.go
@@ -15,6 +15,11 @@ func (h authheader) IsNegotiate() bool {
return strings.HasPrefix(string(h), "Negotiate")
}
+func (h authheader) IsChallenge() bool {
+ p := strings.Split(string(h), " ")
@ddelazerda
ddelazerda / find_all_vms.go
Last active August 29, 2015 14:08
Traverses the vCenter and prints information for all VMs.
package main
import (
"fmt"
vim "govsphere/vim"
"io/ioutil"
"log"
)
type EntityProcessor func(*vim.ManagedEntity)
@ddelazerda
ddelazerda / panic.log
Created October 21, 2014 18:50
govsphere panic log
2014/10/21 14:34:14 ===========REQUEST===========
2014/10/21 14:34:14 POST /sdk HTTP/1.1
Host: myhost.com
User-Agent: govsphere/1.0
Content-Length: 663
Content-Type: text/xml; charset="utf-8"
Cookie: vmware_soap_session=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Soapaction: urn:vim25/5.0
Accept-Encoding: gzip
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff5928700 (LWP 25289)]
0x000000000043aa1e in govsphere/vim.(*PropertyValue).Value (pv=0xc21022a020, ~anon0=..., ~anon1=...) at /myworkspace/go/src/govsphere/vim/property_value.go:17
17 v := registry[pv.Type]()
(gdb) bt
#0 0x000000000043aa1e in govsphere/vim.(*PropertyValue).Value (pv=0xc2101ede80, ~anon0=..., ~anon1=...) at /myworkspace/go/src/govsphere/vim/property_value.go:17
#1 0x000000000043a7db in govsphere/vim.(*ManagedObject).currentProperty (mo=0xc21021c740, property=..., ~anon1=..., ~anon2=...) at /myworkspace/go/src/govsphere/vim/managed_object.go:71
#2 0x000000000047caa5 in govsphere/vim.(*Folder).ChildEntity (mo=0xc2101fae40, ~anon0=..., ~anon1=...) at /myworkspace/go/src/govsphere/vim/vim.go:20416
#3 0x0000000000400da7 in main.main () at /myworkspace/go/src/test/test.go:28
#4 0x000000000041585f in runtime.main () at /usr/local/go/src/pkg/runtime/proc.c:220
2014/10/14 14:19:34 ===========REQUEST===========
2014/10/14 14:19:34 POST /sdk HTTP/1.1
Host: myhost.com
User-Agent: govsphere/1.0
Content-Length: 702
Content-Type: text/xml; charset="utf-8"
Cookie: vmware_soap_session=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Soapaction: urn:vim25/5.0
Accept-Encoding: gzip
@ddelazerda
ddelazerda / multi_nmap_process.py
Created December 21, 2013 05:04
Simple example running multiple nmap scann processes
#!/usr/bin/env python
from libnmap.process import NmapProcess
from time import sleep
def make_nmproc_obj(targets, options):
return NmapProcess(targets=targets, options=options)
def start_all_bg(nmprocs):
for nmp in nmprocs: nmp.run_background()
@ddelazerda
ddelazerda / gist:6613604
Created September 18, 2013 18:41
DBICM 0.041 test failure on perl-5.16.3 CentOS 6.4
PERL_DL_NONLAZY=1 /home/daniel/perl5/perlbrew/perls/perl-5.16.3/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00-clean.t .................. ok
t/help.t ...................... skipped: DBICM_TEST_HELP not set
t/install-version-storage.t ... ok
t/migration-mysql.t ........... skipped: DBICM_TEST_MYSQL not set
t/migration-postgresql.t ...... skipped: DBICM_TEST_PG not set
t/migration-sqlite.t .......... 12/?
# Failed test 'found a fixture'
# at t/migration-sqlite.t line 75.
t/migration-sqlite.t .......... 13/?