Skip to content

Commit

Permalink
go1.12 module support
Browse files Browse the repository at this point in the history
  • Loading branch information
qjerome committed Mar 21, 2019
1 parent c640206 commit df52c28
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 25 deletions.
5 changes: 5 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module github.com/0xrawsec/golang-win32

go 1.12

require github.com/0xrawsec/golang-utils v1.1.0
10 changes: 10 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
github.com/0xrawsec/golang-utils v1.1.0 h1:opQAwRONEfxOOl4nxhpPkXiTYgzAw0/wFATAffNjdII=
github.com/0xrawsec/golang-utils v1.1.0/go.mod h1:DADTtCFY10qXjWmUVhhJqQIZdSweaHH4soYUDEi8mj0=
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/sftp v1.10.0/go.mod h1:NxmoDg/QLVWluQDUYG7XBZTLUpKeFa8e3aMf1BfjyHk=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/tools v0.0.0-20190320215829-36c10c0a621f/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
7 changes: 0 additions & 7 deletions requirements.go

This file was deleted.

5 changes: 3 additions & 2 deletions win32/dbghelp/dbghelp.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ package dbghelp

import (
"syscall"
"win32"
"win32/kernel32"

"github.com/0xrawsec/golang-win32/win32"
"github.com/0xrawsec/golang-win32/win32/kernel32"
)

// MiniDumpWriteDump Win32 API wrapper, the three last args are skipped for the moment
Expand Down
3 changes: 2 additions & 1 deletion win32/kernel32/header.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ package kernel32
import (
"fmt"
"unsafe"
"win32"

"github.com/0xrawsec/golang-win32/win32"
)

const (
Expand Down
7 changes: 3 additions & 4 deletions win32/kernel32/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@ package kernel32
import (
"debug/pe"
"encoding/json"
"fmt"
"os"
"reflect"
"strings"
"syscall"
"time"

"fmt"
"reflect"
"win32"

"github.com/0xrawsec/golang-utils/log"
"github.com/0xrawsec/golang-win32/win32"
)

func ToJSON(data interface{}) string {
Expand Down
2 changes: 1 addition & 1 deletion win32/kernel32/kernel32.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package kernel32
import (
"syscall"
"unsafe"
"win32"

"github.com/0xrawsec/golang-utils/log"
"github.com/0xrawsec/golang-win32/win32"
)

// CloseHandle Win32 API wrapper
Expand Down
2 changes: 1 addition & 1 deletion win32/ntdll/headers.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package ntdll

import "win32"
import "github.com/0xrawsec/golang-win32/win32"

type PROCESS_BASIC_INFORMATION struct {
ExitStatus win32.NTSTATUS
Expand Down
4 changes: 1 addition & 3 deletions win32/ntdll/ntdll.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package ntdll

import (
"win32"
)
import "github.com/0xrawsec/golang-win32/win32"

// NtQueryInformationProcess Win32 API wrapper
// TODO: test it
Expand Down
3 changes: 2 additions & 1 deletion win32/user32/user32.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ package user32
import (
"syscall"
"unsafe"
"win32"

"github.com/0xrawsec/golang-win32/win32"
)

func MessageBox(hWnd win32.HWND, text, caption string, uType win32.UINT) (int, error) {
Expand Down
2 changes: 1 addition & 1 deletion win32/wevtapi/headers.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package wevtapi

import (
"fmt"
"win32"

"github.com/0xrawsec/golang-utils/log"
"github.com/0xrawsec/golang-win32/win32"
)

// Should be an enum _EVT_SUBSCRIBE_NOTIFY_ACTION
Expand Down
5 changes: 2 additions & 3 deletions win32/wevtapi/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ import (
"fmt"
"io"
"syscall"
"win32"
"win32/kernel32"

"github.com/0xrawsec/golang-utils/log"
"github.com/0xrawsec/golang-win32/win32"
"github.com/0xrawsec/golang-win32/win32/kernel32"
)


///////////////////////////////// XMLMap ///////////////////////////////////////
// Code adapted from source
// Source: https://stackoverflow.com/questions/30928770/marshall-map-to-xml-in-go#33110881
Expand Down
3 changes: 2 additions & 1 deletion win32/wevtapi/wevtapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ package wevtapi
import (
"syscall"
"unsafe"
"win32"

"github.com/0xrawsec/golang-win32/win32"
)

// EvtClose wrapper
Expand Down

0 comments on commit df52c28

Please sign in to comment.