Skip to content

Commit 832dbc8

Browse files
committed
✨ feat: First Upload
1 parent c4b18a9 commit 832dbc8

8 files changed

Lines changed: 1415 additions & 1 deletion

File tree

.github/workflows/packages.yml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
name: Build Packages
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- "v*"
8+
9+
jobs:
10+
build:
11+
name: Build (${{ matrix.target }})
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
include:
17+
- os: ubuntu-latest
18+
target: linux
19+
archive: gocrt-decoder-linux-amd64.zip
20+
bin_name: gocrt-decoder
21+
- os: windows-latest
22+
target: windows
23+
archive: gocrt-decoder-windows-amd64.zip
24+
bin_name: gocrt-decoder.exe
25+
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
30+
- name: Setup Go
31+
uses: actions/setup-go@v5
32+
with:
33+
go-version-file: go.mod
34+
35+
- name: Install Linux build dependencies
36+
if: runner.os == 'Linux'
37+
run: |
38+
sudo apt-get update
39+
sudo apt-get install -y libgl1-mesa-dev xorg-dev
40+
41+
- name: Install Windows build dependencies
42+
if: runner.os == 'Windows'
43+
uses: msys2/setup-msys2@v2
44+
with:
45+
msystem: MINGW64
46+
update: true
47+
install: >-
48+
mingw-w64-x86_64-gcc
49+
50+
- name: Add MinGW to PATH
51+
if: runner.os == 'Windows'
52+
shell: pwsh
53+
run: |
54+
Add-Content -Path $env:GITHUB_PATH -Value 'C:\msys64\mingw64\bin'
55+
56+
- name: Download dependencies
57+
run: go mod download
58+
59+
- name: Build and package (Linux)
60+
if: runner.os == 'Linux'
61+
env:
62+
CGO_ENABLED: "1"
63+
run: |
64+
mkdir -p dist/linux-amd64
65+
go build -o dist/linux-amd64/${{ matrix.bin_name }} .
66+
cp README.md LICENSE dist/linux-amd64/
67+
cd dist
68+
zip -r ${{ matrix.archive }} linux-amd64
69+
70+
- name: Build and package (Windows)
71+
if: runner.os == 'Windows'
72+
shell: pwsh
73+
env:
74+
CGO_ENABLED: "1"
75+
CC: gcc
76+
run: |
77+
New-Item -ItemType Directory -Path dist/windows-amd64 -Force | Out-Null
78+
go build -o dist/windows-amd64/${{ matrix.bin_name }} .
79+
Copy-Item README.md dist/windows-amd64/
80+
Copy-Item LICENSE dist/windows-amd64/
81+
Compress-Archive -Path dist/windows-amd64/* -DestinationPath dist/${{ matrix.archive }} -Force
82+
83+
- name: Upload package artifact
84+
uses: actions/upload-artifact@v4
85+
with:
86+
name: package-${{ matrix.target }}
87+
path: dist/${{ matrix.archive }}
88+
if-no-files-found: error
89+
90+
release:
91+
name: Publish Release
92+
needs: build
93+
if: startsWith(github.ref, 'refs/tags/')
94+
runs-on: ubuntu-latest
95+
permissions:
96+
contents: write
97+
98+
steps:
99+
- name: Download all artifacts
100+
uses: actions/download-artifact@v4
101+
with:
102+
path: dist
103+
merge-multiple: true
104+
105+
- name: Create GitHub Release
106+
uses: softprops/action-gh-release@v2
107+
with:
108+
files: dist/*.zip
109+
generate_release_notes: true

README.md

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,48 @@
11
# gocrt-decoder
2-
A lightweight Go utility to parse, decrypt, and export SecureCRT sessions to CSV.
2+
3+
Ferramenta em Go para ler sessões do SecureCRT, decriptar `Password V2` e exportar para CSV com GUI em Fyne.
4+
5+
## Requisitos
6+
7+
- Go 1.23+
8+
- Dependências do Fyne para Linux desktop (GTK/OpenGL)
9+
10+
## Executar
11+
12+
```bash
13+
go mod tidy
14+
go run .
15+
```
16+
17+
## Como usar
18+
19+
1. Clique em **Selecionar pasta** e escolha o diretório `Sessions` do SecureCRT.
20+
2. Clique em **Selecionar destino CSV** e escolha o arquivo de saída.
21+
3. Clique em **Exportar CSV**.
22+
23+
## CSV gerado
24+
25+
Colunas exportadas:
26+
27+
- `name`
28+
- `hostname`
29+
- `username`
30+
- `port`
31+
- `password` (decriptado quando possível)
32+
- `source_file`
33+
34+
## Build de pacotes (GitHub Actions)
35+
36+
- Workflow: `.github/workflows/packages.yml`
37+
- Gera pacotes `.zip` para:
38+
- Linux (`gocrt-decoder-linux-amd64.zip`)
39+
- Windows (`gocrt-decoder-windows-amd64.zip`)
40+
- Pode ser executado de duas formas:
41+
- Manualmente via **Actions > Build Packages > Run workflow**
42+
- Automaticamente ao criar/push de tag `v*` (ex: `v1.0.0`)
43+
- Em tags `v*`, também publica os `.zip` na página de **Releases**.
44+
45+
## Créditos
46+
47+
- Leonardo Berbert
48+
- Repositório: https://github.com/leoberbert/gocrt-decoder

go.mod

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
module github.com/leoberbert/gocrt-decoder
2+
3+
go 1.23
4+
5+
require fyne.io/fyne/v2 v2.5.2
6+
7+
require (
8+
fyne.io/systray v1.11.0 // indirect
9+
github.com/BurntSushi/toml v1.4.0 // indirect
10+
github.com/davecgh/go-spew v1.1.1 // indirect
11+
github.com/fredbi/uri v1.1.0 // indirect
12+
github.com/fsnotify/fsnotify v1.7.0 // indirect
13+
github.com/fyne-io/gl-js v0.0.0-20220119005834-d2da28d9ccfe // indirect
14+
github.com/fyne-io/glfw-js v0.0.0-20240101223322-6e1efdc71b7a // indirect
15+
github.com/fyne-io/image v0.0.0-20220602074514-4956b0afb3d2 // indirect
16+
github.com/go-gl/gl v0.0.0-20211210172815-726fda9656d6 // indirect
17+
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20240506104042-037f3cc74f2a // indirect
18+
github.com/go-text/render v0.2.0 // indirect
19+
github.com/go-text/typesetting v0.2.0 // indirect
20+
github.com/godbus/dbus/v5 v5.1.0 // indirect
21+
github.com/gopherjs/gopherjs v1.17.2 // indirect
22+
github.com/jeandeaual/go-locale v0.0.0-20240223122105-ce5225dcaa49 // indirect
23+
github.com/jsummers/gobmp v0.0.0-20151104160322-e2ba15ffa76e // indirect
24+
github.com/nicksnyder/go-i18n/v2 v2.4.0 // indirect
25+
github.com/pmezard/go-difflib v1.0.0 // indirect
26+
github.com/rymdport/portal v0.2.6 // indirect
27+
github.com/srwiley/oksvg v0.0.0-20221011165216-be6e8873101c // indirect
28+
github.com/srwiley/rasterx v0.0.0-20220730225603-2ab79fcdd4ef // indirect
29+
github.com/stretchr/testify v1.8.4 // indirect
30+
github.com/yuin/goldmark v1.7.1 // indirect
31+
golang.org/x/image v0.18.0 // indirect
32+
golang.org/x/mobile v0.0.0-20231127183840-76ac6878050a // indirect
33+
golang.org/x/net v0.25.0 // indirect
34+
golang.org/x/sys v0.20.0 // indirect
35+
golang.org/x/text v0.16.0 // indirect
36+
gopkg.in/yaml.v3 v3.0.1 // indirect
37+
)

0 commit comments

Comments
 (0)