language stringlengths 0 24 | filename stringlengths 9 214 | code stringlengths 99 9.93M |
|---|---|---|
YAML | beef/spec/support/browserstack/windows/win10/win10_edge_81.config.yml | server: "hub-cloud.browserstack.com"
common_caps:
"build": "Windows 10 Edge 81"
"project": "BeEF"
"browserstack.local": true
"browserstack.video": false
browser_caps:
-
"browser": "edge"
"browser_version": "81.0"
"os": "windows"
"os_version": "10" |
YAML | beef/spec/support/browserstack/windows/win10/win10_firefox_32.config.yml | server: "hub-cloud.browserstack.com"
common_caps:
"build": "Windows 10 Firefox 32"
"project": "BeEF"
"browserstack.local": true
"browserstack.video": false
browser_caps:
-
"browser": "firefox"
"browser_version": "32.0"
"os": "windows"
"os_version": "10" |
YAML | beef/spec/support/browserstack/windows/win10/win10_firefox_68esr.config.yml | server: "hub-cloud.browserstack.com"
common_caps:
"build": "Windows 10 Firefox 68 ESR"
"project": "BeEF"
"browserstack.local": true
"browserstack.video": false
browser_caps:
-
"browser": "firefox"
"browser_version": "68.0"
"os": "windows"
"os_version": "10" |
YAML | beef/spec/support/browserstack/windows/win10/win10_firefox_75.config.yml | server: "hub-cloud.browserstack.com"
common_caps:
"build": "Windows 10 Firefox 75"
"project": "BeEF"
"browserstack.local": true
"browserstack.video": false
browser_caps:
-
"browser": "firefox"
"browser_version": "75.0"
"os": "windows"
"os_version": "10" |
YAML | beef/spec/support/browserstack/windows/win10/win10_ie_11.config.yml | server: "hub-cloud.browserstack.com"
common_caps:
"build": "Windows 10 IE 11"
"project": "BeEF"
"browserstack.local": true
"browserstack.video": false
browser_caps:
-
"browser": "internet explorer"
"browser_version": "11.0"
"os": "windows"
"os_version": "10" |
YAML | beef/spec/support/browserstack/windows/win8/win8_chrome_22.config.yml | server: "hub-cloud.browserstack.com"
common_caps:
"build": "Windows 8 Chrome 22"
"project": "BeEF"
"browserstack.local": true
"browserstack.video": false
browser_caps:
-
"browser": "chrome"
"browser_version": "22.0"
"os": "windows"
"os_version": "8" |
YAML | beef/spec/support/browserstack/windows/win8/win8_chrome_81.config.yml | server: "hub-cloud.browserstack.com"
common_caps:
"build": "Windows 8 Chrome 81"
"project": "BeEF"
"browserstack.local": true
"browserstack.video": false
browser_caps:
-
"browser": "chrome"
"browser_version": "81.0"
"os": "windows"
"os_version": "8" |
YAML | beef/spec/support/browserstack/windows/win8/win8_edge_81.config.yml | server: "hub-cloud.browserstack.com"
common_caps:
"build": "Windows 8 Edge 81"
"project": "BeEF"
"browserstack.local": true
"browserstack.video": false
browser_caps:
-
"browser": "edge"
"browser_version": "81.0"
"os": "windows"
"os_version": "8" |
YAML | beef/spec/support/browserstack/windows/win8/win8_firefox_32.config.yml | server: "hub-cloud.browserstack.com"
common_caps:
"build": "Windows 8 Firefox 32"
"project": "BeEF"
"browserstack.local": true
"browserstack.video": false
browser_caps:
-
"browser": "firefox"
"browser_version": "32.0"
"os": "windows"
"os_version": "8" |
YAML | beef/spec/support/browserstack/windows/win8/win8_firefox_75.config.yml | server: "hub-cloud.browserstack.com"
common_caps:
"build": "Windows 8 Firefox 75"
"project": "BeEF"
"browserstack.local": true
"browserstack.video": false
browser_caps:
-
"browser": "firefox"
"browser_version": "75.0"
"os": "windows"
"os_version": "8" |
YAML | beef/spec/support/browserstack/windows/win8/win8_ie_10.config.yml | server: "hub-cloud.browserstack.com"
common_caps:
"build": "Windows 8 IE 10"
"project": "BeEF"
"browserstack.local": true
"browserstack.video": false
browser_caps:
-
"browser": "internet explorer"
"browser_version": "10.0"
"os": "windows"
"os_version": "8" |
YAML | beef/spec/support/browserstack/windows/xp/xp_chrome_14.config.yml | server: "hub-cloud.browserstack.com"
common_caps:
"build": "Windows XP Chrome 14"
"project": "BeEF"
"browserstack.local": true
"browserstack.video": false
browser_caps:
-
"browser": "chrome"
"browser_version": "14.0"
"os": "windows"
"os_version": "xp" |
YAML | beef/spec/support/browserstack/windows/xp/xp_chrome_28.config.yml | server: "hub-cloud.browserstack.com"
common_caps:
"build": "Windows XP Chrome 28"
"project": "BeEF"
"browserstack.local": true
"browserstack.video": false
browser_caps:
-
"browser": "chrome"
"browser_version": "28.0"
"os": "windows"
"os_version": "xp" |
YAML | beef/spec/support/browserstack/windows/xp/xp_chrome_43.config.yml | server: "hub-cloud.browserstack.com"
common_caps:
"build": "Windows XP Chrome 43"
"project": "BeEF"
"browserstack.local": true
"browserstack.video": false
browser_caps:
-
"browser": "chrome"
"browser_version": "43.0"
"os": "windows"
"os_version": "xp" |
YAML | beef/spec/support/browserstack/windows/xp/xp_firefox_16.config.yml | server: "hub-cloud.browserstack.com"
common_caps:
"build": "Windows XP Firefox 16"
"project": "BeEF"
"browserstack.local": true
"browserstack.video": false
browser_caps:
-
"browser": "firefox"
"browser_version": "16.0"
"os": "windows"
"os_version": "xp" |
YAML | beef/spec/support/browserstack/windows/xp/xp_firefox_26.config.yml | server: "hub-cloud.browserstack.com"
common_caps:
"build": "Windows XP Firefox 26"
"project": "BeEF"
"browserstack.local": true
"browserstack.video": false
browser_caps:
-
"browser": "firefox"
"browser_version": "26.0"
"os": "windows"
"os_version": "xp" |
YAML | beef/spec/support/browserstack/windows/xp/xp_firefox_45.config.yml | server: "hub-cloud.browserstack.com"
common_caps:
"build": "Windows XP Firefox 45"
"project": "BeEF"
"browserstack.local": true
"browserstack.video": false
browser_caps:
-
"browser": "firefox"
"browser_version": "45.0"
"os": "windows"
"os_version": "xp" |
YAML | beef/spec/support/browserstack/windows/xp/xp_ie_7.config.yml | server: "hub-cloud.browserstack.com"
common_caps:
"build": "Windows XP IE 7"
"project": "BeEF"
"browserstack.local": true
"browserstack.video": false
browser_caps:
-
"browser": "internet explorer"
"browser_version": "7.0"
"os": "windows"
"os_version": "xp" |
Ruby | beef/test/integration/check_environment.rb | #
# Copyright (c) 2006-2023 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
require 'test/unit'
class TC_CheckEnvironment < Test::Unit::TestCase
def test_check_env
# Add environment checks here
end
end |
Ruby | beef/test/integration/tc_debug_modules.rb | #
# Copyright (c) 2006-2023 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
require 'test/unit'
require 'rest-client'
require 'json'
require '../common/test_constants'
require '../common/beef_test'
class TC_DebugMod... |
Ruby | beef/test/integration/tc_dns_rest.rb | #
# Copyright (c) 2006-2023 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
require 'test/unit'
require 'rest-client'
require 'json'
require '../common/test_constants'
class TC_DnsRest < Test::Unit::TestCase
clas... |
Ruby | beef/test/integration/tc_login.rb | #
# Copyright (c) 2006-2023 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
require 'test/unit'
require '../common/test_constants'
require '../common/beef_test'
require 'rspec/expectations'
class TC_Login < Test::Un... |
Ruby | beef/test/integration/tc_network_rest.rb | #
# Copyright (c) 2006-2023 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
require 'test/unit'
require 'rest-client'
require 'json'
require '../common/test_constants'
class TC_NetworkRest < Test::Unit::TestCase
... |
Ruby | beef/test/integration/tc_proxy.rb | #
# Copyright (c) 2006-2023 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
require 'test/unit'
require 'rest-client'
require 'json'
require '../common/test_constants'
require '../common/beef_test'
class TC_Proxy < ... |
Ruby | beef/test/integration/tc_social_engineering_rest.rb | #
# Copyright (c) 2006-2023 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
require 'test/unit'
require 'rest-client'
require 'json'
require '../common/test_constants'
# @todo RESTful API for the social engineering ... |
Ruby | beef/test/integration/tc_webrtc_rest.rb | #
# Copyright (c) 2006-2023 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
require 'test/unit'
require 'rest-client'
require 'json'
require '../common/test_constants'
require '../common/beef_test'
class TC_WebRTCRe... |
Ruby | beef/test/integration/ts_integration.rb | #
# Copyright (c) 2006-2023 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
# Common lib for BeEF tests
require '../common/ts_common'
require 'capybara'
require 'capybara/rspec'
Capybara.run_server = false # we nee... |
Ruby | beef/test/thirdparty/msf/unit/check_environment.rb | #
# Copyright (c) 2006-2023 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
require 'test/unit'
class TC_CheckEnvironment < Test::Unit::TestCase
def test_check_env
# Add environment checks here
end
end |
Ruby | beef/test/thirdparty/msf/unit/tc_metasploit.rb | #
# Copyright (c) 2006-2023 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
require 'test/unit'
require 'pp'
class TC_Metasploit < Test::Unit::TestCase
def setup
$root_dir="../../../../"
$:.unshift File.j... |
Ruby | beef/test/thirdparty/msf/unit/ts_metasploit.rb | #
# Copyright (c) 2006-2023 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
# Common lib for BeEF tests
require '../../../common/ts_common'
begin
require 'msfrpc-client'
rescue LoadError
puts "The following ins... |
Shell Script | beef/tools/bump-version.sh | #!/usr/bin/env bash
if [[ -z "${1}" || -z "${2}" ]]; then
echo "Error: missing arguments"
exit 1
fi
if [[ ! -f beef || ! -f VERSION ]]; then
echo "Error: must be run from within the BeEF root directory"
exit 1
fi
echo "Updating version ${1} to ${2}"
git checkout -b "release/${2}"
sed -i '' -e "s/$1/$2/g" VE... |
beef/tools/csrf_to_beef/csrf_to_beef | #!/usr/bin/env ruby
$VERBOSE = false
$VERSION = '0.0.3'
#
# @note Ruby version check
#
if RUBY_VERSION =~ /^1\.[0-8]/
puts "Ruby version " + RUBY_VERSION + " is not supported. Please use Ruby 1.9 or newer."
exit 1
end
require 'uri'
require 'getoptlong'
require 'fileutils'
require 'htmlentities'
require 'cgi'
req... | |
HTML | beef/tools/csrf_to_beef/sample.html | <html>
<!-- CSRF PoC - generated by Burp Suite Professional -->
<body>
<form action="http://127.0.0.1/index.php?query=example" method="POST" enctype="multipart/form-data">
<input type="hidden" name="value1" value="Example value #1"/>
<input type="hidden" name="value2" value="Example value #2"/>
<input type=... |
Ruby | beef/tools/csrf_to_beef/lib/module.rb | #
# @note Module configuration file 'config.yaml'
#
class ConfigFile
def generate(class_name)
return <<-EOF
#
# Copyright (c) 2006-2023 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
beef:
module:
... |
Ruby | beef/tools/csrf_to_beef/lib/output.rb | #
# @note Add color to String object
#
class String
def colorize(color_code)
"\e[#{color_code}m#{self}\e[0m"
end
{:red => 31,
:green => 32,
:yellow => 33,
:blue => 34,
:pink => 35,
:cyan => 36,
:white => 37
}.each { |color, code|
define_method(color) { colorize(code) }
}
end
#
# @n... |
beef/tools/rest_api_examples/autorun | #!/usr/bin/env ruby
# browser-details - Example BeEF RESTful API script
# Retrieves all Autorun rules, adds a rule, runs it on all online browsers, then deletes it
# Refer to the wiki for info: https://github.com/beefproject/beef/wiki/BeEF-RESTful-API
##
require 'rest-client'
require 'json'
require 'optparse'
require '... | |
beef/tools/rest_api_examples/browser-details | #!/usr/bin/env ruby
# browser-details - Example BeEF RESTful API script
# Retrieves browser details and logs for all online hooked browsers
# Refer to the wiki for info: https://github.com/beefproject/beef/wiki/BeEF-RESTful-API
##
require 'rest-client'
require 'json'
require 'optparse'
require 'pp'
require './lib/strin... | |
beef/tools/rest_api_examples/clone_page | #!/usr/bin/env ruby
# clone_page - Example BeEF RESTful API script
# Clone a web page and mount it locally
# Refer to the wiki for info: https://github.com/beefproject/beef/wiki/BeEF-RESTful-API
##
require 'rest-client'
require 'json'
require 'optparse'
require 'pp'
require './lib/string' # colored strings
require './l... | |
beef/tools/rest_api_examples/command-modules | #!/usr/bin/env ruby
# command-modules - Example BeEF RESTful API script
# Retrieves module details and pops an alert dialog on all hooked browsers
# Refer to the wiki for info: https://github.com/beefproject/beef/wiki/BeEF-RESTful-API
##
require 'rest-client'
require 'json'
require 'optparse'
require 'pp'
require './li... | |
beef/tools/rest_api_examples/dns | #!/usr/bin/env ruby
# dns - Example BeEF RESTful API script
# Retrieves DNS rule set
# Refer to the wiki for info: https://github.com/beefproject/beef/wiki/BeEF-RESTful-API
##
require 'rest-client'
require 'json'
require 'optparse'
require 'pp'
require './lib/string' # colored strings
require './lib/print' # print wra... | |
beef/tools/rest_api_examples/export-logs | #!/usr/bin/env ruby
# export-logs - Example BeEF RESTful API script
# Retrieves BeEF logs and logs for all online hooked browsers
# Refer to the wiki for info: https://github.com/beefproject/beef/wiki/BeEF-RESTful-API
##
require 'rest-client'
require 'json'
require 'optparse'
require 'pp'
require './lib/string' # color... | |
beef/tools/rest_api_examples/metasploit | #!/usr/bin/env ruby
# metasploit - Example BeEF RESTful API script
# Starts some Metasploit payload handlers;
# lists all running metasploit jobs;
# then stops the payload handlers.
# Refer to the wiki for info: https://github.com/beefproject/beef/wiki/BeEF-RESTful-API
##
require 'rest-client'
require 'json'
require 'o... | |
beef/tools/rest_api_examples/network | #!/usr/bin/env ruby
# network - Example BeEF RESTful API script
# Retrieves details for all identified network hosts and network services
# Refer to the wiki for info: https://github.com/beefproject/beef/wiki/BeEF-RESTful-API
##
require 'rest-client'
require 'json'
require 'optparse'
require 'pp'
require './lib/string'... | |
beef/tools/rest_api_examples/remove-offline-browsers | #!/usr/bin/env ruby
# remove-offline-browsers - Example BeEF RESTful API script
# Removes offline browsers from the database
# Refer to the wiki for info: https://github.com/beefproject/beef/wiki/BeEF-RESTful-API
##
require 'rest-client'
require 'json'
require 'optparse'
require 'pp'
require './lib/string' # colored st... | |
beef/tools/rest_api_examples/webrtc | #!/usr/bin/env ruby
# webrtc - Example BeEF RESTful API script
# Retrieves browser details and logs for all online hooked browsers
# Refer to the wiki for info: https://github.com/beefproject/beef/wiki/BeEF-RESTful-API
##
require 'rest-client'
require 'json'
require 'optparse'
require 'pp'
require './lib/string' # colo... | |
beef/tools/rest_api_examples/xssrays | #!/usr/bin/env ruby
# xssrays - Example BeEF RESTful API script
# Refer to the wiki for info: https://github.com/beefproject/beef/wiki/BeEF-RESTful-API
##
require 'rest-client'
require 'json'
require 'optparse'
require 'pp'
require './lib/string' # colored strings
require './lib/print' # print wrappers
require './lib/... | |
Ruby | beef/tools/rest_api_examples/lib/beef_rest_api.rb | class BeefRestAPI
# initialize
def initialize proto = 'https', host = '127.0.0.1', port = '3000', user = 'beef', pass = 'beef'
@user = user
@pass = pass
@url = "#{proto}://#{host}:#{port}/api/"
@token = nil
end
################################################################################
### BeEF core API
... |
Ruby | beef/tools/rest_api_examples/lib/print.rb | # print wrappers
def print_debug s
pp s if @debug
end
def print_verbose s
puts "[*] #{s}".gray if @verbose
end
def print_status s
puts "[*] #{s}".blue
end
def print_good s
puts "[+] #{s}".green
end
def print_error s
puts "[!] Error: #{s}".red
end |
Ruby | beef/tools/rest_api_examples/lib/string.rb | # colorise # https://stackoverflow.com/questions/1489183/colorized-ruby-output
class String
def black; "\033[30m#{self}\033[0m" end
def red; "\033[31m#{self}\033[0m" end
def green; "\033[32m#{self}\033[0m" end
def brown; "\033[33m#{self}\033[0m" end
def blue; "\033[34m#{s... |
bettercap/.gitignore | *.sw*
*.tar.gz
*.prof*
_example/config.js
pcaps
build
bettercap
bettercap.history
*.snap
*.snap.xdelta3
prime/
snap/
stage/
/snap
.idea | |
YAML | bettercap/.travis.yml | # Globals
language: go
go:
- 1.16.x
env:
global:
- VERSION=$(echo ${TRAVIS_BRANCH} | sed "s/\//_/g")
- OUTPUT="bettercap"
cache:
apt: true
# Includes
linux_deps: &linux_deps
os: linux
dist: bionic
addons:
apt:
packages:
- p7zip-full
- libpcap-dev
- libnetfilter-que... |
bettercap/bettercap.service | [Unit]
Description=bettercap api.rest service.
Documentation=https://bettercap.org
Wants=network.target
After=network.target
[Service]
Type=simple
PermissionsStartOnly=true
ExecStart=/usr/local/bin/bettercap -no-colors -eval "set events.stream.output /var/log/bettercap.log; api.rest on"
Restart=always
RestartSec=30
[... | |
Shell Script | bettercap/build.sh | #!/bin/bash
BUILD_FOLDER=build
VERSION=$(cat core/banner.go | grep Version | cut -d '"' -f 2)
bin_dep() {
BIN=$1
which $BIN > /dev/null || { echo "@ Dependency $BIN not found !"; exit 1; }
}
host_dep() {
HOST=$1
ping -c 1 $HOST > /dev/null || { echo "@ Virtual machine host $HOST not visible !"; exit 1... |
bettercap/Dockerfile | # build stage
FROM golang:1.16-alpine3.15 AS build-env
ENV SRC_DIR $GOPATH/src/github.com/bettercap/bettercap
RUN apk add --no-cache ca-certificates
RUN apk add --no-cache bash iptables wireless-tools build-base libpcap-dev libusb-dev linux-headers libnetfilter_queue-dev git
WORKDIR $SRC_DIR
ADD . $SRC_DIR
RUN make
... | |
bettercap/go.mod | module github.com/bettercap/bettercap
go 1.16
require (
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d
github.com/adrianmo/go-nmea v1.3.0
github.com/antchfx/jsonquery v1.1.4
github.com/antchfx/xpath v1.2.0 // indirect
github.com/bettercap/gatt v0.0.0-20210514133428-df6e615f2f67
github.com/bett... | |
bettercap/go.sum | github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d h1:licZJFw2RwpHMqeKTCYkitsPqHNxTmd4SNR5r94FGM8=
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo=
github.com/adrianmo/go-nmea v1.3.0 h1:BFrLRj/oIh+DYujIKpuQievq7X3NDHYq57kNgsfr2GY=
gith... | |
Markdown | bettercap/ISSUE_TEMPLATE.md | # Prerequisites
Please, before creating this issue make sure that you read the [README](https://github.com/bettercap/bettercap/blob/master/README.md), that you are running the [latest stable version](https://github.com/bettercap/bettercap/releases) and that you already searched [other issues](https://github.com/better... |
Markdown | bettercap/LICENSE.md | GNU GENERAL PUBLIC LICENSE
==========================
Version 3, 29 June 2007
Copyright © 2007 Free Software Foundation, Inc. <<https://www.fsf.org/>>
Everyone is permitted to copy and distribute verbatim copies of this license
document, but changing it is not allowed.
## Preamble
The GNU General Public... |
Go | bettercap/main.go | package main
import (
"fmt"
"io"
"os"
"strings"
"runtime"
"github.com/bettercap/bettercap/core"
"github.com/bettercap/bettercap/log"
"github.com/bettercap/bettercap/modules"
"github.com/bettercap/bettercap/session"
"github.com/evilsocket/islazy/str"
"github.com/evilsocket/islazy/tui"
)
func main() {
se... |
bettercap/Makefile | TARGET ?= bettercap
PACKAGES ?= core firewall log modules network packets session tls
PREFIX ?= /usr/local
GO ?= go
all: build
build: resources
$(GOFLAGS) $(GO) build -o $(TARGET) .
build_with_race_detector: resources
$(GOFLAGS) $(GO) build -race -o $(TARGET) .
resources: network/manuf.go
network/manuf... | |
bettercap/openwrt.makefile | include $(TOPDIR)/rules.mk
PKG_NAME:=bettercap
PKG_VERSION:=2.28
PKG_RELEASE:=2
GO_PKG:=github.com/bettercap/bettercap
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/bettercap/bettercap/tar.gz/v${PKG_VERSION}?
PKG_HASH:=5bde85117679c6ed8b5469a5271cdd5f7e541bd9187b8d0f26dee7... | |
Markdown | bettercap/README.md | <p align="center">
<img alt="BetterCap" src="https://raw.githubusercontent.com/bettercap/media/master/logo.png" height="140" />
<p align="center">
<a href="https://github.com/bettercap/bettercap/releases/latest"><img alt="Release" src="https://img.shields.io/github/release/bettercap/bettercap.svg?style=flat-squ... |
bettercap/release.stork | #!/usr/bin/env stork -f
git:changelog
version:file "core/banner.go"
version:from_user
git:create_tag $VERSION
docker:build "bettercap/bettercap", ".", $VERSION
docker:create_tag "bettercap/bettercap", $VERSION, "latest" | |
Markdown | bettercap/SECURITY.md | # Security Policy
## Supported Versions
Feature updates and security fixes are streamlined only to the latest version, make sure to check [the release page](https://github.com/bettercap/bettercap/releases) periodically.
## Reporting a Vulnerability
For non critical bugs and vulnerabilities feel free to open an issu... |
YAML | bettercap/.github/FUNDING.yml | # These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: evilsocket
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-nam... |
Shell Script | bettercap/builder/arm_builder.sh | #!/usr/bin/env bash
set -eu
PROGRAM="${1}"
shift
COMMAND="${*}"
IMAGE="https://downloads.raspberrypi.org/raspbian_lite/images/raspbian_lite-2020-02-14/2020-02-13-raspbian-buster-lite.zip"
GOLANG="https://golang.org/dl/go1.16.2.linux-armv6l.tar.gz"
REPO_DIR="${PWD}"
TMP_DIR="/tmp/builder"
MNT_DIR="${TMP_DIR}/mnt"
i... |
bettercap/builder/libusb.pc | prefix=c:/libusb
exec_prefix=${prefix}
libdir=${prefix}/MinGW64/static
includedir=${prefix}/include
Name: libusb-1.0
Description: C API for USB device access from Linux, Mac OS X, Windows, OpenBSD/NetBSD and Solaris userspace
Version: 1.0.18
Libs: -L${libdir} -lusb-1.0
Cflags: -I${includedir}/libusb-1.0 | |
Go | bettercap/caplets/caplet.go | package caplets
import (
"fmt"
"path/filepath"
"strings"
"github.com/evilsocket/islazy/fs"
)
type Script struct {
Path string `json:"path"`
Size int64 `json:"size"`
Code []string `json:"code"`
}
func newScript(path string, size int64) Script {
return Script{
Path: path,
Size: size,
Code: make([]s... |
Go | bettercap/caplets/env.go | package caplets
import (
"os"
"path/filepath"
"runtime"
"github.com/evilsocket/islazy/str"
"github.com/mitchellh/go-homedir"
)
const (
EnvVarName = "CAPSPATH"
Suffix = ".cap"
InstallArchive = "https://github.com/bettercap/caplets/archive/master.zip"
)
func getDefaultInstallBase() string {
if ru... |
Go | bettercap/caplets/manager.go | package caplets
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"sort"
"strings"
"sync"
"github.com/evilsocket/islazy/fs"
)
var (
cache = make(map[string]*Caplet)
cacheLock = sync.Mutex{}
)
func List() []*Caplet {
caplets := make([]*Caplet, 0)
for _, searchPath := range LoadPaths {
files, _ := fil... |
Go | bettercap/core/banner.go | package core
const (
Name = "bettercap"
Version = "2.32.0"
Author = "Simone 'evilsocket' Margaritelli"
Website = "https://bettercap.org/"
) |
Go | bettercap/core/banner_test.go | package core
import (
"regexp"
"testing"
)
func TestBannerName(t *testing.T) {
if Name != "bettercap" {
t.Fatalf("expected '%s', got '%s'", "bettercap", Name)
}
}
func TestBannerWebsite(t *testing.T) {
if Website != "https://bettercap.org/" {
t.Fatalf("expected '%s', got '%s'", "https://bettercap.org/", Webs... |
Go | bettercap/core/core.go | package core
import (
"os/exec"
"sort"
"github.com/evilsocket/islazy/str"
)
func UniqueInts(a []int, sorted bool) []int {
tmp := make(map[int]bool, len(a))
uniq := make([]int, 0, len(a))
for _, n := range a {
tmp[n] = true
}
for n := range tmp {
uniq = append(uniq, n)
}
if sorted {
sort.Ints(uniq)... |
Go | bettercap/core/core_android.go | // +build android
package core
func Shell(cmd string) (string, error) {
return Exec("/system/bin/sh", []string{"-c", cmd})
} |
Go | bettercap/core/core_test.go | package core
import (
"os"
"testing"
"github.com/evilsocket/islazy/fs"
)
func hasInt(a []int, v int) bool {
for _, n := range a {
if n == v {
return true
}
}
return false
}
func sameInts(a []int, b []int, ordered bool) bool {
if len(a) != len(b) {
return false
}
if ordered {
for i, v := range a... |
Go | bettercap/core/core_unix.go | // +build !windows,!android
package core
func Shell(cmd string) (string, error) {
return Exec("/bin/sh", []string{"-c", cmd})
} |
Go | bettercap/core/core_windows.go | package core
func Shell(cmd string) (string, error) {
return Exec("cmd.exe", []string{"/c", cmd})
} |
Go | bettercap/core/options.go | package core
import (
"flag"
)
type Options struct {
InterfaceName *string
Gateway *string
Caplet *string
AutoStart *string
Debug *bool
Silent *bool
NoColors *bool
NoHistory *bool
PrintVersion *bool
EnvFile *string
Commands *string
CpuProfile *strin... |
Go | bettercap/firewall/doc.go | // Package firewall contains the OS specific implementation of the FirewallManager interface.
package firewall |
Go | bettercap/firewall/firewall.go | package firewall
type FirewallManager interface {
IsForwardingEnabled() bool
EnableForwarding(enabled bool) error
EnableRedirection(r *Redirection, enabled bool) error
Restore()
} |
Go | bettercap/firewall/firewall_darwin.go | package firewall
import (
"bufio"
"fmt"
"io/ioutil"
"log"
"os"
"regexp"
"strings"
"github.com/bettercap/bettercap/core"
"github.com/bettercap/bettercap/network"
"github.com/evilsocket/islazy/str"
)
var (
sysCtlParser = regexp.MustCompile(`([^:]+):\s*(.+)`)
pfFilePath = fmt.Sprintf("/tmp/bcap_pf_%d.con... |
Go | bettercap/firewall/firewall_linux.go | package firewall
import (
"fmt"
"io/ioutil"
"os"
"strings"
"github.com/bettercap/bettercap/core"
"github.com/bettercap/bettercap/network"
"github.com/evilsocket/islazy/fs"
"github.com/evilsocket/islazy/str"
)
type LinuxFirewall struct {
iface *network.Endpoint
forwarding bool
redirections map[st... |
Go | bettercap/firewall/firewall_windows.go | package firewall
import (
"fmt"
"strings"
"github.com/bettercap/bettercap/core"
"github.com/bettercap/bettercap/network"
)
type WindowsFirewall struct {
iface *network.Endpoint
forwarding bool
redirections map[string]*Redirection
}
func Make(iface *network.Endpoint) FirewallManager {
firewall := &W... |
Go | bettercap/firewall/redirection.go | package firewall
import "fmt"
type Redirection struct {
Interface string
Protocol string
SrcAddress string
SrcPort int
DstAddress string
DstPort int
}
func NewRedirection(iface string, proto string, port_from int, addr_to string, port_to int) *Redirection {
return &Redirection{
Interface: iface,
... |
Go | bettercap/js/data.go | package js
import (
"bytes"
"compress/gzip"
"encoding/base64"
"github.com/robertkrimen/otto"
)
func btoa(call otto.FunctionCall) otto.Value {
varValue := base64.StdEncoding.EncodeToString([]byte(call.Argument(0).String()))
v, err := otto.ToValue(varValue)
if err != nil {
return ReportError("Could not conver... |
Go | bettercap/js/fs.go | package js
import (
"github.com/robertkrimen/otto"
"io/ioutil"
)
func readDir(call otto.FunctionCall) otto.Value {
argv := call.ArgumentList
argc := len(argv)
if argc != 1 {
return ReportError("readDir: expected 1 argument, %d given instead.", argc)
}
path := argv[0].String()
dir, err := ioutil.ReadDir(pat... |
Go | bettercap/js/http.go | package js
import (
"bytes"
"fmt"
"io"
"io/ioutil"
"net/http"
"net/url"
"strings"
"github.com/robertkrimen/otto"
)
type httpPackage struct {
}
type httpResponse struct {
Error error
Response *http.Response
Raw []byte
Body string
JSON interface{}
}
func (c httpPackage) Encode(s string) ... |
Go | bettercap/js/init.go | package js
import (
"github.com/evilsocket/islazy/log"
"github.com/evilsocket/islazy/plugin"
"github.com/robertkrimen/otto"
)
var NullValue = otto.Value{}
func ReportError(format string, args ...interface{}) otto.Value {
log.Error(format, args...)
return NullValue
}
func init() {
// TODO: refactor this in pac... |
Go | bettercap/js/log.go | package js
import (
"github.com/evilsocket/islazy/log"
"github.com/robertkrimen/otto"
)
func flog(call otto.FunctionCall) otto.Value {
for _, v := range call.ArgumentList {
log.Info("%s", v.String())
}
return otto.Value{}
}
func log_debug(call otto.FunctionCall) otto.Value {
for _, v := range call.ArgumentLi... |
Go | bettercap/js/random.go | package js
import (
"math/rand"
"net"
"github.com/bettercap/bettercap/network"
)
type randomPackage struct {
}
func (c randomPackage) String(size int, charset string) string {
runes := []rune(charset)
nrunes := len(runes)
buf := make([]rune, size)
for i := range buf {
buf[i] = runes[rand.Intn(nrunes)]
}
r... |
Go | bettercap/log/doc.go | // Package log contains a transparent interface for logging which interacts with the system event queue.
package log |
Go | bettercap/log/log.go | package log
import (
"github.com/bettercap/bettercap/session"
ll "github.com/evilsocket/islazy/log"
)
func Debug(format string, args ...interface{}) {
session.I.Events.Log(ll.DEBUG, format, args...)
}
func Info(format string, args ...interface{}) {
session.I.Events.Log(ll.INFO, format, args...)
}
func Warning(... |
Go | bettercap/modules/modules.go | package modules
import (
"github.com/bettercap/bettercap/modules/any_proxy"
"github.com/bettercap/bettercap/modules/api_rest"
"github.com/bettercap/bettercap/modules/arp_spoof"
"github.com/bettercap/bettercap/modules/ble"
"github.com/bettercap/bettercap/modules/c2"
"github.com/bettercap/bettercap/modules/caplets... |
Go | bettercap/modules/any_proxy/any_proxy.go | package any_proxy
import (
"fmt"
"github.com/bettercap/bettercap/firewall"
"github.com/bettercap/bettercap/session"
"github.com/evilsocket/islazy/str"
"strconv"
"strings"
)
type AnyProxy struct {
session.SessionModule
// not using map[int]*firewall.Redirection to preserve order
ports []int
redirectio... |
Go | bettercap/modules/api_rest/api_rest.go | package api_rest
import (
"context"
"fmt"
"net/http"
"sync"
"time"
"github.com/bettercap/bettercap/session"
"github.com/bettercap/bettercap/tls"
"github.com/bettercap/recording"
"github.com/gorilla/mux"
"github.com/gorilla/websocket"
"github.com/evilsocket/islazy/fs"
)
type RestAPI struct {
session.Se... |
Go | bettercap/modules/api_rest/api_rest_controller.go | package api_rest
import (
"crypto/subtle"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
"strconv"
"strings"
"github.com/bettercap/bettercap/session"
"github.com/gorilla/mux"
)
type CommandRequest struct {
Command string `json:"cmd"`
}
type APIResponse struct {
Success bool `json:"success"`
... |
Go | bettercap/modules/api_rest/api_rest_record.go | package api_rest
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"time"
"github.com/bettercap/recording"
"github.com/evilsocket/islazy/fs"
)
var (
errNotRecording = errors.New("not recording")
)
func (mod *RestAPI) errAlreadyRecording() error {
return fmt.Errorf("the module is already recording to %s", mo... |
Go | bettercap/modules/api_rest/api_rest_replay.go | package api_rest
import (
"errors"
"fmt"
"time"
"github.com/bettercap/recording"
"github.com/evilsocket/islazy/fs"
)
var (
errNotReplaying = errors.New("not replaying")
)
func (mod *RestAPI) errAlreadyReplaying() error {
return fmt.Errorf("the module is already replaying a session from %s", mod.recordFileNa... |
Go | bettercap/modules/api_rest/api_rest_ws.go | package api_rest
import (
"encoding/json"
"net/http"
"strings"
"time"
"github.com/bettercap/bettercap/session"
"github.com/gorilla/websocket"
)
const (
// Time allowed to write an event to the client.
writeWait = 10 * time.Second
// Time allowed to read the next pong message from the client.
pongWait = 60... |
Go | bettercap/modules/arp_spoof/arp_spoof.go | package arp_spoof
import (
"bytes"
"net"
"strings"
"sync"
"time"
"github.com/bettercap/bettercap/network"
"github.com/bettercap/bettercap/packets"
"github.com/bettercap/bettercap/session"
"github.com/malfunkt/iprange"
)
type ArpSpoofer struct {
session.SessionModule
addresses []net.IP
macs []ne... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.