Technical Documentation: malwaredllc/byob
โน๏ธ Provenance: Multi-Tier Ingestion ยท CodeWiki Reference
Overview (`README.md`)
Questions? Check out the docs or join our Discord support server
Disclaimer: This project should be used for authorized testing or educational purposes only.
BYOB is an open-source post-exploitation framework for students, researchers and developers. It includes features such as:
- Command & control server with intuitive user-interface
- Custom payload generator for multiple platforms
- 12 post-exploitation modules
It is designed to allow students and developers to easily implement their own code and add cool new
features without having to write a C2 server or Remote Administration Tool from scratch.
This project has 2 main parts: the original console-based application (/byob) and the web GUI (/web-gui).
Web GUI
Dashboard
A control panel for your C2 server with a point-and-click interface for executing post-exploitation modules. The control panel includes an interactive map of client machines and a dashboard which allows efficient, intuitive administration of client machines.
Payload Generator
The payload generator uses black magic involving Docker containers & Wine servers to compile executable payloads for any platform/architecture you select. These payloads spawn reverse TCP shells with communication over the network encrypted via AES-256 after generating a secure symmetric key using the Diffie-Hellman IKE.
Terminal Emulator
The web app includes an in-browser terminal emulator so you can still have direct shell access even when using the web GUI.
Console Application
Client
Generate fully-undetectable clients with staged payloads, remote imports, and unlimited post-exploitation modules
- Remote Imports: remotely import third-party packages from the server without writing them
to the disk or downloading/installing them - Nothing Written To The Disk: clients never write anything to the disk - not even temporary files (zero IO
system calls are made) because remote imports allow arbitrary code to be
dynamically loaded into memory and directly imported into the currently running
process - Zero Dependencies (Not Even Python Itself): client runs with just the python standard library, remotely imports any non-standard
packages/modules from the server, and can be compiled with a standalone python
interpreter into a portable binary executable formatted for any platform/architecture,
allowing it to run on anything, even when Python itself is missing on the target host - Add New Features With Just 1 Click: any python script, module, or package you copy to the
./byob/modules/directory
automatically becomes remotely importable & directly usable by every client while
your command & control server is running - Write Your Own Modules: a basic module template is provided in
./byob/modules/directory to make writing
your own modules a straight-forward, hassle-free process - Run Unlimited Modules Without Bloating File Size: use remote imports to add unlimited features without adding a single byte to the
client's file size - Fully Updatable: each client will periodically check the server for new content available for
remote import, and will dynamically update its in-memory resources
if anything has been added/removed - Platform Independent: everything is written in Python (a platform-agnostic language) and the clients
generated can optionally be compiled into a portable executable (Windows) or
bundled into a standalone application (macOS) - Bypass Firewalls: clients connect to the command & control server via reverse TCP connections, which
will bypass most firewalls because the default filter configurations primarily
block incoming connections - Counter-Measure Against Antivirus: avoids being analyzed by antivirus by blocking processes with names of known antivirus
products from spawning - Encrypt Payloads To Prevent Analysis: the main client payload is encrypted with a random 256-bit key which exists solely
in the payload stager which is generated along with it - Prevent Reverse-Engineering: by default, clients will abort execution if a virtual machine or sandbox is detected
Modules
Post-exploitation modules that are remotely importable by clients
- Persistence (
byob.modules.persistence): establish persistence on the host machine using 5 different methods - Packet Sniffer (
byob.modules.packetsniffer): run a packet sniffer on the host network & upload .pcap file - Escalate Privileges (
byob.modules.escalate): attempt UAC bypass to gain unauthorized administrator privileges - Port Scanner (
byob.modules.portscanner): scan the local network for other online devices & open ports - Keylogger (
byob.modules.keylogger): logs the userโs keystrokes & the window name entered - Screenshot (
byob.modules.screenshot): take a screenshot of current userโs desktop - Outlook (
byob.modules.outlook): read/search/upload emails from the local Outlook client - Process Control (
byob.modules.process): list/search/kill/monitor currently running processes on the host - iCloud (
byob.modules.icloud): check for logged in iCloud account on macOS
Server
Command & control server with persistent database and console
- Console-Based User-Interface: streamlined console interface for controlling client host machines remotely via
reverse TCP shells which provide direct terminal access to the client host machines - Persistent SQLite Database: lightweight database that stores identifying information about client host machines,
allowing reverse TCP shell sessions to persist through disconnections of arbitrary
duration and enabling long-term reconnaissance - Client-Server Architecture: all python packages/modules installed locally are automatically made available for clients
to remotely import without writing them to the disk of the target machines, allowing clients to use modules which require
packages not installed on the target machines
Core
Core framework modules used by the generator and the server
- Utilities (
byob.core.util): miscellaneous utility functions that are used by many modules - Security (
byob.core.security): Diffie-Hellman IKE & 3 encryption modes (AES-256-OCB, AES-256-CBC, XOR-128) - Loaders (
byob.core.loaders): remotely import any package/module/scripts from the server - Payloads (
byob.core.payloads): reverse TCP shell designed to remotely import dependencies, packages & modules - Stagers (
byob.core.stagers): generate unique payload stagers to prevent analysis & detection - Generators (
byob.core.generators): functions which all dynamically generate code for the client generator - DAO (
byob.core.dao): handles interaction between command & control server and the SQLite database - Handler (
byob.core.handler): HTTP POST request handler for remote file uploads to the server
To Do
Contributors welcome! Feel free to issue pull-requests with any new features or improvements you have come up with!
- Remote Import Encryption - encryption for data streams of packages/modules being remotely imported (to maintain confidentiality/authenticity/integrity and prevent any remote code execution vulnerabilities arising from deserialization)
- Transport Types - add support for more transport types (HTTP/S, DNS, etc.)
- Bug Fixes - fix any bugs/issues
Overview (`byob/README.md`)
BYOB CLI
These instructions help you solve some of the most common problems that may arise during the installation and use of BYOB CLI. However, if something does not work despite everything, before opening an issue try to ask on the Discord support server!
How to install
To install BYOB CLI run the setup.py file through your Python installation (Python3 is recommended): python3 setup.py. Done, it's that simple! However, there may be problems with your OS environment, and some cases are covered in the following sections.
Linux
Problems that can occur when installing BYOB in a Unix environment are, for example, missing packages or tools required to build these packages. Of course, you need to install Python3, to run the code, and Pip, to install the packages. Some of these require CMake to be installed, along with other system build tools. The following bash commands do essentially the same thing as the setup.py file but should cover all possible failure scenarios. Suppose we are root users.
$ git clone https://github.com/malwaredllc/byob.git
$ cd byob/byob/
# First, Python3
$ apt install python3.6 # 3.7, 3.8, 3.9 should also work
# Pip and OpenCV are also required
$ apt install python3-pip python3-opencv
# Tools to compile some packages like cryptonight and pyrx
$ apt install cmake build-essential python3-dev
# Upgrade Pip and install its tools
$ python3 -m pip install --upgrade pip setuptools wheel
# Finally, install all the requirements
$ python3 -m pip install -r requirements.txt
# Try if everything worked
$ python3 server.py --version
# Should print a float number (0.5, for example)macOS
macOS belongs to the Unix-BSD family, so there are not many differences from what is covered in the Linux section. Instead of apt, suppose to use Brew as package manager.
$ git clone https://github.com/malwaredllc/byob.git
$ cd byob/byob/
# Update Brew formulas
$ brew update
# Install latest Python3 version, along with Pip
$ brew install python
# Tools to compile some packages like cryptonight and pyrx
$ brew install cmake
# Upgrade Pip and install its tools
$ python3 -m pip install --upgrade pip setuptools wheel
# Finally, install all the requirements
$ python3 -m pip install -r requirements.txt
# Try if everything worked
$ python3 server.py --version
# Should print a float number (0.5, for example)Windows
Soon...
How to use
To use BYOB, you need to setup a Server and generate some Clients. The following instructions refer to a scenario where both are running on the same machine.
Server
Three parameters can be passed to the server.py file:
- --host: server hostname or IP address (i.e. 127.0.0.1, example.dns.com...);
- --port: on what port server should listen for incoming connection (i.e. 1337...);
- --db: custom path to a SQLite database file (i.e. database.db);
If none of these are specified, the server will use default parameters: python3 server.py.
Done, the server is now listening on 0.0.0.0:1337 and uses database.db as DB file.
Client
The client.py requires three positional arguments, host, port, and modules:
- host: server host address (hostname or IP address);
- port: port number where the server is listening;
- modules: the post-exploitation modules you want the payload to remotely import upon execution (default: all). Specifying only specific modules to import can lower memory footprint.
According to the server that is running on this machine, generate a client with the same parameters: python3 client.py 127.0.0.1 1337. This will generate a dropper, a stager, and a payload. Executing any of these to create a connection with the server will work, however, the dropper is just 1 line of code and remotely fetches everything it needs from the server, after the stager does some environment checks. For more detail, check the "How it works" page on the official website.
For this demo, let's take directly the payload, located in modules/clients/payloads/: its filename is shown on screen, and it's something like byob_xyz.py.
To execute: python3 byob_xyz.py. The client will connect to the server and... it's done!
Overview (`web-gui/README.md`)
Questions? Join the Discord support server
Disclaimer: This project should be used for authorized testing or educational purposes only.
BYOB is an open-source post-exploitation framework for students, researchers and developers. It includes features such as:
- Command & control server with intuitive user-interface
- Custom payload generator for multiple platforms
- 12 post-exploitation modules
It is designed to allow students and developers to easily implement their own code and add cool new
features without having to write a C2 server or Remote Administration Tool from scratch.
This project has 2 main parts: the original console-based application (/byob) and the web GUI (/web-gui).
Web GUI
Dashboard
A control panel for your C2 server with a point-and-click interface for executing post-exploitation modules. The control panel includes an interactive map of client machines and a dashboard which allows efficient, intuitive administration of client machines.
Payload Generator
The payload generator uses black magic involving Docker containers & Wine servers to compile executable payloads for any platform/architecture you select. These payloads spawn reverse TCP shells with communication over the network encrypted via AES-256 after generating a secure symmetric key using the Diffie-Hellman IKE.
Terminal Emulator
The web app includes an in-browser terminal emulator so you can still have direct shell access even when using the web GUI.
Overview (`byob/crosscomp/README.md`)
Introduction
The crosscomp or cross-compile module was crafted to enable the generation of payloads across multiple architectures at the same time, making creation of standalone executables for testing disparate systems easier to accomplish.
Requirements
This script was generated to be run on Debian systems. (Plans to add RHEL later.)
Core requirements are Docker, QEMU, and Python; more granular items are within the build-environment script.
Operating
Notes
- 'cd' into the crosscomp folder (this file should be in there)
- Check the arch.targets file, and remove any target architectures you don't care about.
- Add ones you do.
- Limitation: Script doesn't account for Windows at this time. Could be pretty easily ported later.
- The default architectures in arch.supported are the only ones I've tested, but so long as qemu has a static architecture file and docker has an image for it, then you should be able to map the architecture to the proper qemu binary. Match my syntax for ease.
- If you're wondering how the qemu-$arch-static and docker containers function, or if you would like to extend supported functionality;
- Add ones you do.
Steps
Note: the build_environment.sh script is in progress for python3 support. Any help would be appreciated.
- Run the build-environment.sh script with sudo or as root.
- This will probably take a while.
- The script will install dependencies, then check and build necessary docker containers
- After the script is finished, you will have a number of compile_* scripts matching arch.targets
- Run the compile_$arch scripts with sudo;
"sudo bash compile_$arch $byob_ip $byob_port $filename"- These scripts mount the byob directory to run
client.py --freezeagainst your target architecture with supplied arguments
- Upon completion of freeze, your standalone binary will be dropped into
"$byob_home/dist/$filename.$arch"
Overview (`web-gui/docker-pyinstaller/README.md`)
PyInstaller Docker Images
cdrx/pyinstaller-linux and cdrx/pyinstaller-windows are a pair of Docker containers to ease compiling Python applications to binaries / exe files.
Current PyInstaller version used: 3.6.
Tags
cdrx/pyinstaller-linux and cdrx/pyinstaller-windows both have two tags, :python2 and :python3 which you can use depending on the requirements of your project. :latest points to :python3
The :python2 tags run Python 2.7.
The :python3 tag runs Python 3.7.
Usage
There are two containers, one for Linux and one for Windows builds. The Windows builder runs Wine inside Ubuntu to emulate Windows in Docker.
To build your application, you need to mount your source code into the /src/ volume.
The source code directory should have your .spec file that PyInstaller generates. If you don't have one, you'll need to run PyInstaller once locally to generate it.
If the src folder has a requirements.txt file, the packages will be installed into the environment before PyInstaller runs.
For example, in the folder that has your source code, .spec file and requirements.txt:
docker run -v "$(pwd):/src/" cdrx/pyinstaller-windowswill build your PyInstaller project into dist/windows/. The .exe file will have the same name as your .spec file.
docker run -v "$(pwd):/src/" cdrx/pyinstaller-linuxwill build your PyInstaller project into dist/linux/. The binary will have the same name as your .spec file.
How do I install system libraries or dependencies that my Python packages need?
You'll need to supply a custom command to Docker to install system pacakges. Something like:
docker run -v "$(pwd):/src/" --entrypoint /bin/sh cdrx/pyinstaller-linux -c "apt-get update -y && apt-get install -y wget && /entrypoint.sh"Replace wget with the dependencies / package(s) you need to install.
How do I generate a .spec file?
docker run -v "$(pwd):/src/" cdrx/pyinstaller-linux "pyinstaller your-script.py"
will generate a spec file for your-script.py in your current working directory. See the PyInstaller docs for more information.
How do I change the PyInstaller version used?
Add pyinstaller=3.1.1 to your requirements.txt.
Is it possible to use a package mirror?
Yes, by supplying the PYPI_URL and PYPI_INDEX_URL environment variables that point to your PyPi mirror.
Known Issues
None
History
[1.0] - 2016-08-26
First release, works.
[1.1] - 2016-12-13
Added Python 3.4 on Windows, thanks to @bmustiata
[1.2] - 2016-12-13
Added Python 3.5 on Windows, thanks (again) to @bmustiata
[1.3] - 2017-01-23
Upgraded PyInstaller to version 3.2.1.
Thanks to @bmustiata for contributing:
- Custom PyPi URLs
- No longer need to supply a requirements.txt file if your project doesn't need it
- PyInstaller can be called directly, for e.g to generate a spec file
[1.4] - 2017-01-26
Fixed bug with concatenated commands in entrypoint arguments, thanks to @alph4
[1.5] - 2017-09-29
Changed the default PyInstaller version to 3.3
[1.6] - 2017-11-06
Added Python 3.6 on Windows, thanks to @jameshilliard
[1.7] - 2018-10-02
Bumped Python version to 3.6 on Linux, thank you @itouch5000
[1.8] - 2019-01-15
Build using an older version of glibc to improve compatibility, thank you @itouch5000
Updated PyInstaller to version 3.4
[1.9] - 2020-01-14
Added a 32bit package, thank you @danielguardicore
Updated PyInstaller to version 3.6
License
MIT
Overview (`web-gui/buildyourownbotnet/assets/js/ckeditor/README.md`)
CKEditor 4
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
http://ckeditor.com - See LICENSE.md for license information.
CKEditor is a text editor to be used inside web pages. It's not a replacement
for desktop text editors like Word or OpenOffice, but a component to be used as
part of web applications and websites.
Documentation
The full editor documentation is available online at the following address:
http://docs.ckeditor.com
Installation
Installing CKEditor is an easy task. Just follow these simple steps:
- Download the latest version from the CKEditor website:
http://ckeditor.com. You should have already completed this step, but be
sure you have the very latest version. - Extract (decompress) the downloaded file into the root of your website.
Note: CKEditor is by default installed in the ckeditor folder. You can
place the files in whichever you want though.
Checking Your Installation
The editor comes with a few sample pages that can be used to verify that
installation proceeded properly. Take a look at the samples directory.
To test your installation, just call the following page at your website:
http://<your site>/<CKEditor installation path>/samples/index.htmlFor example:
http://www.example.com/ckeditor/samples/index.htmlOverview (`web-gui/buildyourownbotnet/assets/js/codemirror/README.md`)
CodeMirror
CodeMirror is a JavaScript component that provides a code editor in
the browser. When a mode is available for the language you are coding
in, it will color your code, and optionally help with indentation.
The project page is http://codemirror.net
The manual is at http://codemirror.net/doc/manual.html
The contributing guidelines are in CONTRIBUTING.md
Overview (`web-gui/buildyourownbotnet/assets/js/daterangepicker/README.md`)
Date Range Picker for Bootstrap
This date range picker component for Bootstrap creates a dropdown menu from which a user can
select a range of dates. I created it while building the UI for Improvely,
which needed a way to select date ranges for reports.
If invoked with no options, it will present two calendars to choose a start
and end date from. Optionally, you can provide a list of date ranges the user can select from instead
of choosing dates from the calendars. If attached to a text input, the selected dates will be inserted
into the text box. Otherwise, you can provide a custom callback function to receive the selection.
The component can also be used as a single date picker by setting the singleDatePicker option to true.
View some examples or Try it in a live application
Usage
This component relies on Bootstrap,
Moment.js and jQuery.
Separate stylesheets are included for use with Bootstrap 2 or Bootstrap 3.
Basic usage:
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="moment.js"></script>
<script type="text/javascript" src="daterangepicker.js"></script>
<link rel="stylesheet" type="text/css" href="bootstrap.css" />
<link rel="stylesheet" type="text/css" href="daterangepicker-bs3.css" />
<script type="text/javascript">
$(document).ready(function() {
$('input[name="daterange"]').daterangepicker();
});
</script>The constructor also takes an optional options object and callback function. The function will be called whenever
the selected date range has been changed by the user, and is passed the start and end dates (moment date objects)
and the predefined range label chosen (if any), as parameters. It will not fire if the picker is closed without
any change to the selected dates.
$('input[name="daterange"]').daterangepicker(
{
format: 'YYYY-MM-DD',
startDate: '2013-01-01',
endDate: '2013-12-31'
},
function(start, end, label) {
alert('A date range was chosen: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD'));
}
);Options
startDate: (Date object, moment object or string) The start of the initially selected date range
endDate: (Date object, moment object or string) The end of the initially selected date range
minDate: (Date object, moment object or string) The earliest date a user may select
maxDate: (Date object, moment object or string) The latest date a user may select
dateLimit: (object) The maximum span between the selected start and end dates. Can have any property you can add to a moment object (i.e. days, months)
timeZone: (string or number) The timezone that will be used to display the startDate and endDate in the calendar. This may be a string such as "08:00" or an offset in minutes from Greenwich Mean Time. Uses Moment.js #utcOffset, see the docs here for more information. If the timeZone option is not set, the calendar will use the time zone set on the startDate that has been passed in through the options, if it has one. Defaults to the local time zone
showDropdowns: (boolean) Show year and month select boxes above calendars to jump to a specific month and year
showWeekNumbers: (boolean) Show week numbers at the start of each week on the calendars
timePicker: (boolean) Allow selection of dates with times, not just dates
timePickerIncrement: (number) Increment of the minutes selection list for times (i.e. 30 to allow only selection of times ending in 0 or 30)
timePicker12Hour: (boolean) Use 12-hour instead of 24-hour times, adding an AM/PM select box
timePickerSeconds: (boolean) Show seconds in the timePicker
ranges: (object) Set predefined date ranges the user can select from. Each key is the label for the range, and its value an array with two dates representing the bounds of the range
opens: (string: 'left'/'right'/'center') Whether the picker appears aligned to the left, to the right, or centered under the HTML element it's attached to
drops: (string: 'down' or 'up') Whether the picker opens below (default) or above the element it's attached to
buttonClasses: (array) CSS class names that will be added to all buttons in the picker
applyClass: (string) CSS class string that will be added to the apply button
cancelClass: (string) CSS class string that will be added to the cancel button
format: (string) Date/time format string used by moment when parsing or displaying the selected dates
separator: (string) Separator string to display between the start and end date when populating a text input the picker is attached to
locale: (object) Allows you to provide localized strings for buttons and labels, and the first day of week for the calendars
singleDatePicker: (boolean) Show only a single calendar to choose one date, instead of a range picker with two calendars; the start and end dates provided to your callback will be the same single date chosen
parentEl: (string) jQuery selector of the parent element that the date range picker will be added to, if not provided this will be 'body'
Functions
Several functions are provided for updating the picker's option and state after initialization:
setOptions(object, function): This function has the same signature and purpose as the date range picker's constructor: it sets the picker's options to their defaults, overrides them with any values in an options object you provide, and sets the callback for selection changes to whatever function you provide
setStartDate(Date/moment/string): Sets the date range picker's currently selected start date to the provided date
setEndDate(Date/moment/string): Sets the date range picker's currently selected end date to the provided date
Example usage:
//create a new date range picker
$('#daterange').daterangepicker({ startDate: '2014-03-05', endDate: '2014-03-06' });
//change the selected date range of that picker
$('#daterange').data('daterangepicker').setStartDate('2014-03-01');
$('#daterange').data('daterangepicker').setEndDate('2014-03-31');Events
Several events are triggered on the element you attach the picker to, which you can listen for:
show.daterangepicker: Triggered when the picker is shown
hide.daterangepicker: Triggered when the picker is hidden
showCalendar.daterangepicker: Triggered when the calendar is shown
hideCalendar.daterangepicker: Triggered when the calendar is hidden
apply.daterangepicker: Triggered when the apply button is clicked
cancel.daterangepicker: Triggered when the cancel button is clicked
Some applications need a "clear" instead of a "cancel" functionality, which can be achieved by changing the button label and watching for the cancel event:
$('#daterange').daterangepicker({
locale: { cancelLabel: 'Clear' }
});
$('#daterange').on('cancel.daterangepicker', function(ev, picker) {
//do something, like clearing an input
$('#daterange').val('');
});While passing in a callback to the constructor is the easiest way to listen for changes in the selected date range, you can also do something every time the apply button is clicked even if the selection hasn't changed:
$('#daterange').daterangepicker();
$('#daterange').on('apply.daterangepicker', function(ev, picker) {
console.log(picker.startDate.format('YYYY-MM-DD'));
console.log(picker.endDate.format('YYYY-MM-DD'));
});License
This code is made available under the same license as Bootstrap. Moment.js is included in this repository
for convenience. It is available under the MIT license.
--
The MIT License (MIT)
Copyright (c) 2012-2014 Dan Grossman
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Overview (`web-gui/buildyourownbotnet/assets/js/easy-pie-chart/Readme.md`)
easy-pie-chart
Lightweight plugin to render simple, animated and retina optimized pie charts
Features
- highly customizable
- very easy to implement
- resolution independent (retina optimized)
- uses
requestAnimationFramefor smooth animations on modern devices and - works in all modern browsers, even in IE7+ with excanvas
framework support
- Vanilla JS (no dependencies) (~872 bytes)
- jQuery plugin (~921 bytes)
- Angular Module (~983 bytes)
Get started
Installation
You can also use bower to install the component:
$ bower install jquery.easy-pie-chartjQuery
To use the easy pie chart plugin you need to load the current version of jQuery (> 1.6.4) and the source of the plugin.
<div class="chart" data-percent="73" data-scale-color="#ffb400">73%</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="/path/to/jquery.easy-pie-chart.js"></script>
<script>
$(function() {
$('.chart').easyPieChart({
//your options goes here
});
});
</script>Vanilla JS
If you don't want to use jQuery, implement the Vanilla JS version without any dependencies.
<div class="chart" data-percent="73">73%</div>
<script src="/path/to/easy-pie-chart.js"></script>
<script>
var element = document.querySelector('.chart');
new EasyPieChart(element, {
// your options goes here
});
</script>AngularJS
<div ng-controller="chartCtrl">
<div easypiechart options="options" percent="percent"></div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.9/angular.min.js"></script>
<script src="../dist/angular.easypiechart.min.js"></script>
<script>
var app = angular.module('app', ['easypiechart']);
app.controller('chartCtrl', ['$scope', function ($scope) {
$scope.percent = 65;
$scope.options = {
animate:{
duration:0,
enabled:false
},
barColor:'#2C3E50',
scaleColor:false,
lineWidth:20,
lineCap:'circle'
};
}]);
</script>Options
You can pass these options to the initialize function to set a custom look and feel for the plugin.
| Property (Type) | Default | Description |
|---|---|---|
| barColor | #ef1e25 | The color of the curcular bar. You can either pass a valid css color string, or a function that takes the current percentage as a value and returns a valid css color string. |
| trackColor | #f2f2f2 | The color of the track, or false to disable rendering. |
| scaleColor | #dfe0e0 | The color of the scale lines, false to disable rendering. |
| scaleLength | 5 | Length of the scale lines (reduces the radius of the chart). |
| lineCap | round | Defines how the ending of the bar line looks like. Possible values are: butt, round and square. |
| lineWidth | 3 | Width of the chart line in px. |
| size | 110 | Size of the pie chart in px. It will always be a square. |
| rotate | 0 | Rotation of the complete chart in degrees. |
| animate | object | Object with time in milliseconds and boolean for an animation of the bar growing ({ duration: 1000, enabled: true }), or false to deactivate animations. |
| easing | defaultEasing | Easing function or string with the name of a jQuery easing function |
Callbacks
All callbacks will only be called if animate is not false.
| Callback(params, ...) | Description |
|---|---|
| onStart(from, to) | Is called at the start of any animation. |
| onStep(from, to, currentValue) | Is called during animations providing the current value (the method is scoped to the context of th eplugin, so you can access the DOM element via this.el). |
| onStop(from, to) | Is called at the end of any animation. |
Plugin api
jQuery
$(function() {
// instantiate the plugin
...
// update
$('.chart').data('easyPieChart').update(40);
...
// disable animation
$('.chart').data('easyPieChart').disableAnimation();
...
// enable animation
$('.chart').data('easyPieChart').enableAnimation();
});Vanilla JS
// instantiate the plugin
var chart = new EasyPieChart(element, options);
// update
chart.update(40);
// disable animation
chart.disableAnimation();
// enable animation
chart.enableAnimation();Using a gradient
new EasyPieChart(element, {
barColor: function(percent) {
var ctx = this.renderer.getCtx();
var canvas = this.renderer.getCanvas();
var gradient = ctx.createLinearGradient(0,0,canvas.width,0);
gradient.addColorStop(0, "#ffe57e");
gradient.addColorStop(1, "#de5900");
return gradient;
}
});AngularJS
For a value binding you need to add the percent attribute and bind it to your controller.
RequireJS
When using RequireJS you can define your own name. Examples can be found in the demo/requirejs.html.
Browser Support
Native support
- Chrome
- Safari
- FireFox
- Opera
- Internet Explorer 9+
Support for Internet Explorer 7 and 8 with excanvas polyfill.
Test
To run the test just use the karma adapter of grunt: grunt test
Credits
Thanks to Rafal Bromirski for designing this dribble shot which inspired me building this plugin.
Copyright
Copyright (c) 2015 Robert Fleischmann, contributors. Released under the MIT, GPL licenses
Overview (`web-gui/buildyourownbotnet/assets/js/jquery-terminal/README.md`)
_______ ________ __
/ / _ /_ ____________ _/__ ___/______________ _____ / /
__ / / // / // / _ / _/ // / / / _ / _/ / / \/ / _ \/ /
/ / / // / // / ___/ // // / / / ___/ // / / / / /\ / // / /__
\___/____ \\__/____/_/ \__ / /_/____/_//_/_/_/_/_/ \/\__\_\___/
\/ /____/ version 2.12.0Summary
jQuery Terminal Emulator is a plugin for creating command line interpreters in
your applications. It can automatically call JSON-RPC service when a user types
commands or you can provide your own function in which you can parse user
commands. It's ideal if you want to provide additional functionality for power
users. It can also be used to debug your application.
You can use this JavaScript library to create a web based terminal on any website.
Features:
You can create an interpreter for your JSON-RPC service with one line
of code (just use url as first argument).Support for authentication (you can provide functions when users enter
login and password or if you use JSON-RPC it can automatically call
login function on the server and pass token to all functions).Stack of interpreters - you can create commands that trigger additional
interpreters (eg. you can use couple of JSON-RPC service and run them
when user type command)Command Tree - you can use nested objects. Each command will invoke a
function, if the value is an object it will create a new interpreter and
use the function from that object as commands. You can use as many nested
object/commands as you like. If the value is a string it will create
JSON-RPC service.Support for command line history, it uses Local Storage if possible.
Support for tab completion.
Includes keyboard shortcut from bash like CTRL+A, CTRL+D, CTRL+E etc.
Multiple terminals on one page (every terminal can have different
commands, its own authentication function and its own command history).It catches all exceptions and displays error messages in the terminal
(you can see errors in your javascript and php code in terminal if they
are in the interpreter function).Using extended commands you can change working of the terminal without
touching the front-end code (using echo method and terminal formatting
like syntax). Read more in
docs
Installation
Include jQuery library, you can use cdn from https://jquery.com/download/
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>Then include js/jquery.terminal-2.12.0.min.js and css/jquery.terminal-2.12.0.min.css
You can grab the files from CDN:
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/2.12.0/js/jquery.terminal.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/2.12.0/css/jquery.terminal.min.css" rel="stylesheet"/>or
<script src="https://cdn.jsdelivr.net/npm/[email protected]/js/jquery.terminal.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/jquery.terminal.min.css">If you always want latest version, you can get it from unpkg without specifying version,
it will redirect to the latest ones:
<script src="https://unpkg.com/jquery.terminal/js/jquery.terminal.min.js"></script>
<link href="https://unpkg.com/jquery.terminal/css/jquery.terminal.min.css" rel="stylesheet"/>Bleeding Edge Version
If you want to test bleeding edge, development version of jQuery Terminal. You can use those files:
<script src="https://cdn.rawgit.com/jcubic/jquery.terminal/devel/js/jquery.terminal.min.js"></script>
<link href="https://cdn.rawgit.com/jcubic/jquery.terminal/devel/css/jquery.terminal.min.css" rel="stylesheet"/>but the service will be shutdown in October 2019, and it don't accept new files. Great things
about rawgit that (at least when you don't put cdn subdomain) you can get latest version very fast after the commit
is pushed on GitHub (sometimes you need to add no cache query string, anything unique, for faster refresh).
there is also an alternative from jsdelivr:
<script src="https://cdn.jsdelivr.net/gh/jcubic/jquery.terminal@devel/js/jquery.terminal.min.js"></script>
<link href="https://cdn.jsdelivr.net/gh/jcubic/jquery.terminal@devel/css/jquery.terminal.min.css" rel="stylesheet"/>but it's not refreshed as fast as rawgit, because it's CDN and need to be propagated to different servers.
Keyboard key polyfill
NOTE: From version 1.0.0 if you want to support old browsers then you'll need to use key event property polyfill. You can check the support for it on can I use (as you can see in chart it's required by Android so it's good to add).
<script src="https://cdn.rawgit.com/inexorabletash/polyfill/master/keyboard.js"></script>or
<script src="https://unpkg.com/[email protected]/keyboard.js"></script>Command Line
You can also install jQuery Terminal using command line, from bower repository:
bower install jquery.terminalor npm registry:
npm install jquery.terminalExample of usage
This is code that uses low level function, that gives you full control of the commands,
just pass anything that the user types into a function.
jQuery(function($, undefined) {
$('#term_demo').terminal(function(command) {
if (command !== '') {
var result = window.eval(command);
if (result != undefined) {
this.echo(String(result));
}
}
}, {
greetings: 'Javascript Interpreter',
name: 'js_demo',
height: 200,
width: 450,
prompt: 'js> '
});
});Here is a higher level call, using an object as an interpreter, By default the terminal will
parse commands that a user types and replace number like strings with real numbers
regex with regexes and process escape characters in double quoted strings.
jQuery(function($, undefined) {
$('#term_demo').terminal({
add: function(a, b) {
this.echo(a + b);
},
foo: 'foo.php',
bar: {
sub: function(a, b) {
this.echo(a - b);
}
}
}, {
height: 200,
width: 450,
prompt: 'demo> '
});
});Command foo will execute json-rpc from foo.php file.
You can create JSON-RPC interpreter with authentication in just one line:
$('#term_demo').terminal('service.php', {login: true});More examples here. You can also check
Full Documentation or
Getting Started Guide on Wiki.
Security
Because of security in version 1.20.0 links with protocols different than ftp or http(s) (it was
possible to enter javascript protocol, that could lead to XSS if author of the app echo user input
and save it in DB) was turn off by default. To enable it, you need to use anyLinks: true option.
In version 1.21.0 executing terminal methods using extendend commands [[ terminal::clear() ]] was
also disabled by default because attacker (depending on your application) could executeterminal::echo with raw option to enter any html and execute any javascript. To enable this
feature from this version you need to use invokeMethods: true option.
The features are safe to enable, if you don't save user input in DB and don't echo it back to
different users (like with chat application). It's also safe if you escape formatting before you
echo stuff.
If you don't save user input in DB but allow to echo back what user types and have enabledexecHash options, you may have reflected XSS vulnerability if you enable this features. If you
escape formatting this options are also safe.
NOTE: To disable exec if you have execHash (or echo stuff from users with invokeMethods: true),
you can also set option {exec: false} to your echo call and use it only when you get
values from server (not from DB indireclty from users). If you do this you will be able to echo stuff
from users and execute terminal methods from server (this feature is mostly done just for that).
Contributors
If you want to contribute read CONTRIBUTING.md first. Here are project contributors:
jQuery Terminal Website contributors:
| Jakub T. Jankiewiczcommits | Rich Morincommits | DInesh51297commits | Logan Rosencommits |
|---|
Credits
Project used:
- Storage plugin by Dave Schindler (MIT)
- jQuery Timers (WTFPL)
- Cross-Browser Split by Steven Levithan (MIT)
- jQuery Caret by Gideon Sireling (3-BSD)
- sprintf.js by Alexandru Mฤrฤศteanu (3-BSD)
- node-ansiparser by Joerg Breitbart (MIT)
License
Licensed under MIT license
Copyright (c) 2011-2019 Jakub Jankiewicz
Overview (`web-gui/buildyourownbotnet/assets/js/select2/README.md`)
Select2
Select2 is a jQuery-based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results.
To get started, checkout examples and documentation at http://ivaynberg.github.com/select2
Use cases
- Enhancing native selects with search.
- Enhancing native selects with a better multi-select interface.
- Loading data from JavaScript: easily load items via ajax and have them searchable.
- Nesting optgroups: native selects only support one level of nested. Select2 does not have this restriction.
- Tagging: ability to add new items on the fly.
- Working with large, remote datasets: ability to partially load a dataset based on the search term.
- Paging of large datasets: easy support for loading more pages when the results are scrolled to the end.
- Templating: support for custom rendering of results and selections.
Browser compatibility
- IE 8+
- Chrome 8+
- Firefox 10+
- Safari 3+
- Opera 10.6+
Usage
You can source Select2 directly from a CDN like JSDliver or CDNJS, download it from this GitHub repo, or use one of the integrations below.
Integrations
- Wicket-Select2 (Java / Apache Wicket)
- select2-rails (Ruby on Rails)
- AngularUI (AngularJS)
- Django
- Symfony
- Symfony2
- Bootstrap 2 and Bootstrap 3 (CSS skins)
- Meteor (modern reactive JavaScript framework; + Bootstrap 3 skin)
- Meteor
- Yii 2.x
- Yii 1.x
- AtmosphereJS
Example Integrations
Internationalization (i18n)
Select2 supports multiple languages by simply including the right language JS
file (select2_locale_it.js, select2_locale_nl.js, etc.) after select2.js.
Missing a language? Just copy select2_locale_en.js.template, translate
it, and make a pull request back to Select2 here on GitHub.
Documentation
The documentation for Select2 is available through GitHub Pages and is located within this repository in the gh-pages branch.
Community
Bug tracker
Have a bug? Please create an issue here on GitHub!
https://github.com/ivaynberg/select2/issues
Mailing list
Have a question? Ask on our mailing list!
https://groups.google.com/d/forum/select2
IRC channel
Need help implementing Select2 in your project? Ask in our IRC channel!
Network: Freenode (chat.freenode.net)
Channel: #select2
Web access: https://webchat.freenode.net/?channels=select2
Copyright and license
Copyright 2012 Igor Vaynberg
This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
General Public License version 2 (the "GPL License"). You may choose either license to govern your
use of this software only upon the condition that you accept all of the terms of either the Apache
License or the GPL License.
You may obtain a copy of the Apache License and the GPL License in the LICENSE file, or at:
http://www.apache.org/licenses/LICENSE-2.0
http://www.gnu.org/licenses/gpl-2.0.html
Unless required by applicable law or agreed to in writing, software distributed under the Apache License
or the GPL License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the Apache License and the GPL License for the specific language governing
permissions and limitations under the Apache License and the GPL License.
Overview (`web-gui/buildyourownbotnet/assets/js/vertical-timeline/README.md`)
Created by Codrops
Please read more about our license here: http://tympanus.net/codrops/licensing/
Overview (`web-gui/buildyourownbotnet/assets/js/vertical-timeline/fonts/readme.md`)
Icons made with http://icomoon.io/
#Font Awesome 3.0.2
##the iconic font designed for use with Twitter Bootstrap
The full suite of pictographic icons, examples, and documentation can be found at:
http://fortawesome.github.com/Font-Awesome/
##License
- The Font Awesome font is licensed under the SIL Open Font License - http://scripts.sil.org/OFL
- Font Awesome CSS, LESS, and SASS files are licensed under the MIT License - http://opensource.org/licenses/mit-license.html
- The Font Awesome pictograms are licensed under the CC BY 3.0 License - http://creativecommons.org/licenses/by/3.0/
- Attribution is no longer required in Font Awesome 3.0, but much appreciated: "Font Awesome by Dave Gandy - http://fortawesome.github.com/Font-Awesome"
##Contact
- Email: [email protected]
- Twitter: http://twitter.com/fortaweso_me
- Work: Lead Product Designer @ http://kyru.us
##Changelog
- v3.0.0 - all icons redesigned from scratch, optimized for Bootstrap's 14px default
- v3.0.1 - much improved rendering in webkit, various bugfixes
- v3.0.2 - much improved rendering and alignment in IE7
Overview (`web-gui/buildyourownbotnet/assets/js/ckeditor/plugins/scayt/README.md`)
CKEditor SCAYT Plugin
This plugin brings Spell Check As You Type (SCAYT) into CKEditor.
SCAYT is a "installation-less", using the web-services of WebSpellChecker.net. It's an out of the box solution.
Installation
Clone/copy this repository contents in a new "plugins/scayt" folder in your CKEditor installation.
Enable the "scayt" plugin in the CKEditor configuration file (config.js):
textconfig.extraPlugins = 'scayt';
That's all. SCAYT will appear on the editor toolbar and will be ready to use.
License
Licensed under the terms of any of the following licenses at your choice: GPL, LGPL and MPL.
See LICENSE.md for more information.
Developed in cooperation with WebSpellChecker.net.
Overview (`web-gui/buildyourownbotnet/assets/js/ckeditor/plugins/wsc/README.md`)
CKEditor WebSpellChecker Plugin
This plugin brings Web Spell Checker (WSC) into CKEditor.
WSC is "installation-less", using the web-services of WebSpellChecker.net. It's an out of the box solution.
Installation
Clone/copy this repository contents in a new "plugins/wsc" folder in your CKEditor installation.
Enable the "wsc" plugin in the CKEditor configuration file (config.js):
textconfig.extraPlugins = 'wsc';
That's all. WSC will appear on the editor toolbar and will be ready to use.
License
Licensed under the terms of any of the following licenses at your choice: GPL, LGPL and MPL.
See LICENSE.md for more information.
Developed in cooperation with WebSpellChecker.net.
Overview (`web-gui/buildyourownbotnet/assets/js/ckeditor/skins/moono/readme.md`)
"Moono" Skin
This skin has been chosen for the default skin of CKEditor 4.x, elected from the CKEditor
skin contest and further shaped by
the CKEditor team. "Moono" is maintained by the core developers.
For more information about skins, please check the CKEditor Skin SDK
documentation.
Features
"Moono" is a monochromatic skin, which offers a modern look coupled with gradients and transparency.
It comes with the following features:
- Chameleon feature with brightness,
- high-contrast compatibility,
- graphics source provided in SVG.
Directory Structure
CSS parts:
- editor.css: the main CSS file. It's simply loading several other files, for easier maintenance,
- mainui.css: the file contains styles of entire editor outline structures,
- toolbar.css: the file contains styles of the editor toolbar space (top),
- richcombo.css: the file contains styles of the rich combo ui elements on toolbar,
- panel.css: the file contains styles of the rich combo drop-down, it's not loaded
until the first panel open up, - elementspath.css: the file contains styles of the editor elements path bar (bottom),
- menu.css: the file contains styles of all editor menus including context menu and button drop-down,
it's not loaded until the first menu open up, - dialog.css: the CSS files for the dialog UI, it's not loaded until the first dialog open,
- reset.css: the file defines the basis of style resets among all editor UI spaces,
- preset.css: the file defines the default styles of some UI elements reflecting the skin preference,
- editor_XYZ.css and dialog_XYZ.css: browser specific CSS hacks.
Other parts:
- skin.js: the only JavaScript part of the skin that registers the skin, its browser specific files and its icons and defines the Chameleon feature,
- icons/: contains all skin defined icons,
- images/: contains a fill general used images,
- dev/: contains SVG source of the skin icons.
License
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
Licensed under the terms of any of the following licenses at your choice: GPL, LGPL and MPL.
See LICENSE.md for more information.
Web Gui Buildyourownbotnet Assets Js Easy Pie Chart Docs README.Tmpl (`web-gui/buildyourownbotnet/assets/js/easy-pie-chart/docs/README.tmpl.md`)
{%= name %}
{%= description %}
{%= _.doc('bagdes.md') %}
Features
{%= _.doc("features.md") %}
Get started
{%= _.doc("get-started.md") %}
Options
{%= _.doc("options.md") %}
Callbacks
{%= _.doc("callbacks.md") %}
Plugin api
{%= _.doc("plugin-api.md") %}
Browser Support
{%= _.doc("browser-support.md") %}
Test
{%= _.doc("test.md") %}
Credits
{%= _.doc("credits.md") %}
Copyright
{%= copyright %} {%= license %}
Web Gui Buildyourownbotnet Assets Js Easy Pie Chart Docs Bagdes (`web-gui/buildyourownbotnet/assets/js/easy-pie-chart/docs/bagdes.md`)
Web Gui Buildyourownbotnet Assets Js Easy Pie Chart Docs Browser Support (`web-gui/buildyourownbotnet/assets/js/easy-pie-chart/docs/browser-support.md`)
Native support
- Chrome
- Safari
- FireFox
- Opera
- Internet Explorer 9+
Support for Internet Explorer 7 and 8 with excanvas polyfill.
Web Gui Buildyourownbotnet Assets Js Easy Pie Chart Docs Callbacks (`web-gui/buildyourownbotnet/assets/js/easy-pie-chart/docs/callbacks.md`)
All callbacks will only be called if animate is not false.
| Callback(params, ...) | Description |
|---|---|
| onStart(from, to) | Is called at the start of any animation. |
| onStep(from, to, currentValue) | Is called during animations providing the current value (the method is scoped to the context of th eplugin, so you can access the DOM element via this.el). |
| onStop(from, to) | Is called at the end of any animation. |
Web Gui Buildyourownbotnet Assets Js Easy Pie Chart Docs Credits (`web-gui/buildyourownbotnet/assets/js/easy-pie-chart/docs/credits.md`)
Thanks to Rafal Bromirski for designing this dribble shot which inspired me building this plugin.
Web Gui Buildyourownbotnet Assets Js Easy Pie Chart Docs Features (`web-gui/buildyourownbotnet/assets/js/easy-pie-chart/docs/features.md`)
- highly customizable
- very easy to implement
- resolution independent (retina optimized)
- uses
requestAnimationFramefor smooth animations on modern devices and - works in all modern browsers, even in IE7+ with excanvas
framework support
- Vanilla JS (no dependencies) (~872 bytes)
- jQuery plugin (~921 bytes)
- Angular Module (~983 bytes)
Web Gui Buildyourownbotnet Assets Js Easy Pie Chart Docs Get Started (`web-gui/buildyourownbotnet/assets/js/easy-pie-chart/docs/get-started.md`)
Installation
You can also use bower to install the component:
$ bower install jquery.easy-pie-chartjQuery
To use the easy pie chart plugin you need to load the current version of jQuery (> 1.6.4) and the source of the plugin.
<div class="chart" data-percent="73" data-scale-color="#ffb400">73%</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="/path/to/jquery.easy-pie-chart.js"></script>
<script>
$(function() {
$('.chart').easyPieChart({
//your options goes here
});
});
</script>Vanilla JS
If you don't want to use jQuery, implement the Vanilla JS version without any dependencies.
<div class="chart" data-percent="73">73%</div>
<script src="/path/to/easy-pie-chart.js"></script>
<script>
var element = document.querySelector('.chart');
new EasyPieChart(element, {
// your options goes here
});
</script>AngularJS
<div ng-controller="chartCtrl">
<div easypiechart options="options" percent="percent"></div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.9/angular.min.js"></script>
<script src="../dist/angular.easypiechart.min.js"></script>
<script>
var app = angular.module('app', ['easypiechart']);
app.controller('chartCtrl', ['$scope', function ($scope) {
$scope.percent = 65;
$scope.options = {
animate:{
duration:0,
enabled:false
},
barColor:'#2C3E50',
scaleColor:false,
lineWidth:20,
lineCap:'circle'
};
}]);
</script>Web Gui Buildyourownbotnet Assets Js Easy Pie Chart Docs Options (`web-gui/buildyourownbotnet/assets/js/easy-pie-chart/docs/options.md`)
You can pass these options to the initialize function to set a custom look and feel for the plugin.
| Property (Type) | Default | Description |
|---|---|---|
| barColor | #ef1e25 | The color of the curcular bar. You can either pass a valid css color string, or a function that takes the current percentage as a value and returns a valid css color string. |
| trackColor | #f2f2f2 | The color of the track, or false to disable rendering. |
| scaleColor | #dfe0e0 | The color of the scale lines, false to disable rendering. |
| scaleLength | 5 | Length of the scale lines (reduces the radius of the chart). |
| lineCap | round | Defines how the ending of the bar line looks like. Possible values are: butt, round and square. |
| lineWidth | 3 | Width of the chart line in px. |
| size | 110 | Size of the pie chart in px. It will always be a square. |
| rotate | 0 | Rotation of the complete chart in degrees. |
| animate | object | Object with time in milliseconds and boolean for an animation of the bar growing ({ duration: 1000, enabled: true }), or false to deactivate animations. |
| easing | defaultEasing | Easing function or string with the name of a jQuery easing function |
Web Gui Buildyourownbotnet Assets Js Easy Pie Chart Docs Plugin Api (`web-gui/buildyourownbotnet/assets/js/easy-pie-chart/docs/plugin-api.md`)
jQuery
$(function() {
// instantiate the plugin
...
// update
$('.chart').data('easyPieChart').update(40);
...
// disable animation
$('.chart').data('easyPieChart').disableAnimation();
...
// enable animation
$('.chart').data('easyPieChart').enableAnimation();
});Vanilla JS
// instantiate the plugin
var chart = new EasyPieChart(element, options);
// update
chart.update(40);
// disable animation
chart.disableAnimation();
// enable animation
chart.enableAnimation();Using a gradient
new EasyPieChart(element, {
barColor: function(percent) {
var ctx = this.renderer.ctx();
var canvas = this.renderer.canvas();
var gradient = ctx.createLinearGradient(0,0,canvas.width,0);
gradient.addColorStop(0, "#ffe57e");
gradient.addColorStop(1, "#de5900");
return gradient;
}
});AngularJS
For a value binding you need to add the percent attribute and bind it to your controller.
RequireJS
When using RequireJS you can define your own name. Examples can be found in the demo/requirejs.html.
Web Gui Buildyourownbotnet Assets Js Easy Pie Chart Docs Test (`web-gui/buildyourownbotnet/assets/js/easy-pie-chart/docs/test.md`)
To run the test just use the karma adapter of grunt: grunt test
--- METRICS ---
- Files Extracted: 26
- Estimated Token Budget: ~18947 tokens
- Canonical Reference: https://codewiki.google/github.com/malwaredllc/byob