Compilando o Golang 1.1.2 no Debian 7 x86-64 netinstall

Fazendo PoC (Proof of concept) compilando o Golang 1.1.2 no Debian 7 x86-64 netinstall:

Passo 1:
Fazer o download do sources do Golang 1.1.2 em:
https://code.google.com/p/go/downloads/list

Passo 2:
Pre-requisitos para build:
apt-get install gcc libc6-dev libc6-dev-i386 make markdown build-essential debhelper dh-make fakeroot devscripts -y

Passo 3:
Instalar Golang via source :
tar -C /usr/local -xzf go1.1.2.src.tar.gz ; cd /usr/local/go/src
GOARCH=amd64 ./all.bash ; sudo GOARCH=386 ./all.bash

Passo 4:
Adicionar variáveis de ambiente no /etc/profile a linhas e faça logoff no terminal:
export GOROOT=”/usr/local/go”
export PATH=”$GOROOT/bin:$PATH”

Passo 5:
$go version

Screenshoot:

Screenshot - 10112013 - 01:33:29 PM

 

No próximo post vou tentar fazer um web crawler em golang:)

@firebitsbr

List of bug bounty programs

Fonte: https://bugcrowd.com/list-of-bug-bounty-programs/

PRODUCTS AND SERVICES (REWARD OFFERED)

PRODUCT AND SERVICES (HALL OF FAME + SWAG)

PRODUCT AND SERVICES (HALL OF FAME ONLY)

PRODUCTS AND SERVICES (NO REWARD)

BROKERS AND SECURITY COMPANIES

ToLower e ToUpper em Golang

http://play.golang.org/p/Ood6hZwPFB

package main

import (
“bytes”
“fmt”
“unicode”
)

func SwapCase(str string) string {
b := new(bytes.Buffer)

for _, r := range str {
if unicode.IsUpper(r) {
b.WriteRune(unicode.ToLower(r))
} else {
b.WriteRune(unicode.ToUpper(r))
}
}

return b.String()
}

func main() {
fmt.Println(SwapCase(“mauro risonho de paula assumpção.”))
}

Observando alguns erros nos “imports” remotos via Github para Golang

Criei uma VM em virtualbox, para me aprofundar nos estudos sobre Golang :

http://golang.org/

https://pt.wikipedia.org/wiki/Go_(linguagem_de_programa%C3%A7%C3%A3o)

https://en.wikipedia.org/wiki/Go_(programming_language)

E tive alguns problemas que podem ajudar que está também vendo isso:

root@go-hacking:~/go-hacking# go get github.com/hoisie/web
# cd .; hg clone -U https://code.google.com/p/go.net /usr/lib/go/src/pkg/code.google.com/p/go.net
package github.com/hoisie/web
imports code.google.com/p/go.net/websocket: exec: “hg”: executable file not found in $PATH
root@go-hacking:~/go-hacking# apt-get install hg -y
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package hg

Repare que há alguns sinais para entender melhor os erros, como “E: Unable to locate package hg” e “# cd .; hg clone -U https://code.google.com/p/go.net /usr/lib/go/src/pkg/code.google.com/p/go.net” sendo que hg é um comando de controle de repositórios em Mercurial(hg), então, deve-se instalar o mesmo:

root@go-hacking:~/go-hacking# apt-get install mercurial -y
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
mercurial-common
Suggested packages:
qct kdiff3 kdiff3-qt kompare meld xxdiff tkcvs mgdiff python-mysqldb python-pygments python-openssl
The following NEW packages will be installed:
mercurial mercurial-common
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 2.413 kB of archives.
After this operation, 8.067 kB of additional disk space will be used.
Get:1 http://ftp.br.debian.org/debian/ wheezy/main mercurial-common all 2.2.2-3 [2.320 kB]
Get:2 http://ftp.br.debian.org/debian/ wheezy/main mercurial amd64 2.2.2-3 [93,1 kB]
Fetched 2.413 kB in 8s (271 kB/s)
Selecting previously unselected package mercurial-common.
(Reading database … 76402 files and directories currently installed.)
Unpacking mercurial-common (from …/mercurial-common_2.2.2-3_all.deb) …
Selecting previously unselected package mercurial.
Unpacking mercurial (from …/mercurial_2.2.2-3_amd64.deb) …
Processing triggers for man-db …
Setting up mercurial-common (2.2.2-3) …
Setting up mercurial (2.2.2-3) …

Creating config file /etc/mercurial/hgrc.d/hgext.rc with new version

root@go-hacking:~/go-hacking# go get github.com/hoisie/web
root@go-hacking:~/go-hacking#

Pronto!  Nenhum erro mais de instalação!:)

@firebitsbr