tomnomnom/gf

Unable to install gf in kali

sedorf opened this issue · 1 comments

hello guys , hope someone here will help to resolve this issue :
i use kali linux and i unable to install gf with :

  • go install github.com/tomnomnom/gf@latest && cp ~/go/bin/gf /usr/local/bin/ && gf -h && mkdir ~/.gf && git clone https://github.com/Sherlock297/gf_patterns.git && cd gf_patterns/ && cp *.json ~/.gf && gf -list
    cp: cannot stat '/root/go/bin/gf': No such file or directory

  • go install github.com/tomnomnom/gf@latest
    ( gf is not installed )

then i try :

  • go get -u github.com/tomnomnom/gf
    ( the some issue i got )

the issue

w4cky commented

hi, this is my ansible template to install gf, it works pefect.

- hosts: scanners
  become: yes

 

  tasks:
  - name: check go version
    command: go version
    register: result
    changed_when: no
    ignore_errors: true


  - name: go get gogs
    shell: go install github.com/tomnomnom/gf@latest

  - name: Update .bashrc
    blockinfile:
      dest: "{{ ansible_env.HOME }}/.bashrc"
      block: |
          source $GOPATH/src/github.com/tomnomnom/gf/gf-completion.bash       
      marker: '# {mark} GF MANAGED BLOCK - RECONMORE_GF_INSTALL'
      insertbefore: EOF
      create: yes 

  - name: Update .zshrc
    blockinfile:
      dest: "{{ ansible_env.HOME }}/.zshrc"
      block: |
          source $GOPATH/src/github.com/tomnomnom/gf/gf-completion.bash       
      marker: '# {mark} GF MANAGED BLOCK - RECONMORE_GF_INSTALL'
      insertbefore: EOF
      create: yes 
 # - name: GF
 #   shell: mkdir -p ~/.gf && cp -r /root/go/src/github.com/tomnomnom/gf/examples ~/.gf

  - name: Clone GF-Patterns
    ansible.builtin.git:
      repo: https://github.com/1ndianl33t/Gf-Patterns
      dest: /tmp/gf/
  
  - name: mkdir .gf
    shell: mkdir ~/.gf/
  
  - name: copy to dst
    shell: mv /tmp/gf/*.json ~/.gf