├── LICENSE
├── Logo.png
├── README.md
├── data
├── category.dat
└── tools.dat
├── doc
├── Screenshot_2019-12-01-12-09-26-1.png
├── Screenshot_2019-12-01-12-10-02-1.png
├── category.txt
└── tools.txt
├── install
└── onex
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Rajkumar Dusad
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MasterScott/onex/7aa4e697c0eed44394d67196233eae4709231260/Logo.png
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Onex v0.1
2 |
3 | ***"onex a hacking tools library."***
4 | Onex is a kali linux hacking tools installer for termux and other linux distribution. It's package manager for hacker's.
5 | onex manage large number's of hacking tools that can be installed on single click. Using onex, you can install all hacking tools in Termux and other Linux based distributions.
6 | onex can install **more than 370+ kali linux hacking tools**. use `onex install [tool_name]` command to install any hacking tool.
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | ------------------------------------------------------------------------
15 |
16 | ## Operating System Requirements
17 |
18 | onex works on any of the following operating systems:
19 | - **Android** (Using the Termux App)
20 | - **Linux** (Linux Based Systems)
21 |
22 | ------------------------------------------------------------------------
23 |
24 | ## How to Install
25 |
26 | Open the terminal and type following commands.
27 |
28 | * `apt update`
29 |
30 | * `apt install git`
31 |
32 | * `git clone https://github.com/Rajkumrdusad/onex.git`
33 |
34 | * `chmod +x onex/install`
35 |
36 | * `sh onex/install` if not work than use `./onex/install`
37 |
38 | ------------------------------------------------------------------------
39 |
40 | ## How to use onex ?
41 |
42 | ### CLI Mode :
43 | `onex -h` or `onex help` for help.
44 |
45 | Options :
46 | - `onex install [tool_name]` install any tool.
47 | - `onex -i [tool_name]` install any tool.
48 | - `onex search [tool_name]` search any tool.
49 | - `onex -s [tool_name]` search any tool.
50 | - `onex list` list all tools.
51 | - `onex list -a` list all tools.
52 | - `onex -l` list all tools.
53 | - `onex -l -a` list all tools.
54 | - `onex help` get help.
55 | - `onex -h` get help.
56 |
57 | ### Menu Mode :
58 |
59 | `onex start` to start onex menu mode.
60 |
61 | Enter a Number for a specific output:
62 | - (1) : To show all available tools and type the number of a tool which you want to install.
63 | - (2) : To show tools category.
64 | - (3) : If you want to update onex.
65 | - (4) : If you want to know About Us.
66 | - (5) : To exit the tool.
67 |
68 | ------------------------------------------------------------------------
69 |
70 | **Warning**
71 |
72 | Please use this tool at your own risk!
73 |
74 |
--------------------------------------------------------------------------------
/data/category.dat:
--------------------------------------------------------------------------------
1 | Information Gathering|information_gathering
2 | Vulnerability Scanner|vulnerability_scanner
3 | Exploitation Tools|exploitation_tools
4 | Wireless Testing|wireless_testing
5 | Forensics Tools|forensics_tools
6 | Web Hacking|web_hacking
7 | Stress Testing|stress_testing
8 | Sniffing & Spoofing|sniffing_spoofing
9 | Password Attacks|password_attack
10 | Maintaining Access|maintaining_access
11 | IP-Tracking tools|ip_tracking
12 | Programming Languages|programming_language
13 | DDOS Attacks|ddos
14 | Web Server's|web_server
--------------------------------------------------------------------------------
/data/tools.dat:
--------------------------------------------------------------------------------
1 | 4nonimizer|4nonimizer|null|https://github.com/Hackplayers/4nonimizer.git|git|git
2 | A-Rat|A-Rat|exploitation_tools|https://github.com/Xi4u7/A-Rat.git|git|python,git
3 | ADB-Toolkit|ADB-Toolkit|null|https://github.com/ASHWIN990/ADB-Toolkit.git|git|git
4 | ATSCAN|ATSCAN|exploitation_tools|https://github.com/AlisamTechnology/ATSCAN.git|git|git
5 | AndroBugs_Framework|AndroBugs_Framework|null|https://github.com/AndroBugs/AndroBugs_Framework.git|git|python,git
6 | Androspy|Androspy|null|https://github.com/TunisianEagles/Androspy.git|git|git
7 | AutoPixieWps|AutoPixieWps|null|https://github.com/nxxxu/AutoPixieWps.git|git|python,git
8 | Automater|TekDefense-Automater|information_gathering|https://github.com/1aN0rmus/TekDefense-Automater.git|git|python,git
9 | Auxscan|Auxscan|null|https://github.com/Gameye98/Auxscan.git|git|python,git
10 | BAF|BAF|null|https://github.com/engMaher/BAF.git|git|python,git
11 | BadMod|BadMod|null|https://github.com/MrSqar-Ye/BadMod.git|git|php,git
12 | BeeLogger|BeeLogger|null|https://github.com/4w4k3/BeeLogger.git|git|python,git
13 | Black-Hydra|Black-Hydra|null|https://github.com/Gameye98/Black-Hydra.git|git|python,git
14 | Blazy|Blazy|null|https://github.com/UltimateHackers/Blazy.git|git|python,git
15 | Breacher|Breacher|web_hacking|https://github.com/UltimateHackers/Breacher.git|git|python,git
16 | Brutal|Brutal|exploitation_tools|https://github.com/Screetsec/Brutal.git|git|git
17 | BruteX|BruteX|web_hacking|https://github.com/1N3/BruteX.git|git|python,git
18 | CHAOS|CHAOS|null|https://github.com/tiagorlampert/CHAOS.git|git|golang,git
19 | CMSeeK|CMSeeK|null|https://github.com/Tuhinshubhra/CMSeeK.git|git|python,git
20 | CMSmap|CMSmap|information_gathering|https://github.com/Dionach/CMSmap.git|git|python,git
21 | CeWL|CeWL|password_attack|https://github.com/digininja/CeWL.git|git|ruby,git
22 | Clickjacking-Tester|Clickjacking-Tester|null|https://github.com/D4Vinci/Clickjacking-Tester.git|git|python,git
23 | Cookie-stealer|Cookie-stealer|null|https://github.com/Xyl2k/Cookie-stealer.git|git|php,git
24 | CrawlBox|CrawlBox|null|https://github.com/abaykan/CrawlBox.git|git|python,git
25 | CredSniper|CredSniper|null|https://github.com/ustayready/CredSniper.git|git|python,git
26 | Crips|Crips|information_gathering|https://github.com/Manisso/Crips.git|git|python,git
27 | CyberScan|CyberScan|null|https://github.com/medbenali/CyberScan.git|git|python,git
28 | D-TECT|D-TECT|information_gathering,vulnerability_scanner|https://github.com/shawarkhanethicalhacker/D-TECT.git|git|python,git
29 | DHCPig|DHCPig|stress_testing|https://github.com/kamorin/DHCPig.git|git|python,git
30 | DKMC|DKMC|null|https://github.com/Mr-Un1k0d3r/DKMC.git|git|python,git
31 | DSSS|DSSS|vulnerability_scanner|https://github.com/stamparm/DSSS.git|git|python,git
32 | DSVW|DSVW|null|https://github.com/stamparm/DSVW.git|git|python,git
33 | DSXS|DSXS|null|https://github.com/stamparm/DSXS.git|git|python,git
34 | Devploit|Devploit|information_gathering|https://github.com/joker25000/Devploit.git|git|python,git
35 | Dr0p1t-Framework|Dr0p1t-Framework|null|https://github.com/D4Vinci/Dr0p1t-Framework.git|git|python,git
36 | Dracnmap|Dracnmap|null|https://github.com/Screetsec/Dracnmap.git|git|git
37 | EagleEye|EagleEye|null|https://github.com/ThoughtfulDev/EagleEye.git|git|python,git
38 | EasY_HaCk|EasY_HaCk|null|https://github.com/sabri-zaki/EasY_HaCk.git|git|python,git
39 | EggShell|EggShell|null|https://github.com/neoneggplant/EggShell.git|git|python,git
40 | Empire|Empire|null|https://github.com/EmpireProject/Empire.git|git|git
41 | EvilURL|EvilURL|information_gathering|https://github.com/UndeadSec/EvilURL.git|git|python,git
42 | ExploitOnCLI|ExploitOnCLI|exploitation_tools|https://github.com/r00tmars/ExploitOnCLI.git|git|php,git
43 | EyeWitness|EyeWitness|information_gathering|https://github.com/FortyNorthSecurity/EyeWitness.git|git|python,git
44 | FBUPv2.0|FBUPv2.0|null|https://github.com/mrSilent0598/FBUPv2.0.git|git|python,git
45 | FakeImageExploiter|FakeImageExploiter|null|https://github.com/r00t-3xp10it/FakeImageExploiter.git|git|git
46 | Findsploit|Findsploit|null|https://github.com/1N3/Findsploit.git|git|git
47 | Gemail-Hack|Gemail-Hack|null|https://github.com/Ha3MrX/Gemail-Hack.git|git|python,git
48 | Gloom-Framework|Gloom-Framework|null|https://github.com/StreetSec/Gloom-Framework.git|git|python,git
49 | GoblinWordGenerator|GoblinWordGenerator|null|https://github.com/UndeadSec/GoblinWordGenerator.git|git|python,git
50 | GoldenEye|GoldenEye|stress_testing|https://github.com/jseidl/GoldenEye.git|git|python,git
51 | HT-WPS-Breaker|HT-WPS-Breaker|null|https://github.com/SilentGhostX/HT-WPS-Breaker.git|git|git
52 | HTools|HTools|null|https://github.com/mehedishakeel/HTools.git|git|git
53 | Hash-Buster|Hash-Buster|password_attack|https://github.com/UltimateHackers/Hash-Buster.git|git|python,git
54 | Hashzer|Hashzer|password_attack|https://github.com/Anb3rSecID/Hashzer.git|git|python,git
55 | Hatch|Hatch|null|https://github.com/MetaChar/Hatch.git|git|python,git
56 | HiddenEye|HiddenEye|null|https://github.com/DarkSecDevelopers/HiddenEye.git|git|python,git
57 | Hunner|Hunner|null|https://github.com/b3-v3r/Hunner.git|git|python,git
58 | IP-FY|IP-FY|information_gathering,ip_tracking|https://github.com/T4P4N/IP-FY.git|git|python,git
59 | IP-Locator|IP-Locator|null|https://github.com/zanyarjamal/IP-Locator.git|git|perl,git
60 | IP-Tracer|IP-Tracer|information_gathering,ip_tracking|https://github.com/Rajkumrdusad/IP-Tracer|git|php,git
61 | IPGeoLocation|IPGeoLocation|ip_tracking|https://github.com/maldevel/IPGeoLocation.git|git|python,git
62 | InSpy|InSpy|information_gathering|https://github.com/leapsecurity/InSpy.git|git|python,git
63 | Infoga|Infoga|information_gathering|https://github.com/m4ll0k/Infoga.git|git|python,git
64 | Instahack|Instahack|null|https://github.com/avramit/Instahack.git|git|python,git
65 | Intersect-2.5|Intersect-2.5|maintaining_access|https://github.com/deadbits/Intersect-2.5.git|git|python,git
66 | JohnTheRipper|JohnTheRipper|password_attack|https://github.com/magnumripper/JohnTheRipper.git|git|clang,gcc,g++,git
67 | KatanaFramework|KatanaFramework|null|https://github.com/PowerScript/KatanaFramework.git|git|python,git
68 | KnockMail|KnockMail|sniffing_spoofing|https://github.com/4w4k3/KnockMail.git|git|python,git
69 | LALIN|LALIN|null|https://github.com/Screetsec/LALIN.git|git|git
70 | LFISuite|LFISuite|null|https://github.com/D35m0nd142/LFISuite.git|git|python,git
71 | LITEDDOS|LITEDDOS|ddos|https://github.com/4L13199/LITEDDOS.git|git|python,git
72 | LITESPAM|LITESPAM|null|https://github.com/4L13199/LITESPAM.git|git|php,git
73 | Lazymux|Lazymux|null|https://github.com/Gameye98/Lazymux.git|git|python,git
74 | Leaked|Leaked|null|https://github.com/GitHackTools/Leaked.git|git|python,git
75 | Mercury|Mercury|null|https://github.com/MetaChar/Mercury.git|git|python,git
76 | Meterpreter_Paranoid_Mode-SSL|Meterpreter_Paranoid_Mode-SSL|exploitation_tools|https://github.com/r00t-3xp10it/Meterpreter_Paranoid_Mode-SSL.git|git|git
77 | MyServer|MyServer|web_server|https://github.com/Rajkumrdusad/MyServer.git|git|python,git
78 | Nethunter-In-Termux|Nethunter-In-Termux|null|https://github.com/Hax4us/Nethunter-In-Termux.git|git|git
79 | OSIF|OSIF|information_gathering|https://github.com/ciku370/OSIF.git|git|python,git
80 | PadBuster|PadBuster|web_hacking|https://github.com/AonCyberLabs/PadBuster.git|git|perl,git
81 | Parat|Parat|null|https://github.com/micle-fm/Parat.git|git|python,git
82 | Parsero|Parsero|information_gathering|https://github.com/behindthefirewalls/Parsero.git|git|python,git
83 | PiDense|PiDense|null|https://github.com/WiPi-Hunter/PiDense.git|git|python,git
84 | Planetwork-DDOS|Planetwork-DDOS|ddos,stress_testing|https://github.com/Hydra7/Planetwork-DDOS.git|git|python,git
85 | PowerSploit|PowerSploit|maintaining_access|https://github.com/PowerShellMafia/PowerSploit.git|git|git
86 | PwnSTAR|PwnSTAR|null|https://github.com/SilverFoxx/PwnSTAR.git|git|python,git
87 | PyBozoCrack|PyBozoCrack|null|https://github.com/ikkebr/PyBozoCrack.git|git|python,git
88 | Pybelt|Pybelt|null|https://github.com/Ekultek/Pybelt.git|git|python,git
89 | Pyrit|Pyrit|wireless_testing|https://github.com/JPaulMora/Pyrit.git|git|python,clang,gcc,git
90 | QRLJacking|QRLJacking|null|https://github.com/OWASP/QRLJacking.git|git|python,git
91 | RED_HAWK|RED_HAWK|information_gathering,vulnerability_scanner|https://github.com/Tuhinshubhra/RED_HAWK.git|git|php,git
92 | RTLSDR-Scanner|RTLSDR-Scanner|wireless_testing|https://github.com/EarToEarOak/RTLSDR-Scanner.git|git|python,git
93 | ReconDog|ReconDog|information_gathering|https://github.com/UltimateHackers/ReconDog.git|git|python,git
94 | RegRipper2.8|RegRipper2.8|forensics_tools|https://github.com/keydet89/RegRipper2.8.git|git|perl,git
95 | Remot3d|Remot3d|null|https://github.com/KeepWannabe/Remot3d.git|git|git
96 | Responder|Responder|sniffing_spoofing|https://github.com/lgandx/Responder.git|git|python,git
97 | ReverseAPK|ReverseAPK|null|https://github.com/1N3/ReverseAPK.git|git|git
98 | SCANNER-INURLBR|SCANNER-INURLBR|web_hacking|https://github.com/googleinurl/SCANNER-INURLBR.git|git|php,git
99 | SET|social-engineer-toolkit|information_gathering,exploitation_tools,password_attack,sniffing_spoofing|https://github.com/trustedsec/social-engineer-toolkit.git|git|python,git
100 | SH33LL|SH33LL|vulnerability_scanner,web_hacking|https://github.com/LOoLzeC/SH33LL.git|git|python,git
101 | SMBrute|SMBrute|null|https://github.com/m4ll0k/SMBrute.git|git|python,git
102 | SecLists|SecLists|password_attack|https://github.com/danielmiessler/SecLists.git|git|php,perl,git
103 | Simple-Fuzzer|Simple-Fuzzer|vulnerability_scanner|https://github.com/orgcandman/Simple-Fuzzer.git|git|clang,gcc,git
104 | Sn1per|Sn1per|null|https://github.com/1N3/Sn1per.git|git|python,git
105 | SocialBox|SocialBox|sniffing_spoofing|https://github.com/TunisianEagles/SocialBox.git|git|git
106 | SocialFish|SocialFish|password_attack,sniffing_spoofing|https://github.com/UndeadSec/SocialFish.git|git|python,git
107 | Spammer-Email|Spammer-Email|sniffing_spoofing|https://github.com/p4kl0nc4t/Spammer-Email.git|git|python,git
108 | Spammer-Grab|Spammer-Grab|sniffing_spoofing|https://github.com/p4kl0nc4t/Spammer-Grab.git|git|python,git
109 | Stitch|Stitch|null|https://github.com/nathanlopez/Stitch.git|git|python,git
110 | Striker|Striker|vulnerability_scanner|https://github.com/s0md3v/Striker.git|git|python,git
111 | Sublist3r|Sublist3r|information_gathering|https://github.com/aboul3la/Sublist3r.git|git|python,git
112 | TermuxAlpine|TermuxAlpine|termux_os|https://github.com/Hax4us/TermuxAlpine.git|git|git
113 | Th3inspector|Th3inspector|null|https://github.com/Moham3dRiahi/Th3inspector.git|git|perl,git
114 | The-Eye|The-Eye|null|https://github.com/EgeBalci/The-Eye.git|git|golang,git
115 | TheFatRat|TheFatRat|null|https://github.com/Screetsec/TheFatRat.git|git|git
116 | Tool-X|Tool-X|null|https://github.com/Rajkumrdusad/Tool-X.git|git|python,git
117 | TorStat|TorStat|null|https://github.com/s0cket7/TorStat.git|git|python,git
118 | Trity|Trity|null|https://github.com/toxic-ig/Trity.git|git|python,git
119 | Umbrella|Umbrella|null|https://github.com/4w4k3/Umbrella.git|git|git
120 | Vegile|Vegile|null|https://github.com/Screetsec/Vegile.git|git|git
121 | WAScan|WAScan|information_gathering,vulnerability_scanner,web_hacking|https://github.com/m4ll0k/WAScan.git|git|python,git
122 | WP-plugin-scanner|WP-plugin-scanner|web_hacking|https://github.com/mintobit/WP-plugin-scanner.git|git|python,git
123 | WPSeku|WPSeku|null|https://github.com/m4ll0k/WPSeku.git|git|python,git
124 | WebScarab|OWASP-WebScarab|web_hacking|https://github.com/OWASP/OWASP-WebScarab.git|git|git
125 | WebXploiter|WebXploiter|web_hacking,exploitation_tools|https://github.com/a0xnirudh/WebXploiter.git|git|python,git
126 | WhatWeb|WhatWeb|web_hacking|https://github.com/urbanadventurer/WhatWeb.git|git|python,git
127 | WiFi-Pumpkin|WiFi-Pumpkin|wireless_testing|https://github.com/P0cL4bs/WiFi-Pumpkin.git|git|python,git
128 | WifiBruteCrack|WifiBruteCrack|wireless_testing|https://github.com/cinquemb/WifiBruteCrack.git|git|python,git
129 | Winpayloads|Winpayloads|null|https://github.com/nccgroup/Winpayloads.git|git|python,git
130 | XAttacker|XAttacker|vulnerability_scanner,web_hacking,exploitation_tools|https://github.com/Moham3dRiahi/XAttacker.git|git|perl,php,git
131 | XPL-SEARCH|XPL-SEARCH|web_hacking|https://github.com/r00tmars/XPL-SEARCH.git|git|php,git
132 | XSStrike|XSStrike|information_gathering,web_hacking|https://github.com/s0md3v/XSStrike.git|git|python,git
133 | Xshell|Xshell|vulnerability_scanner,web_hacking|https://github.com/Manisso/Xshell.git|git|git
134 | Zerodoor|Zerodoor|null|https://github.com/Souhardya/Zerodoor.git|git|python,git
135 | admin-panel-finder|admin-panel-finder|web_hacking|https://github.com/bdblackhat/admin-panel-finder.git|git|python,git
136 | air-hammer|air-hammer|null|https://github.com/Wh1t3Rh1n0/air-hammer.git|git|python,git
137 | aircrack-ng|aircrack-ng|wireless_testing|null|package_manager|null
138 | airgeddon|airgeddon|wireless_testing|https://github.com/v1s1t0r1sh3r3/airgeddon.git|git|git
139 | angryFuzzer|angryFuzzer|null|https://github.com/ihebski/angryFuzzer.git|git|python,git
140 | apache2|apache2|web_server,package|null|package_manager|null
141 | apt2|apt2|information_gathering|https://github.com/MooseDojo/apt2.git|git|python,git
142 | arch-linux|setupTermuxArch.sh|termux_os|https://raw.githubusercontent.com/sdrausty/TermuxArch/master/setupTermuxArch.sh|curl|curl
143 | arp-scan|arp-scan|information_gathering|https://github.com/royhills/arp-scan.git|git|clang,gcc,git
144 | avet|avet|null|https://github.com/govolution/avet.git|git|clang,gcc,git
145 | bbqsql|bbqsql|vulnerability_scanner|https://github.com/Neohapsis/bbqsql.git|git|python,git
146 | bed|bed|vulnerability_scanner|https://gitlab.com/kalilinux/packages/bed.git|git|perl,git
147 | beef|beef|exploitation_tools|https://github.com/beefproject/beef.git|git|ruby,git
148 | bettercap|bettercap|sniffing_spoofing|https://github.com/bettercap/bettercap.git|git|golang,git
149 | bing-ip2hosts|bing-ip2hosts|information_gathering|https://github.com/urbanadventurer/bing-ip2hosts.git|git|git
150 | binwalk|binwalk|forensics_tools|https://github.com/ReFirmLabs/binwalk.git|git|python,git
151 | blackbox|blackbox|vulnerability_scanner,exploitation_tools|https://github.com/jothatron/blackbox.git|git|python,git
152 | bleachbit|bleachbit|null|https://github.com/bleachbit/bleachbit.git|git|python,git
153 | braa|braa|information_gathering|https://github.com/mteg/braa.git|git|clang,gcc,git
154 | brutespray|brutespray|null|https://github.com/x90skysn3k/brutespray.git|git|python,git
155 | bulk_extractor|bulk_extractor|forensics_tools|https://github.com/simsong/bulk_extractor.git|git|clang,gcc,g++,git
156 | c++|gpp|programming_language|null|package_manager|null
157 | capstone|capstone|forensics_tools|https://github.com/aquynh/capstone.git|git|clang,gcc,python,git
158 | catphish|catphish|null|https://github.com/ring0lab/catphish.git|git|ruby,git
159 | cdpsnarf|cdpsnarf|information_gathering|https://github.com/Zapotek/cdpsnarf.git|git|clang,gcc,git
160 | clang|clang|programming_language|null|package_manager|null
161 | commix|commix|exploitation_tools,web_hacking|https://github.com/commixproject/commix.git|git|python,git
162 | cowpatty|cowpatty|wireless_testing|https://github.com/joswr1ght/cowpatty.git|git|clang,gcc,git
163 | cpscan|cpscan|null|https://github.com/susmithHCK/cpscan.git|git|python,git
164 | crackle|crackle|exploitation_tools,wireless_testing|https://github.com/mikeryan/crackle.git|git|clang,gcc,perl,git
165 | creddump|creddump|password_attack|https://github.com/moyix/creddump.git|git|python,git
166 | credmap|credmap|null|https://github.com/lightos/credmap.git|git|python,git
167 | crowbar|crowbar|password_attack|https://github.com/galkan/crowbar.git|git|python,git
168 | cuckoo|cuckoo|forensics_tools|https://github.com/cuckoosandbox/cuckoo.git|git|python,git
169 | cupp|cupp|password_attack|https://github.com/Mebus/cupp.git|git|python,git
170 | curl|curl|package|null|package_manager|null
171 | c|clang|programming_language|null|package_manager|null
172 | dbd|dbd|maintaining_access|https://github.com/gitdurandal/dbd.git|git|clang,gcc,git
173 | deblaze|deblaze|web_hacking|https://github.com/SpiderLabs/deblaze.git|git|clang,gcc,python,git
174 | dedsploit|dedsploit|null|https://github.com/ex0dus-0x/dedsploit.git|git|python,git
175 | demiguise|demiguise|null|https://github.com/nccgroup/demiguise.git|git|python,git
176 | distorm|distorm|forensics_tools|https://github.com/gdabah/distorm.git|git|clang,gcc,python,git
177 | djangohunter|djangohunter|null|https://github.com/6IX7ine/djangohunter.git|git|python,git
178 | dmitry|dmitry|information_gathering|https://github.com/jaygreig86/dmitry.git|git|clang,gcc,git
179 | dnschef|dnschef|sniffing_spoofing|https://gitlab.com/kalilinux/packages/dnschef.git|git|python,git
180 | dnsenum|dnsenum|information_gathering|https://github.com/fwaeytens/dnsenum.git|git|perl,git
181 | dnsmap|dnsmap|information_gathering|https://github.com/makefu/dnsmap.git|git|clang,gcc,git
182 | dnsrecon|dnsrecon|information_gathering|https://github.com/darkoperator/dnsrecon.git|git|python,ruby,git
183 | doona|doona|vulnerability_scanner|https://github.com/wireghoul/doona.git|git|perl,git
184 | doork|doork|information_gathering,web_hacking|https://github.com/AeonDave/doork.git|git|python,git
185 | dotdotpwn|dotdotpwn|information_gathering,vulnerability_scanner|https://github.com/wireghoul/dotdotpwn.git|git|perl,git
186 | dumpzilla|dumpzilla|forensics_tools|https://gitlab.com/kalilinux/packages/dumpzilla.git|git|python,git
187 | eaphammer|eaphammer|null|https://github.com/s0lst1c3/eaphammer.git|git|python,git
188 | elpscrk|elpscrk|null|https://github.com/D4Vinci/elpscrk.git|git|python,git
189 | enum4linux|enum4linux|information_gathering|https://github.com/portcullislabs/enum4linux.git|git|perl,git
190 | eternal_scanner|eternal_scanner|null|https://github.com/peterpt/eternal_scanner.git|git|python,git
191 | evilginx|evilginx|null|https://github.com/kgretzky/evilginx.git|git|python,git
192 | exploitdb|exploitdb|exploitation_tools|https://github.com/offensive-security/exploitdb.git|git|clang,gcc,python,git
193 | extundelete|extundelete|forensics_tools|https://gitlab.com/kalilinux/packages/extundelete.git|git|clang,gcc,g++,python,git
194 | ezsploit|ezsploit|null|https://github.com/rand0m1ze/ezsploit.git|git|git
195 | faraday|faraday|information_gathering|https://github.com/infobyte/faraday.git|git|python,git
196 | fbht|fbht|null|https://github.com/chinoogawa/fbht.git|git|python,git
197 | fbvid|fbvid|null|https://github.com/Tuhinshubhra/fbvid.git|git|php,git
198 | fern-wifi-cracker|fern-wifi-cracker|wireless_testing|https://github.com/savio-code/fern-wifi-cracker.git|git|python,git
199 | fierce|fierce|information_gathering|https://github.com/mschwager/fierce.git|git|python,git
200 | figlet|figlet|package|null|package_manager|null
201 | findmyhash|findmyhash|password_attack|https://gitlab.com/kalilinux/packages/findmyhash.git|git|python,git
202 | firewalk|firewalk|information_gathering|https://gitlab.com/kalilinux/packages/firewalk.git|git|clang,gcc,git
203 | fluxion|fluxion|wireless_testing|https://github.com/FluxionNetwork/fluxion.git|git|git
204 | foremost|foremost|forensics_tools|https://gitlab.com/kalilinux/packages/foremost.git|git|clang,gcc,git
205 | fragrouter|fragrouter|information_gathering|https://gitlab.com/kalilinux/packages/fragrouter.git|git|clang,gcc,git
206 | fragroute|fragroute|information_gathering|https://gitlab.com/kalilinux/packages/fragroute.git|git|clang,gcc,git
207 | fsociety|fsociety|null|https://github.com/Manisso/fsociety.git|git|python,git
208 | fuckshitup|fuckshitup|null|https://github.com/Smaash/fuckshitup.git|git|php,git
209 | fuxploider|fuxploider|null|https://github.com/almandin/fuxploider.git|git|python,git
210 | gasmask|gasmask|null|https://github.com/twelvesec/gasmask.git|git|python,git
211 | gcat|gcat|null|https://github.com/byt3bl33d3r/gcat.git|git|python,git
212 | get|get|null|https://github.com/peterpt/get.git|git|git
213 | ghost-phisher|ghost-phisher|information_gathering|https://github.com/savio-code/ghost-phisher.git|git|python,git
214 | giskismet|giskismet|wireless_testing|https://github.com/xtr4nge/giskismet.git|git|perl,git
215 | git|git|package|null|package_manager|null
216 | gobuster|gobuster|web_hacking|https://github.com/OJ/gobuster.git|git|golang,git
217 | golang|golang|programming_language|null|package_manager|null
218 | golismero|golismero|information_gathering|https://github.com/golismero/golismero.git|git|python,git
219 | goofile|goofile|information_gathering|https://gitlab.com/kalilinux/packages/goofile.git|git|python,git
220 | gcc|gcc|programming_language|null|package_manager|null
221 | hURL|hURL|web_hacking|https://github.com/fnord0/hURL.git|git|perl,git
222 | hacktronian|hacktronian|null|https://github.com/thehackingsage/hacktronian.git|git|git
223 | hakkuframework|hakkuframework|null|https://github.com/4shadoww/hakkuframework.git|git|python,git
224 | hammer|hammer|ddos|https://github.com/cyweb/hammer.git|git|python,git
225 | hash-generator|hash-generator|password_attack|https://github.com/CiKu370/hash-generator.git|git|python,git
226 | hashcat|hashcat|password_attack|https://github.com/hashcat/hashcat.git|git|clang,gcc,git
227 | hasherdotid|hasherdotid|password_attack|https://github.com/galauerscrew/hasherdotid.git|git|python,git
228 | hasher|hasher|password_attack|https://github.com/CiKu370/hasher.git|git|python,git
229 | httptunnel|httptunnel|maintaining_access|https://github.com/larsbrinkhoff/httptunnel.git|git|clang,gcc,git
230 | hulk|hulk|ddos|https://github.com/grafov/hulk.git|git|python,git
231 | hydra|hydra|stress_testing,password_attack|null|package_manager|null
232 | iSMTP|ipwn|information_gathering|https://github.com/altjx/ipwn.git|git|python,git
233 | intrace|intrace|information_gathering|https://github.com/robertswiecki/intrace.git|git|clang,gcc,git
234 | jboss-autopwn|jboss-autopwn|null|https://github.com/SpiderLabs/jboss-autopwn.git|git|git
235 | johnny|johnny|password_attack|https://github.com/shinnok/johnny.git|git|clang,gcc,g++,git
236 | joomscan|joomscan|web_hacking|https://github.com/rezasp/joomscan.git|git|perl,git
237 | jsql-injection|jsql-injection|vulnerability_scanner|https://github.com/ron190/jsql-injection.git|git|php,git
238 | kalibrate-rtl|kalibrate-rtl|wireless_testing|https://github.com/steve-m/kalibrate-rtl.git|git|clang,gcc,g++,git
239 | keimpx|keimpx|password_attack|https://github.com/inquisb/keimpx.git|git|python,git
240 | kickthemout|kickthemout|wireless_testing|https://github.com/k4m4/kickthemout.git|git|python,git
241 | killchain|killchain|null|https://github.com/ruped24/killchain.git|git|python,git
242 | killerbee|killerbee|wireless_testing|https://github.com/riverloopsec/killerbee.git|git|python,clang,gcc,g++,git
243 | killshot|killshot|null|https://github.com/bahaabdelwahed/killshot.git|git|ruby,git
244 | koadic|koadic|null|https://github.com/zerosum0x0/koadic.git|git|python,git
245 | kwetza|kwetza|null|https://github.com/sensepost/kwetza.git|git|python,git
246 | leviathan|leviathan|null|https://github.com/tearsecurity/leviathan.git|git|python,git
247 | lscript|lscript|null|https://github.com/arismelachroinos/lscript.git|git|git
248 | lynis|lynis|vulnerability_scanner|https://github.com/CISOfy/lynis.git|git|git
249 | maskprocessor|maskprocessor|password_attack|https://github.com/hashcat/maskprocessor.git|git|clang,gcc,git
250 | masscan|masscan|information_gathering|https://github.com/robertdavidgraham/masscan.git|git|clang,gcc,git
251 | metasploit-framework|msfinstall|exploitation_tools|https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb|curl|curl
252 | mfcuk|mfcuk|wireless_testing|https://github.com/nfc-tools/mfcuk.git|git|clang,gcc,git
253 | mfoc|mfoc|wireless_testing|https://github.com/nfc-tools/mfoc.git|git|clang,gcc,git
254 | mfterm|mfterm|wireless_testing|https://github.com/4ZM/mfterm.git|git|clang,gcc,git
255 | mitmproxy|mitmproxy|sniffing_spoofing|https://github.com/mitmproxy/mitmproxy.git|git|python,git
256 | morpheus|morpheus|null|https://github.com/r00t-3xp10it/morpheus.git|git|python,git
257 | msfpc|msfpc|exploitation_tools|https://github.com/g0tmi1k/msfpc.git|git|git
258 | multimon-ng|multimon-ng|wireless_testing|https://github.com/EliasOenal/multimon-ng.git|git|python,clang,gcc,git
259 | nWatch|nWatch|null|https://github.com/s0cket7/nWatch.git|git|python,git
260 | nano|nano|package|null|package_manager|null
261 | netattack2|netattack2|wireless_testing|https://github.com/chrizator/netattack2.git|git|python,git
262 | netattack|netattack|wireless_testing|https://github.com/chrizator/netattack.git|git|python,git
263 | netdiscover|netdiscover|null|https://github.com/alexxy/netdiscover.git|git|git
264 | nginx|nginx|web_server,package|null|package_manager|null
265 | nikto|nikto|information_gathering|https://github.com/sullo/nikto.git|git|perl,git
266 | nishang|nishang|maintaining_access|https://github.com/samratashok/nishang.git|git|git
267 | nmap|nmap|information_gathering,vulnerability_scanner|null|package_manager|null
268 | nodejs|nodejs|programming_language|null|package_manager|null
269 | nodexp|nodexp|null|https://github.com/esmog/nodexp.git|git|python,git
270 | noisy|noisy|null|https://github.com/1tayH/noisy.git|git|python,git
271 | onioff|onioff|null|https://github.com/k4m4/onioff.git|git|python,git
272 | openvas|openvas|vulnerability_scanner|https://github.com/greenbone/openvas.git|git|clang,gcc,git
273 | osrframework|osrframework|information_gathering|https://github.com/i3visio/osrframework.git|git|python,git
274 | p0f|p0f|forensics_tools|https://gitlab.com/kalilinux/packages/p0f.git|git|clang,gcc,g++,git
275 | patator|patator|password_attack|https://gitlab.com/kalilinux/packages/patator.git|git|python,git
276 | pdf-parser|pdf-parser|forensics_tools|https://gitlab.com/kalilinux/packages/pdf-parser.git|git|python,git
277 | peepdf|peepdf|null|https://github.com/jesparza/peepdf.git|git|python,git
278 | perl|perl|programming_language|null|package_manager|null
279 | php|php|programming_language|null|package_manager|null
280 | pixiewps|pixiewps|wireless_testing|https://github.com/wiire-a/pixiewps.git|git|clang,gcc,git
281 | plecost|plecost|web_hacking|https://github.com/iniqua/plecost.git|git|python,git
282 | powerfuzzer|powerfuzzer|vulnerability_scanner|https://gitlab.com/marcinguy/powerfuzzer.git|git|python,git
283 | proxystrike|proxystrike|web_hacking|https://github.com/qunxyz/proxystrike.git|git|python,git
284 | pupy|pupy|null|https://github.com/n1nj4sec/pupy|git|python,git
285 | pwnat|pwnat|maintaining_access|https://github.com/samyk/pwnat.git|git|clang,gcc,git
286 | pyPISHER|pyPISHER|sniffing_spoofing|https://github.com/Renato-Silva/pyPISHER.git|git|python,git
287 | pybluez|pybluez|null|https://github.com/karulis/pybluez.git|git|python,git
288 | pydictor|pydictor|null|https://github.com/LandGrey/pydictor.git|git|python,git
289 | python|python|programming_language|null|package_manager|null
290 | qark|qark|null|https://github.com/linkedin/qark.git|git|python,git
291 | rang3r|rang3r|vulnerability_scanner|https://github.com/floriankunushevci/rang3r.git|git|python,git
292 | rdpy|rdpy|null|https://github.com/citronneur/rdpy.git|git|python,git
293 | reaver|reaver-wps-fork-t6x|wireless_testing|https://github.com/t6x/reaver-wps-fork-t6x.git|git|clang,gcc,git
294 | recon-ng|recon-ng|information_gathering|https://github.com/lanmaster53/recon-ng.git|git|python,git
295 | ridenum|ridenum|maintaining_access|https://github.com/trustedsec/ridenum.git|git|python,git
296 | routersploit|routersploit|vulnerability_scanner,exploitation_tools|https://github.com/reverse-shell/routersploit.git|git|python,git
297 | roxysploit|roxysploit|exploitation_tools|https://github.com/andyvaikunth/roxysploit.git|git|python,git
298 | ruby|ruby|programming_language|null|package_manager|null
299 | sAINT|sAINT|null|https://github.com/tiagorlampert/sAINT.git|git|git
300 | santet-online|santet-online|stress_testing,sniffing_spoofing|https://github.com/Gameye98/santet-online.git|git|python,git
301 | secHub|secHub|null|https://github.com/cys3c/secHub.git|git|python,git
302 | shellnoob|shellnoob|exploitation_tools|https://github.com/reyammer/shellnoob.git|git|python,git
303 | shellstack|shellstack|null|https://github.com/Tuhinshubhra/shellstack.git|git|php,git
304 | shimit|shimit|null|https://github.com/cyberark/shimit.git|git|python,git
305 | shodanwave|shodanwave|null|https://github.com/6IX7ine/shodanwave.git|git|python,git
306 | sipvicious|sipvicious|sniffing_spoofing|https://github.com/EnableSecurity/sipvicious.git|git|python,git
307 | skipfish|skipfish|web_hacking|https://gitlab.com/kalilinux/packages/skipfish.git|git|clang,gcc,git
308 | slowhttptest|slowhttptest|stress_testing|https://github.com/shekyan/slowhttptest.git|git|clang,gcc,g++,git
309 | slowloris|slowloris|ddos,stress_testing|https://github.com/gkbrk/slowloris.git|git|python,git
310 | smap|smap|web_hacking|https://github.com/s0cket7/smap|git|python,git
311 | smbmap|smbmap|information_gathering|https://github.com/ShawnDEvans/smbmap.git|git|python,git
312 | sniffjoke|sniffjoke|sniffing_spoofing|https://github.com/vecna/sniffjoke.git|git|clang,gcc,g++,git
313 | social-engineer-toolkit|social-engineer-toolkit|information_gathering,exploitation_tools,password_attack,sniffing_spoofing|https://github.com/trustedsec/social-engineer-toolkit.git|git|python,git
314 | sqliv|sqliv|vulnerability_scanner,web_hacking|https://github.com/Hadesy2k/sqliv.git|git|python,git
315 | sqlmap|sqlmap|information_gathering,vulnerability_scanner,exploitation_tools,web_hacking|https://github.com/sqlmapproject/sqlmap|git|python,git
316 | sqlmate|sqlmate|information_gathering,vulnerability_scanner,web_hacking|https://github.com/s0md3v/sqlmate.git|git|python,git
317 | sqlscan|sqlscan|information_gathering,vulnerability_scanner,web_hacking|https://github.com/Cvar1984/sqlscan.git|git|php,git
318 | sslcaudit|sslcaudit|information_gathering|https://github.com/abbbe/sslcaudit.git|git|clang,gcc,git
319 | sslsplit|sslsplit|information_gathering|https://github.com/droe/sslsplit.git|git|clang,gcc,git
320 | sslstrip|sslstrip|information_gathering,sniffing_spoofing|https://github.com/moxie0/sslstrip.git|git|python,git
321 | sslyze|sslyze|information_gathering|https://github.com/iSECPartners/sslyze.git|git|python,git
322 | subscraper|subscraper|null|https://github.com/m8r0wn/subscraper.git|git|python,git
323 | termineter|termineter|stress_testing|https://github.com/securestate/termineter.git|git|python,git
324 | termux-fedora|termux-fedora|termux_os|https://github.com/nmilosev/termux-fedora.git|git|git
325 | termux-lazysqlmap|termux-lazysqlmap|null|https://github.com/verluchie/termux-lazysqlmap.git|git|git
326 | termux-ubuntu|termux-ubuntu|termux_os|https://github.com/Neo-Oli/termux-ubuntu.git|git|git
327 | thc-ipv6|thc-ipv6|information_gathering,vulnerability_scanner,exploitation_tools|https://github.com/vanhauser-thc/thc-ipv6.git|git|clang,gcc,git
328 | the-backdoor-factory|the-backdoor-factory|exploitation_tools|https://github.com/secretsquirrel/the-backdoor-factory.git|git|python,git
329 | theHarvester|theHarvester|information_gathering|https://github.com/laramies/theHarvester.git|git|python,git
330 | toilet|toilet|package|null|package_manager|null
331 | torghost|torghost|null|https://github.com/susmithHCK/torghost.git|git|python,git
332 | torshammer|torshammer|stress_testing|https://github.com/dotfighter/torshammer.git|git|python,git
333 | tor|tor|package|null|package_manager|null
334 | trackout|trackout|information_gathering,ip_tracking|https://github.com/abaykan/trackout.git|git|python,git
335 | trape|trape|ip_tracking|https://github.com/boxug/trape.git|git|python,git
336 | trojanizer|trojanizer|null|https://github.com/r00t-3xp10it/trojanizer.git|git|git
337 | txtool|txtool|exploitation_tools|https://github.com/kuburan/txtool.git|git|python,git
338 | uidsploit|uidsploit|null|https://github.com/siruidops/uidsploit.git|git|git
339 | volatility|volatility|forensics_tools|https://github.com/volatilityfoundation/volatility.git|git|python,git
340 | w3af|w3af|web_hacking|https://github.com/andresriancho/w3af.git|git|python,git
341 | w3m|w3m|package|null|package_manager|null
342 | wafw00f|wafw00f|null|https://github.com/EnableSecurity/wafw00f.git|git|python,git
343 | webdav|webdav|web_hacking|https://github.com/hacdias/webdav.git|git|golang,git
344 | webpwn3r|webpwn3r|null|https://github.com/zigoo0/webpwn3r.git|git|python,git
345 | websploit|websploit|web_hacking,exploitation_tools|https://github.com/websploit/websploit.git|git|python,git
346 | weeman|weeman|null|https://github.com/evait-security/weeman.git|git|python,git
347 | weevely3|weevely3|null|https://github.com/epinna/weevely3.git|git|python,git
348 | wfdroid-termux|wfdroid-termux|null|https://github.com/bytezcrew/wfdroid-termux.git|git|git
349 | wfuzz|wfuzz|web_hacking|https://github.com/xmendez/wfuzz.git|git|python,git
350 | wget|wget|package|null|package_manager|null
351 | wifi-hacker|wifi-hacker|wireless_testing|https://github.com/esc0rtd3w/wifi-hacker.git|git|git
352 | wifigod|wifigod|wireless_testing|https://github.com/blackholesec/wifigod.git|git|python,git
353 | wifiphisher|wifiphisher|wireless_testing|https://github.com/wifiphisher/wifiphisher.git|git|python,git
354 | wifitap|wifitap|wireless_testing|https://github.com/GDSSecurity/wifitap.git|git|python,git
355 | wifite2|wifite2|wireless_testing|https://github.com/derv82/wifite2.git|git|python,git
356 | wifite|wifite|wireless_testing|https://github.com/derv82/wifite.git|git|python,git
357 | wifresti|wifresti|wireless_testing|https://github.com/LionSec/wifresti.git|git|python,git
358 | wirespy|wirespy|wireless_testing|https://github.com/AresS31/wirespy.git|git|git
359 | wpscan|wpscan|information_gathering,vulnerability_scanner,web_hacking|https://github.com/wpscanteam/wpscan.git|git|ruby,git
360 | wreckuests|wreckuests|null|https://github.com/JamesJGoodwin/wreckuests.git|git|python,git
361 | xerosploit|xerosploit|exploitation_tools|https://github.com/LionSec/xerosploit.git|git|python,git
362 | xplico|xplico|forensics_tools|https://gitlab.com/kalilinux/packages/xplico.git|git|clang,gcc,php,git
363 | xspy|xspy|sniffing_spoofing|https://github.com/mnp/xspy.git|git|clang,gcc,git
364 | xsser|xsser|web_hacking|https://github.com/epsylon/xsser.git|git|python,git
365 | yersinia|yersinia|vulnerability_scanner,exploitation_tools|https://github.com/tomac/yersinia.git|git|clang,gcc,git
366 | zambie|zambie|null|https://github.com/zanyarjamal/zambie.git|git|python,git
367 | zaproxy|zaproxy|web_hacking|https://github.com/zaproxy/zaproxy.git|git|python,php,git
368 | zarp|zarp|null|https://github.com/hatRiot/zarp.git|git|python,git
369 | zip|zip|package|null|package_manager|null
370 | zirikatu|zirikatu|null|https://github.com/pasahitz/zirikatu.git|git|git
--------------------------------------------------------------------------------
/doc/Screenshot_2019-12-01-12-09-26-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MasterScott/onex/7aa4e697c0eed44394d67196233eae4709231260/doc/Screenshot_2019-12-01-12-09-26-1.png
--------------------------------------------------------------------------------
/doc/Screenshot_2019-12-01-12-10-02-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MasterScott/onex/7aa4e697c0eed44394d67196233eae4709231260/doc/Screenshot_2019-12-01-12-10-02-1.png
--------------------------------------------------------------------------------
/doc/category.txt:
--------------------------------------------------------------------------------
1 | category_alias_name|category_name
--------------------------------------------------------------------------------
/doc/tools.txt:
--------------------------------------------------------------------------------
1 | tool_alias_name|package_name/tool_name|tool_category|tool_url|tool_installer|tool_dependency
--------------------------------------------------------------------------------
/install:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # onex v0.1
3 |
4 | logo="\033[01;33m
5 | ___ _ __ ___\033[01;31m__ __
6 | \033[01;33m / _ \\| '_ \\ / _ \033[01;31m\\ \\/ /
7 | \033[01;33m| (_) | | | | __/\033[01;31m> <
8 | \033[01;33m \___/|_| |_|\\___\033[01;31m/_/\_\\
9 | "
10 | if [ -d $HOME ]; then
11 | home=$HOME
12 | else
13 | home="~/"
14 | fi
15 |
16 | if [ -d /data/data/com.termux/files/usr/bin ]; then
17 | bin="/data/data/com.termux/files/usr/bin"
18 | elif [ -d /usr/bin ]; then
19 | bin="/usr/bin"
20 | elif [ -d /bin ]; then
21 | bin="/bin"
22 | fi
23 |
24 | if [ -d /data/data/com.termux/files/usr/etc ]; then
25 | conf_dir="/data/data/com.termux/files/usr/etc"
26 | elif [ -d /usr/etc ]; then
27 | conf_dir="/usr/etc"
28 | elif [ -d /etc ]; then
29 | conf_dir="/etc"
30 | fi
31 |
32 | if [ -d $conf_dir/onex ]; then
33 | if [ -e $conf_dir/onex/data/tools.dat ]; then
34 | tools_data="$conf_dir/onex/data/tools.dat"
35 | fi
36 | if [ -e $conf_dir/onex/data/category.dat ]; then
37 | category_data="$conf_dir/onex/data/category.dat"
38 | fi
39 | else
40 | if [ -e data/tools.dat ]; then
41 | tools_data="data/tools.dat"
42 | fi
43 | if [ -e data/category.dat ]; then
44 | category_data="data/category.dat"
45 | fi
46 | fi
47 |
48 | if [ -e /usr/lib/sudo ]; then
49 | sudo="sudo"
50 | elif [ -e /usr/bin/sudo ]; then
51 | sudo="sudo"
52 | elif [ -e /lib/sudo ]; then
53 | sudo="sudo"
54 | elif [ -e /bin/sudo ]; then
55 | sudo="sudo"
56 | elif [ -e /data/data/com.termux/files/usr/bin/sudo ]; then
57 | sudo="sudo"
58 | else
59 | sudo=""
60 | fi
61 |
62 | if [ -e /bin/apt ]; then
63 | pac="apt-get"
64 | system="linux"
65 | elif [ -e /bin/apt-get ]; then
66 | pac="apt-get"
67 | system="linux"
68 | elif [ -e /usr/bin/apt-get ]; then
69 | pac="apt-get"
70 | system="linux"
71 | elif [ -e /bin/yum ]; then
72 | pac="yum"
73 | system="fedora"
74 | elif [ -e /usr/bin/yum ]; then
75 | pac="yum"
76 | system="fedora"
77 | elif [ -e /bin/brew ]; then
78 | pac="brew"
79 | system="mac"
80 | elif [ -e /usr/bin/brew ]; then
81 | pac="brew"
82 | system="mac"
83 | elif [ -e /data/data/com.termux/files/usr/bin/pkg ]; then
84 | pac="pkg"
85 | system="termux"
86 | elif [ -e /data/data/com.termux/files/usr/bin/apt ]; then
87 | pac="apt"
88 | system="termux"
89 | elif [ -e /data/data/com.termux/files/usr/bin/apt-get ]; then
90 | pac="apt-get"
91 | system="termux"
92 | fi
93 |
94 | # setup process
95 | clear
96 | echo "$logo"
97 | echo "\033[01;32m Installing .... \033[00m"
98 | sleep 1
99 | echo "\033[01;33m Running setup .... \033[00m"
100 | sleep 1
101 |
102 | # installing dependency
103 | if [ ! -e $bin/wget ]; then
104 | if [ $sudo ]; then
105 | $sudo $pac install wget -y
106 | else
107 | $pac install wget -y
108 | fi
109 | fi
110 | if [ ! -e $bin/curl ]; then
111 | if [ $sudo ]; then
112 | $sudo $pac install curl -y
113 | else
114 | $pac install curl -y
115 | fi
116 | fi
117 | if [ ! -e $bin/git ]; then
118 | if [ $sudo ]; then
119 | $sudo $pac install git -y
120 | else
121 | $pac install git -y
122 | fi
123 | fi
124 |
125 | # removing old one
126 | if [ -e $bin/onex ]; then
127 | if [ -d $conf_dir/onex ]; then
128 | if [ $sudo ]; then
129 | $sudo rm -rf $bin/onex
130 | $sudo rm -rf $conf_dir/onex
131 | else
132 | rm -rf $bin/onex
133 | rm -rf $conf_dir/onex
134 | fi
135 | fi
136 | fi
137 |
138 | # install onex
139 | if [ $0 = "install" -o $0 = "./install" ]; then
140 | if [ -e onex ]; then
141 | if [ $sudo ]; then
142 | $sudo mv -v onex $bin
143 | $sudo chmod +x $bin/onex
144 | else
145 | mv -v onex $bin
146 | chmod +x $bin/onex
147 | fi
148 | fi
149 | cd ..
150 | if [ -d onex ]; then
151 | if [ $sudo ]; then
152 | $sudo mv -v onex $conf_dir
153 | else
154 | mv -v onex $conf_dir
155 | fi
156 | fi
157 | else
158 | if [ -e onex/onex ]; then
159 | if [ $sudo ]; then
160 | $sudo mv -v onex/onex $bin
161 | $sudo chmod +x $bin/onex
162 | else
163 | mv -v onex/onex $bin
164 | chmod +x $bin/onex
165 | fi
166 | fi
167 | if [ -d onex ]; then
168 | if [ $sudo ]; then
169 | $sudo mv -v onex $conf_dir
170 | else
171 | mv -v onex $conf_dir
172 | fi
173 | fi
174 | fi
175 |
176 | # check onex is installed or not
177 | if [ -e $bin/onex ]; then
178 | if [ -d $conf_dir/onex ]; then
179 | clear
180 | echo "$logo"
181 | echo " \033[00mOnex \033[01;32minstalled successfully !!"
182 | echo " \033[01;32mtype \033[00m'onex -h'\033[01;32m for more.\033[00m"
183 | else
184 | clear
185 | echo "$logo"
186 | echo " \033[01;31mSorry \033[00m: onex \033[01;31mis not installed !!"
187 | echo " \033[01;32mPlease try again\033[00m"
188 | fi
189 | fi
--------------------------------------------------------------------------------
/onex:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # Name : Onex v0.1
3 | # Date : 24 November 2019
4 | # onex is a hacking tools installer and package manager for hacker's.
5 |
6 | logo="\033[01;33m
7 | ___ _ __ ___\033[01;31m__ __
8 | \033[01;33m / _ \\| '_ \\ / _ \033[01;31m\\ \\/ /
9 | \033[01;33m| (_) | | | | __/\033[01;31m> <
10 | \033[01;33m \___/|_| |_|\\___\033[01;31m/_/\_\\
11 | "
12 | prompt="\007\033[00m[\033[01;34monex\033[00m@\033[01;34mspace\033[00m]$"
13 |
14 | if [ -d $HOME ]; then
15 | home=$HOME
16 | else
17 | home="~/"
18 | fi
19 |
20 | if [ -d /data/data/com.termux/files/usr/bin ]; then
21 | bin="/data/data/com.termux/files/usr/bin"
22 | elif [ -d /usr/bin ]; then
23 | bin="/usr/bin"
24 | elif [ -d /bin ]; then
25 | bin="/bin"
26 | fi
27 |
28 | if [ -d /data/data/com.termux/files/usr/etc ]; then
29 | conf_dir="/data/data/com.termux/files/usr/etc"
30 | elif [ -d /usr/etc ]; then
31 | conf_dir="/usr/etc"
32 | elif [ -d /etc ]; then
33 | conf_dir="/etc"
34 | fi
35 |
36 | if [ -d $conf_dir/onex ]; then
37 | if [ -e $conf_dir/onex/data/tools.dat ]; then
38 | tools_data="$conf_dir/onex/data/tools.dat"
39 | fi
40 | if [ -e $conf_dir/onex/data/category.dat ]; then
41 | category_data="$conf_dir/onex/data/category.dat"
42 | fi
43 | else
44 | if [ -e data/tools.dat ]; then
45 | tools_data="data/tools.dat"
46 | fi
47 | if [ -e data/category.dat ]; then
48 | category_data="data/category.dat"
49 | fi
50 | fi
51 |
52 | if [ -e /usr/lib/sudo ]; then
53 | sudo="sudo"
54 | elif [ -e /usr/bin/sudo ]; then
55 | sudo="sudo"
56 | elif [ -e /lib/sudo ]; then
57 | sudo="sudo"
58 | elif [ -e /bin/sudo ]; then
59 | sudo="sudo"
60 | elif [ -e /data/data/com.termux/files/usr/bin/sudo ]; then
61 | sudo="sudo"
62 | else
63 | sudo=""
64 | fi
65 |
66 | if [ -e /bin/apt ]; then
67 | pac="apt-get"
68 | system="linux"
69 | elif [ -e /bin/apt-get ]; then
70 | pac="apt-get"
71 | system="linux"
72 | elif [ -e /usr/bin/apt-get ]; then
73 | pac="apt-get"
74 | system="linux"
75 | elif [ -e /bin/yum ]; then
76 | pac="yum"
77 | system="fedora"
78 | elif [ -e /usr/bin/yum ]; then
79 | pac="yum"
80 | system="fedora"
81 | elif [ -e /bin/brew ]; then
82 | pac="brew"
83 | system="mac"
84 | elif [ -e /usr/bin/brew ]; then
85 | pac="brew"
86 | system="mac"
87 | elif [ -e /data/data/com.termux/files/usr/bin/pkg ]; then
88 | pac="pkg"
89 | system="termux"
90 | elif [ -e /data/data/com.termux/files/usr/bin/apt ]; then
91 | pac="apt"
92 | system="termux"
93 | elif [ -e /data/data/com.termux/files/usr/bin/apt-get ]; then
94 | pac="apt-get"
95 | system="termux"
96 | fi
97 |
98 | # install tools
99 | install() {
100 | # get tool alias name
101 | tool_name=`grep '.' $tools_data | sort -f | sed -n "$1p" | cut -d"|" -f1`
102 | # get tool package manager
103 | tool_installer=`grep '.' $tools_data | sort -f | sed -n "$1p" | cut -d"|" -f5`
104 | # tool dependency (requirements)
105 | tool_dependency=`grep '.' $tools_data | sort -f | sed -n "$1p" | cut -d"|" -f6 | tr ' ' ','`
106 | # tool url
107 | tool_url=`grep '.' $tools_data | sort -f | sed -n "$1p" | cut -d"|" -f4`
108 | # package name or tool name
109 | tool_pac=`grep '.' $tools_data | sort -f | sed -n "$1p" | cut -d"|" -f2`
110 | # check tool name is null or not
111 | if [ "$tool_name" ]; then
112 |
113 | # for default package
114 | if [ $tool_installer = "package_manager" ]; then
115 | # check tool is already installed or not
116 | if [ ! -e $bin/$tool_pac ]; then
117 | # check sudo is null or not
118 | if [ $sudo ]; then
119 | #check user is online or not
120 | wget -q --spider http://google.com
121 | if [ $? -eq 0 ]; then
122 | echo "\033[01;32mInstalling ...\033[00m"
123 | sleep 1
124 | # install tool dependency
125 | if [ $tool_dependency != "null" ]; then
126 | for dep_name in `echo $tool_dependency | tr ',' ' '`; do
127 | # installing dependency
128 | if [ ! -e $bin/$dep_name ]; then
129 | $sudo $pac install $dep_name -y
130 | fi
131 | done
132 | fi
133 | # installing tools
134 | if [ $tool_pac != "" -a $tool_pac != "null" ]; then
135 | $sudo $pac install $tool_pac -y
136 | fi
137 | else
138 | echo "\033[01;31mSorry you are offline !!\033[00m"
139 | fi
140 | else
141 | #check user is online or not
142 | wget -q --spider http://google.com
143 | if [ $? -eq 0 ]; then
144 | echo "\033[01;32mInstalling ...\033[00m"
145 | sleep 1
146 | # install tool dependency
147 | if [ $tool_dependency != "null" ]; then
148 | for dep_name in `echo $tool_dependency | tr ',' ' '`; do
149 | # installing dependency
150 | if [ ! -e $bin/$dep_name ]; then
151 | $pac install $dep_name -y
152 | fi
153 | done
154 | fi
155 | # installing tools
156 | if [ $tool_pac != "" -a $tool_pac != "null" ]; then
157 | $pac install $tool_pac -y
158 | fi
159 | else
160 | echo "\033[01;31mSorry \033[00m: you are \033[01;31moffline \033[00m!!\033[00m"
161 | fi
162 | fi
163 | # check tool is installed or not
164 | if [ ! -e $bin/$tool_pac ]; then
165 | echo "\033[01;31mSorry \033[00m: '$tool_name' \033[01;31mis not installed !!\033[00m"
166 | else
167 | echo "\033[00m'$tool_name' \033[00m: \033[01;32mis installed successfully !!\033[00m"
168 | fi
169 | else
170 | echo "\033[01;31mSorry \033[00m: \033[00m'$tool_name' \033[01;32mis already installed !!\033[00m"
171 | fi
172 |
173 | # for github tools
174 | elif [ $tool_installer = "git" ]; then
175 | # check tool is already installed or not
176 | if [ ! -e ~/$tool_pac ]; then
177 | # check sudo is null or not
178 | if [ $sudo ]; then
179 | #check user is online or not
180 | wget -q --spider http://google.com
181 | if [ $? -eq 0 ]; then
182 | echo "\033[01;32mInstalling ...\033[00m"
183 | sleep 1
184 | # install tool dependency
185 | if [ $tool_dependency != "null" ]; then
186 | for dep_name in `echo $tool_dependency | tr ',' ' '`; do
187 | # installing dependency
188 | if [ ! -e $bin/$dep_name ]; then
189 | $sudo $pac install $dep_name -y
190 | fi
191 | done
192 | fi
193 | # installing tools
194 | if [ $tool_url != "" -a $tool_url != "null" ]; then
195 | $sudo git clone $tool_url ~/$tool_name
196 | fi
197 | else
198 | echo "\033[01;31mSorry you are offline !!\033[00m"
199 | fi
200 | else
201 | #check user is online or not
202 | wget -q --spider http://google.com
203 | if [ $? -eq 0 ]; then
204 | echo "\033[01;32mInstalling ...\033[00m"
205 | sleep 1
206 | # install tool dependency
207 | if [ $tool_dependency != "null" ]; then
208 | for dep_name in `echo $tool_dependency | tr ',' ' '`; do
209 | # installing dependency
210 | if [ ! -e $bin/$dep_name ]; then
211 | $pac install $dep_name -y
212 | fi
213 | done
214 | fi
215 | # installing tools
216 | if [ $tool_url != "" -a $tool_url != "null" ]; then
217 | git clone $tool_url ~/$tool_name
218 | fi
219 | else
220 | echo "\033[01;31mSorry \033[00m: you are \033[01;31moffline \033[00m!!\033[00m"
221 | fi
222 | fi
223 | # check tool is installed or not
224 | if [ ! -e ~/$tool_pac ]; then
225 | echo "\033[01;31mSorry \033[00m: '$tool_name' \033[01;31mis not installed !!\033[00m"
226 | else
227 | echo "\033[00m'$tool_name' \033[00m: \033[01;32mis installed successfully !!\033[00m"
228 | fi
229 | else
230 | echo "\033[01;31mSorry \033[00m: \033[00m'$tool_name' \033[01;32mis already installed !!\033[00m"
231 | fi
232 |
233 | # for curl tools
234 | elif [ $tool_installer = "curl" ]; then
235 | # check tool is already installed or not
236 | if [ ! -e ~/$tool_pac ]; then
237 | # check sudo is null or not
238 | if [ $sudo ]; then
239 | #check user is online or not
240 | wget -q --spider http://google.com
241 | if [ $? -eq 0 ]; then
242 | echo "\033[01;32mInstalling ...\033[00m"
243 | sleep 1
244 | # install tool dependency
245 | if [ $tool_dependency != "null" ]; then
246 | for dep_name in `echo $tool_dependency | tr ',' ' '`; do
247 | # installing dependency
248 | if [ ! -e $bin/$dep_name ]; then
249 | $sudo $pac install $dep_name -y
250 | fi
251 | done
252 | fi
253 | # installing tools
254 | if [ $tool_url != "" -a $tool_url != "null" ]; then
255 | $sudo curl -o ~/$tool_pac $tool_url
256 | fi
257 | else
258 | echo "\033[01;31mSorry you are offline !!\033[00m"
259 | fi
260 | else
261 | #check user is online or not
262 | wget -q --spider http://google.com
263 | if [ $? -eq 0 ]; then
264 | echo "\033[01;32mInstalling ...\033[00m"
265 | sleep 1
266 | # install tool dependency
267 | if [ $tool_dependency != "null" ]; then
268 | for dep_name in `echo $tool_dependency | tr ',' ' '`; do
269 | # installing dependency
270 | if [ ! -e $bin/$dep_name ]; then
271 | $pac install $dep_name -y
272 | fi
273 | done
274 | fi
275 | # installing tools
276 | if [ $tool_url != "" -a $tool_url != "null" ]; then
277 | curl -o ~/$tool_pac $tool_url
278 | fi
279 | else
280 | echo "\033[01;31mSorry \033[00m: you are \033[01;31moffline \033[00m!!\033[00m"
281 | fi
282 | fi
283 | # check tool is installed or not
284 | if [ ! -e ~/$tool_pac ]; then
285 | echo "\033[01;31mSorry \033[00m: '$tool_name' \033[01;31mis not installed !!\033[00m"
286 | else
287 | echo "\033[00m'$tool_name' \033[00m: \033[01;32mis installed successfully !!\033[00m"
288 | fi
289 | else
290 | echo "\033[01;31mSorry \033[00m: \033[00m'$tool_name' \033[01;32mis already installed !!\033[00m"
291 | fi
292 |
293 | # for wget tools
294 | elif [ $tool_installer = "wget" ]; then
295 | # check tool is already installed or not
296 | if [ ! -e ~/$tool_pac ]; then
297 | # check sudo is null or not
298 | if [ $sudo ]; then
299 | #check user is online or not
300 | wget -q --spider http://google.com
301 | if [ $? -eq 0 ]; then
302 | echo "\033[01;32mInstalling ...\033[00m"
303 | sleep 1
304 | # install tool dependency
305 | if [ $tool_dependency != "null" ]; then
306 | for dep_name in `echo $tool_dependency | tr ',' ' '`; do
307 | # installing dependency
308 | if [ ! -e $bin/$dep_name ]; then
309 | $sudo $pac install $dep_name -y
310 | fi
311 | done
312 | fi
313 | # installing tools
314 | if [ $tool_url != "" -a $tool_url != "null" ]; then
315 | $sudo wget $tool_url -o ~/$tool_pac
316 | fi
317 | else
318 | echo "\033[01;31mSorry you are offline !!\033[00m"
319 | fi
320 | else
321 | #check user is online or not
322 | wget -q --spider http://google.com
323 | if [ $? -eq 0 ]; then
324 | echo "\033[01;32mInstalling ...\033[00m"
325 | sleep 1
326 | # install tool dependency
327 | if [ $tool_dependency != "null" ]; then
328 | for dep_name in `echo $tool_dependency | tr ',' ' '`; do
329 | # installing dependency
330 | if [ ! -e $bin/$dep_name ]; then
331 | $pac install $dep_name -y
332 | fi
333 | done
334 | fi
335 | # installing tools
336 | if [ $tool_url != "" -a $tool_url != "null" ]; then
337 | wget $tool_url -o ~/$tool_pac
338 | fi
339 | else
340 | echo "\033[01;31mSorry \033[00m: you are \033[01;31moffline \033[00m!!\033[00m"
341 | fi
342 | fi
343 | # check tool is installed or not
344 | if [ ! -e ~/$tool_pac ]; then
345 | echo "\033[01;31mSorry \033[00m: '$tool_name' \033[01;31mis not installed !!\033[00m"
346 | else
347 | echo "\033[00m'$tool_name' \033[00m: \033[01;32mis installed successfully !!\033[00m"
348 | fi
349 | else
350 | echo "\033[01;31mSorry \033[00m: \033[00m'$tool_name' \033[01;32mis already installed !!\033[00m"
351 | fi
352 | # for any new installer
353 | # put here
354 | fi
355 | fi
356 | # wait for user any input
357 | echo -n "$prompt "
358 | read tmp_inp
359 | }
360 |
361 | # install category tools
362 | install_category_tool() {
363 | # get tool alias name
364 | tool_name=`grep '.' $tools_data | sort -f | sed -n "/$1/p" | sed -n "$2 p" | cut -d"|" -f1`
365 | # get tools package manager
366 | tool_installer=`grep '.' $tools_data | sort -f | sed -n "/$1/p" | sed -n "$2 p" | cut -d"|" -f5`
367 | # tool dependency (requirements)
368 | tool_dependency=`grep '.' $tools_data | sort -f | sed -n "/$1/p" | sed -n "$2 p" | cut -d"|" -f6 | tr ' ' ','`
369 | # tool url
370 | tool_url=`grep '.' $tools_data | sort -f | sed -n "/$1/p" | sed -n "$2 p" | cut -d"|" -f4`
371 | # package name or tool name
372 | tool_pac=`grep '.' $tools_data | sort -f | sed -n "/$1/p" | sed -n "$2 p" | cut -d"|" -f2`
373 | # check tool name is null or not
374 | if [ "$tool_name" ]; then
375 |
376 | # for default package
377 | if [ $tool_installer = "package_manager" ]; then
378 | # check tool is already installed or not
379 | if [ ! -e $bin/$tool_pac ]; then
380 | # check sudo is null or not
381 | if [ $sudo ]; then
382 | #check user is online or not
383 | wget -q --spider http://google.com
384 | if [ $? -eq 0 ]; then
385 | echo "\033[01;32mInstalling ...\033[00m"
386 | sleep 1
387 | # install tool dependency
388 | if [ $tool_dependency != "null" ]; then
389 | for dep_name in `echo $tool_dependency | tr ',' ' '`; do
390 | # installing dependency
391 | if [ ! -e $bin/$dep_name ]; then
392 | $sudo $pac install $dep_name -y
393 | fi
394 | done
395 | fi
396 | # installing tools
397 | if [ $tool_pac != "" -a $tool_pac != "null" ]; then
398 | $sudo $pac install $tool_pac -y
399 | fi
400 | else
401 | echo "\033[01;31mSorry you are offline !!\033[00m"
402 | fi
403 | else
404 | #check user is online or not
405 | wget -q --spider http://google.com
406 | if [ $? -eq 0 ]; then
407 | echo "\033[01;32mInstalling ...\033[00m"
408 | sleep 1
409 | # install tool dependency
410 | if [ $tool_dependency != "null" ]; then
411 | for dep_name in `echo $tool_dependency | tr ',' ' '`; do
412 | # installing dependency
413 | if [ ! -e $bin/$dep_name ]; then
414 | $pac install $dep_name -y
415 | fi
416 | done
417 | fi
418 | # installing tools
419 | if [ $tool_pac != "" -a $tool_pac != "null" ]; then
420 | $pac install $tool_pac -y
421 | fi
422 | else
423 | echo "\033[01;31mSorry \033[00m: you are \033[01;31moffline \033[00m!!\033[00m"
424 | fi
425 | fi
426 | # check tool is installed or not
427 | if [ ! -e $bin/$tool_pac ]; then
428 | echo "\033[01;31mSorry \033[00m: '$tool_name' \033[01;31mis not installed !!\033[00m"
429 | else
430 | echo "\033[00m'$tool_name' \033[00m: \033[01;32mis installed successfully !!\033[00m"
431 | fi
432 | else
433 | echo "\033[01;31mSorry \033[00m: \033[00m'$tool_name' \033[01;32mis already installed !!\033[00m"
434 | fi
435 |
436 | # for github tools
437 | elif [ $tool_installer = "git" ]; then
438 | # check tool is already installed or not
439 | if [ ! -e ~/$tool_pac ]; then
440 | # check sudo is null or not
441 | if [ $sudo ]; then
442 | #check user is online or not
443 | wget -q --spider http://google.com
444 | if [ $? -eq 0 ]; then
445 | echo "\033[01;32mInstalling ...\033[00m"
446 | sleep 1
447 | # install tool dependency
448 | if [ $tool_dependency != "null" ]; then
449 | for dep_name in `echo $tool_dependency | tr ',' ' '`; do
450 | # installing dependency
451 | if [ ! -e $bin/$dep_name ]; then
452 | $sudo $pac install $dep_name -y
453 | fi
454 | done
455 | fi
456 | # installing tools
457 | if [ $tool_url != "" -a $tool_url != "null" ]; then
458 | $sudo git clone $tool_url ~/$tool_pac
459 | fi
460 | else
461 | echo "\033[01;31mSorry you are offline !!\033[00m"
462 | fi
463 | else
464 | #check user is online or not
465 | wget -q --spider http://google.com
466 | if [ $? -eq 0 ]; then
467 | echo "\033[01;32mInstalling ...\033[00m"
468 | sleep 1
469 | # install tool dependency
470 | if [ $tool_dependency != "null" ]; then
471 | for dep_name in `echo $tool_dependency | tr ',' ' '`; do
472 | # installing dependency
473 | if [ ! -e $bin/$dep_name ]; then
474 | $pac install $dep_name -y
475 | fi
476 | done
477 | fi
478 | # installing tools
479 | if [ $tool_url != "" -a $tool_url != "null" ]; then
480 | git clone $tool_url ~/$tool_pac
481 | fi
482 | else
483 | echo "\033[01;31mSorry \033[00m: you are \033[01;31moffline \033[00m!!\033[00m"
484 | fi
485 | fi
486 | # check tool is installed or not
487 | if [ ! -e ~/$tool_pac ]; then
488 | echo "\033[01;31mSorry \033[00m: '$tool_name' \033[01;31mis not installed !!\033[00m"
489 | else
490 | echo "\033[00m'$tool_name' \033[00m: \033[01;32mis installed successfully !!\033[00m"
491 | fi
492 | else
493 | echo "\033[01;31mSorry \033[00m: \033[00m'$tool_name' \033[01;32mis already installed !!\033[00m"
494 | fi
495 |
496 | # for curl tools
497 | elif [ $tool_installer = "curl" ]; then
498 | # check tool is already installed or not
499 | if [ ! -e ~/$tool_pac ]; then
500 | # check sudo is null or not
501 | if [ $sudo ]; then
502 | #check user is online or not
503 | wget -q --spider http://google.com
504 | if [ $? -eq 0 ]; then
505 | echo "\033[01;32mInstalling ...\033[00m"
506 | sleep 1
507 | # install tool dependency
508 | if [ $tool_dependency != "null" ]; then
509 | for dep_name in `echo $tool_dependency | tr ',' ' '`; do
510 | # installing dependency
511 | if [ ! -e $bin/$dep_name ]; then
512 | $sudo $pac install $dep_name -y
513 | fi
514 | done
515 | fi
516 | # installing tools
517 | if [ $tool_url != "" -a $tool_url != "null" ]; then
518 | $sudo curl -o ~/$tool_pac $tool_url
519 | fi
520 | else
521 | echo "\033[01;31mSorry you are offline !!\033[00m"
522 | fi
523 | else
524 | #check user is online or not
525 | wget -q --spider http://google.com
526 | if [ $? -eq 0 ]; then
527 | echo "\033[01;32mInstalling ...\033[00m"
528 | sleep 1
529 | # install tool dependency
530 | if [ $tool_dependency != "null" ]; then
531 | for dep_name in `echo $tool_dependency | tr ',' ' '`; do
532 | # installing dependency
533 | if [ ! -e $bin/$dep_name ]; then
534 | $pac install $dep_name -y
535 | fi
536 | done
537 | fi
538 | # installing tools
539 | if [ $tool_url != "" -a $tool_url != "null" ]; then
540 | curl -o ~/$tool_pac $tool_url
541 | fi
542 | else
543 | echo "\033[01;31mSorry \033[00m: you are \033[01;31moffline \033[00m!!\033[00m"
544 | fi
545 | fi
546 | # check tool is installed or not
547 | if [ ! -e ~/$tool_pac ]; then
548 | echo "\033[01;31mSorry \033[00m: '$tool_name' \033[01;31mis not installed !!\033[00m"
549 | else
550 | echo "\033[00m'$tool_name' \033[00m: \033[01;32mis installed successfully !!\033[00m"
551 | fi
552 | else
553 | echo "\033[01;31mSorry \033[00m: \033[00m'$tool_name' \033[01;32mis already installed !!\033[00m"
554 | fi
555 |
556 | # for wget tools
557 | elif [ $tool_installer = "wget" ]; then
558 | # check tool is already installed or not
559 | if [ ! -e ~/$tool_pac ]; then
560 | # check sudo is null or not
561 | if [ $sudo ]; then
562 | #check user is online or not
563 | wget -q --spider http://google.com
564 | if [ $? -eq 0 ]; then
565 | echo "\033[01;32mInstalling ...\033[00m"
566 | sleep 1
567 | # install tool dependency
568 | if [ $tool_dependency != "null" ]; then
569 | for dep_name in `echo $tool_dependency | tr ',' ' '`; do
570 | # installing dependency
571 | if [ ! -e $bin/$dep_name ]; then
572 | $sudo $pac install $dep_name -y
573 | fi
574 | done
575 | fi
576 | # installing tools
577 | if [ $tool_url != "" -a $tool_url != "null" ]; then
578 | $sudo wget $tool_url -o ~/$tool_pac
579 | fi
580 | else
581 | echo "\033[01;31mSorry you are offline !!\033[00m"
582 | fi
583 | else
584 | #check user is online or not
585 | wget -q --spider http://google.com
586 | if [ $? -eq 0 ]; then
587 | echo "\033[01;32mInstalling ...\033[00m"
588 | sleep 1
589 | # install tool dependency
590 | if [ $tool_dependency != "null" ]; then
591 | for dep_name in `echo $tool_dependency | tr ',' ' '`; do
592 | # installing dependency
593 | if [ ! -e $bin/$dep_name ]; then
594 | $pac install $dep_name -y
595 | fi
596 | done
597 | fi
598 | # installing tools
599 | if [ $tool_url != "" -a $tool_url != "null" ]; then
600 | wget $tool_url -o ~/$tool_pac
601 | fi
602 | else
603 | echo "\033[01;31mSorry \033[00m: you are \033[01;31moffline \033[00m!!\033[00m"
604 | fi
605 | fi
606 | # check tool is installed or not
607 | if [ ! -e ~/$tool_pac ]; then
608 | echo "\033[01;31mSorry \033[00m: '$tool_name' \033[01;31mis not installed !!\033[00m"
609 | else
610 | echo "\033[00m'$tool_name' \033[00m: \033[01;32mis installed successfully !!\033[00m"
611 | fi
612 | else
613 | echo "\033[01;31mSorry \033[00m: \033[00m'$tool_name' \033[01;32mis already installed !!\033[00m"
614 | fi
615 | # for any new installer
616 | # put here
617 | fi
618 | fi
619 | # wait for user any input
620 | echo -n "$prompt "
621 | read tmp_inp
622 | }
623 |
624 | # list all tools from data
625 | all_tools() {
626 | while true; do
627 | clear
628 | # get all tools data
629 | echo " \033[01;31m___
630 | //___// \033[01;33mAll Tools
631 | "
632 | for data in `grep "." $tools_data | sort -f | grep -n '.' | sed -n 's/:/|/p' | cut -d"|" -f1,2 | tr ' ' '@'`; do
633 | # display tools name from data
634 | for tool in $data; do
635 | echo " \033[01;32m$tool" | tr '|' ' ' | tr '@' ' '
636 | done
637 | done
638 | echo " \033[01;32m0 Back"
639 | echo -n "$prompt "
640 | read cmd
641 | # count total number of tools
642 | list=`grep -n "." $tools_data | wc -l`
643 | # process user input
644 | case $cmd in
645 | [1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9])
646 | if [ $cmd -le $list ]; then
647 | # install tools
648 | install $cmd
649 | else
650 | echo "\007\033[00m'$cmd': \033[01;31minvalid option!!"
651 | sleep 1
652 | fi
653 | ;;
654 | 0|back|Back)
655 | break
656 | ;;
657 | *)
658 | echo "\007\033[00m'$cmd': \033[01;31minvalid option!!"
659 | sleep 1
660 | ;;
661 | esac
662 | done
663 | }
664 |
665 | # category function
666 | category() {
667 | while true; do
668 | clear
669 | # get all category data
670 | echo " \033[01;31m___
671 | //___// \033[01;33mTool Category
672 | "
673 | for data in `grep "." $category_data | grep -n '.' | sed -n 's/:/|/p' | cut -d"|" -f1,2 | tr ' ' '@'`; do
674 | # display category alias name from data
675 | for category in $data; do
676 | echo " \033[01;32m$category" | tr '|' ' ' | tr '@' ' '
677 | done
678 | done
679 | echo " \033[01;32m0 Back"
680 | echo -n "$prompt "
681 | read cmd
682 | # count total number of category
683 | list=`grep -n "." $category_data | wc -l`
684 | # process user input
685 | case $cmd in
686 | [1-9]|[1-9][0-9])
687 | if [ $cmd -le $list ]; then
688 | while [ true ]; do
689 | clear
690 | # display all tools of selected category
691 | category=`grep '.' $category_data | sed -n "$cmd p" | cut -d"|" -f2`
692 | category_alias=`grep '.' $category_data | sed -n "$cmd p" | cut -d"|" -f1`
693 | # get all tools data and display
694 | echo " \033[01;31m___
695 | //___// \033[01;33m$category_alias
696 | "
697 | for data in `grep "." $tools_data | sort -f | sed -n "/$category/p" | grep -n '.' | sed -n 's/:/|/p' | cut -d"|" -f1,2 | tr ' ' '@'`; do
698 | # display tools name from data
699 | for tool in $data; do
700 | echo " \033[01;32m$tool" | tr '|' ' ' | tr '@' ' '
701 | done
702 | done
703 | echo " \033[01;32m0 Back"
704 | echo -n "$prompt "
705 | read tmp_cmd
706 | # count total number of tools in category
707 | list=`grep -n "." $tools_data | sed -n "/$category/p" | wc -l`
708 | # process user input
709 | case $tmp_cmd in
710 | [1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9])
711 | if [ $tmp_cmd -le $list ]; then
712 | # install tools
713 | install_category_tool $category $tmp_cmd
714 | else
715 | echo "\007\033[00m'$tmp_cmd': \033[01;31minvalid option!!"
716 | sleep 1
717 | fi
718 | ;;
719 | 0|back|Back)
720 | break
721 | ;;
722 | *)
723 | echo "\007\033[00m'$tmp_cmd': \033[01;31minvalid option!!"
724 | sleep 1
725 | ;;
726 | esac
727 | done
728 | else
729 | echo "\007\033[00m'$cmd': \033[01;31minvalid option!!"
730 | sleep 1
731 | fi
732 | ;;
733 | 0|back|Back)
734 | break
735 | ;;
736 | *)
737 | echo "\007\033[00m'$cmd': \033[01;31minvalid option!!"
738 | sleep 1
739 | ;;
740 | esac
741 | done
742 | }
743 |
744 | # update onex function
745 | update() {
746 | while true; do
747 | clear
748 | echo "$logo"
749 | echo " \033[00m[1] \033[01;32mUpdate\033[00m"
750 | echo " \033[00m[0] \033[01;32mBack"
751 | echo -n "$prompt "
752 | read cmd
753 | case $cmd in
754 | 1)
755 | # check user is online or not
756 | wget -q --spider http://google.com
757 | if [ $? -eq 0 ]; then
758 | echo "\033[01;32mUpdating ...\033[00m"
759 | sleep 1
760 | if [ -e $bin/git ]; then
761 | if [ $sudo ]; then
762 | $sudo git clone https://github.com/Rajkumrdusad/onex.git ~/onex
763 | $sudo chmod +x ~/onex/install
764 | $sudo sh ~/onex/install
765 | else
766 | git clone https://github.com/Rajkumrdusad/onex.git ~/onex
767 | chmod +x ~/onex/install
768 | sh ~/onex/install
769 | fi
770 | else
771 | if [ $sudo ]; then
772 | $sudo $pac install git -y
773 | $sudo git clone https://github.com/Rajkumrdusad/onex.git ~/onex
774 | $sudo chmod +x ~/onex/install
775 | $sudo sh ~/onex/install
776 | else
777 | $pac install git -y
778 | git clone https://github.com/Rajkumrdusad/onex.git ~/onex
779 | chmod +x ~/onex/install
780 | sh ~/onex/install
781 | fi
782 | fi
783 | echo "\007\033[01;32monex updated !!\033[00m"
784 | sleep 1
785 | else
786 | echo "\007\033[01;31mSorry \033[00m: you are \033[01;31moffline \033[00m!!\033[00m"
787 | sleep 1
788 | fi
789 | ;;
790 | 0)
791 | break
792 | ;;
793 | *)
794 | echo "\007\033[00m'$cmd': \033[01;31minvalid option!!"
795 | sleep 1
796 | ;;
797 | esac
798 | done
799 | }
800 |
801 | # about onex function
802 | about() {
803 | clear
804 | echo "$logo"
805 | echo " \033[01;33mOnex \033[01;31mv0.1\033[00m"
806 | echo " Onex is a library of all"
807 | echo " hakcing tools for termux"
808 | echo " and other linux distribution."
809 | echo -n "$prompt "
810 | read tmp
811 | }
812 |
813 | # this is the main function
814 | menu() {
815 | while true; do
816 | clear
817 | tools=`grep -n '.' $tools_data | wc -l`
818 | echo "$logo"
819 | echo " \033[00m[1] \033[01;32mAll tools \033[00m(\033[01;31m$tools tools\033[00m)"
820 | echo " \033[00m[2] \033[01;32mTools category"
821 | echo " \033[00m[3] \033[01;32mUpdate onex"
822 | echo " \033[00m[4] \033[01;32mAbout us"
823 | echo " \033[00m[5] \033[01;32mExit"
824 | echo -n "$prompt "
825 | read cmd
826 | case $cmd in
827 | 1)
828 | all_tools
829 | ;;
830 | 2)
831 | category
832 | ;;
833 | 3)
834 | update
835 | ;;
836 | 4)
837 | about
838 | ;;
839 | 5|exit|Exit)
840 | echo "\007\033[01;32mExiting ....\033[00m"
841 | break
842 | ;;
843 | *)
844 | echo "\007\033[00m'$cmd': \033[01;31minvalid option!!\033[00m"
845 | sleep 1
846 | ;;
847 | esac
848 | done
849 | }
850 |
851 |
852 | # list all tools from data
853 | cli_list_all() {
854 | # get all tools data
855 | tool=`grep "." $tools_data | sort -f | grep -n '.' | sed -n 's/:/|/p' | cut -d"|" -f1,2 | tr '|' ' '`
856 | # display tools name from data
857 | echo "\033[01;32m$tool\033[00m"
858 | }
859 |
860 | # comming soon
861 | # category function
862 | cli_category() {
863 | # get all category data
864 | for data in `grep "." $category_data | grep -n '.' | sed -n 's/:/|/p' | cut -d"|" -f1,2 | tr ' ' '@'`; do
865 | # display category alias name from data
866 | for category in $data; do
867 | echo " \033[01;32m$category\033[00m" | tr '|' ' ' | tr '@' ' '
868 | done
869 | done
870 | }
871 |
872 | # update process
873 | update_process() {
874 | # check file is downloaded or not
875 | if [ -e $home/onex/onex ]; then
876 | # removing old one
877 | if [ -e $bin/onex ]; then
878 | if [ -d $conf_dir/onex ]; then
879 | if [ $sudo ]; then
880 | $sudo rm -rf $bin/onex
881 | $sudo rm -rf $conf_dir/onex
882 | else
883 | rm -rf $bin/onex
884 | rm -rf $conf_dir/onex
885 | fi
886 | fi
887 | fi
888 | fi
889 |
890 | # updating onex
891 | if [ -e $home/onex/onex ]; then
892 | if [ $sudo ]; then
893 | $sudo mv -v $home/onex/onex $bin
894 | $sudo chmod +x $bin/onex
895 | else
896 | mv -v $home/onex/onex $bin
897 | chmod +x $bin/onex
898 | fi
899 | fi
900 | if [ -d $home/onex ]; then
901 | if [ $sudo ]; then
902 | $sudo mv -v $home/onex $conf_dir
903 | else
904 | mv -v $home/onex $conf_dir
905 | fi
906 | fi
907 | }
908 |
909 | # update onex function
910 | cli_update() {
911 | # check user is online or not
912 | wget -q --spider http://google.com
913 | if [ $? -eq 0 ]; then
914 | echo "\033[01;32mUpdating ...\033[00m"
915 | sleep 1
916 | if [ -e $bin/git ]; then
917 | if [ $sudo ]; then
918 | $sudo git clone https://github.com/Rajkumrdusad/onex.git ~/onex
919 | update_process
920 | else
921 | git clone https://github.com/Rajkumrdusad/onex.git ~/onex
922 | update_process
923 | fi
924 | else
925 | if [ $sudo ]; then
926 | $sudo $pac install git -y
927 | $sudo git clone https://github.com/Rajkumrdusad/onex.git ~/onex
928 | update_process
929 | else
930 | $pac install git -y
931 | git clone https://github.com/Rajkumrdusad/onex.git ~/onex
932 | update_process
933 | fi
934 | fi
935 | echo "\033[00m'onex' \033[01;32mupdated successfully !!\033[00m"
936 | else
937 | echo "\033[01;31mSorry \033[00m: you are \033[01;31moffline \033[00m!!\033[00m"
938 | fi
939 | }
940 |
941 | # cli install process
942 | install_process() {
943 | # get tool alias name
944 | tool_name=`echo $1 | cut -d"|" -f1`
945 | # get tool package manager
946 | tool_installer=`echo $1 | cut -d"|" -f5`
947 | # tool dependency (requirements)
948 | tool_dependency=`echo $1 | cut -d"|" -f6 | tr ' ' ','`
949 | # tool url
950 | tool_url=`echo $1 | cut -d"|" -f4`
951 | # package name or tool name
952 | tool_pac=`echo $1 | cut -d"|" -f2`
953 |
954 | # check tool name is null or not
955 | if [ "$tool_name" ]; then
956 |
957 | # for default package
958 | if [ $tool_installer = "package_manager" ]; then
959 | # check tool is already installed or not
960 | if [ ! -e $bin/$tool_pac ]; then
961 | # check sudo is null or not
962 | if [ $sudo ]; then
963 | #check user is online or not
964 | wget -q --spider http://google.com
965 | if [ $? -eq 0 ]; then
966 | echo "\033[01;32mInstalling ...\033[00m"
967 | sleep 1
968 | # install tool dependency
969 | if [ $tool_dependency != "null" ]; then
970 | for dep_name in `echo $tool_dependency | tr ',' ' '`; do
971 | # installing dependency
972 | if [ ! -e $bin/$dep_name ]; then
973 | $sudo $pac install $dep_name -y
974 | fi
975 | done
976 | fi
977 | # installing tools
978 | if [ $tool_pac != "" -a $tool_pac != "null" ]; then
979 | $sudo $pac install $tool_pac -y
980 | fi
981 | else
982 | echo "\033[01;31mSorry you are offline !!\033[00m"
983 | fi
984 | else
985 | #check user is online or not
986 | wget -q --spider http://google.com
987 | if [ $? -eq 0 ]; then
988 | echo "\033[01;32mInstalling ...\033[00m"
989 | sleep 1
990 | # install tool dependency
991 | if [ $tool_dependency != "null" ]; then
992 | for dep_name in `echo $tool_dependency | tr ',' ' '`; do
993 | # installing dependency
994 | if [ ! -e $bin/$dep_name ]; then
995 | $pac install $dep_name -y
996 | fi
997 | done
998 | fi
999 | # installing tools
1000 | if [ $tool_pac != "" -a $tool_pac != "null" ]; then
1001 | $pac install $tool_pac -y
1002 | fi
1003 | else
1004 | echo "\033[01;31mSorry \033[00m: you are \033[01;31moffline \033[00m!!\033[00m"
1005 | fi
1006 | fi
1007 | # check tool is installed or not
1008 | if [ ! -e $bin/$tool_pac ]; then
1009 | echo "\033[01;31mSorry \033[00m: '$tool_name' \033[01;31mis not installed !!\033[00m"
1010 | else
1011 | echo "\033[00m'$tool_name' \033[00m: \033[01;32mis installed successfully !!\033[00m"
1012 | fi
1013 | else
1014 | echo "\033[01;31mSorry \033[00m: \033[00m'$tool_name' \033[01;32mis already installed !!\033[00m"
1015 | fi
1016 |
1017 | # for github tools
1018 | elif [ $tool_installer = "git" ]; then
1019 | # check tool is already installed or not
1020 | if [ ! -e ~/$tool_pac ]; then
1021 | # check sudo is null or not
1022 | if [ $sudo ]; then
1023 | #check user is online or not
1024 | wget -q --spider http://google.com
1025 | if [ $? -eq 0 ]; then
1026 | echo "\033[01;32mInstalling ...\033[00m"
1027 | sleep 1
1028 | # install tool dependency
1029 | if [ $tool_dependency != "null" ]; then
1030 | for dep_name in `echo $tool_dependency | tr ',' ' '`; do
1031 | # installing dependency
1032 | if [ ! -e $bin/$dep_name ]; then
1033 | $sudo $pac install $dep_name -y
1034 | fi
1035 | done
1036 | fi
1037 | # installing tools
1038 | if [ $tool_url != "" -a $tool_url != "null" ]; then
1039 | $sudo git clone $tool_url ~/$tool_name
1040 | fi
1041 | else
1042 | echo "\033[01;31mSorry you are offline !!\033[00m"
1043 | fi
1044 | else
1045 | #check user is online or not
1046 | wget -q --spider http://google.com
1047 | if [ $? -eq 0 ]; then
1048 | echo "\033[01;32mInstalling ...\033[00m"
1049 | sleep 1
1050 | # install tool dependency
1051 | if [ $tool_dependency != "null" ]; then
1052 | for dep_name in `echo $tool_dependency | tr ',' ' '`; do
1053 | # installing dependency
1054 | if [ ! -e $bin/$dep_name ]; then
1055 | $pac install $dep_name -y
1056 | fi
1057 | done
1058 | fi
1059 | # installing tools
1060 | if [ $tool_url != "" -a $tool_url != "null" ]; then
1061 | git clone $tool_url ~/$tool_name
1062 | fi
1063 | else
1064 | echo "\033[01;31mSorry \033[00m: you are \033[01;31moffline \033[00m!!\033[00m"
1065 | fi
1066 | fi
1067 | # check tool is installed or not
1068 | if [ ! -e ~/$tool_pac ]; then
1069 | echo "\033[01;31mSorry \033[00m: '$tool_name' \033[01;31mis not installed !!\033[00m"
1070 | else
1071 | echo "\033[00m'$tool_name' \033[00m: \033[01;32mis installed successfully !!\033[00m"
1072 | fi
1073 | else
1074 | echo "\033[01;31mSorry \033[00m: \033[00m'$tool_name' \033[01;32mis already installed !!\033[00m"
1075 | fi
1076 |
1077 | # for curl tools
1078 | elif [ $tool_installer = "curl" ]; then
1079 | # check tool is already installed or not
1080 | if [ ! -e ~/$tool_pac ]; then
1081 | # check sudo is null or not
1082 | if [ $sudo ]; then
1083 | #check user is online or not
1084 | wget -q --spider http://google.com
1085 | if [ $? -eq 0 ]; then
1086 | echo "\033[01;32mInstalling ...\033[00m"
1087 | sleep 1
1088 | # install tool dependency
1089 | if [ $tool_dependency != "null" ]; then
1090 | for dep_name in `echo $tool_dependency | tr ',' ' '`; do
1091 | # installing dependency
1092 | if [ ! -e $bin/$dep_name ]; then
1093 | $sudo $pac install $dep_name -y
1094 | fi
1095 | done
1096 | fi
1097 | # installing tools
1098 | if [ $tool_url != "" -a $tool_url != "null" ]; then
1099 | $sudo curl -o ~/$tool_pac $tool_url
1100 | fi
1101 | else
1102 | echo "\033[01;31mSorry you are offline !!\033[00m"
1103 | fi
1104 | else
1105 | #check user is online or not
1106 | wget -q --spider http://google.com
1107 | if [ $? -eq 0 ]; then
1108 | echo "\033[01;32mInstalling ...\033[00m"
1109 | sleep 1
1110 | # install tool dependency
1111 | if [ $tool_dependency != "null" ]; then
1112 | for dep_name in `echo $tool_dependency | tr ',' ' '`; do
1113 | # installing dependency
1114 | if [ ! -e $bin/$dep_name ]; then
1115 | $pac install $dep_name -y
1116 | fi
1117 | done
1118 | fi
1119 | # installing tools
1120 | if [ $tool_url != "" -a $tool_url != "null" ]; then
1121 | curl -o ~/$tool_pac $tool_url
1122 | fi
1123 | else
1124 | echo "\033[01;31mSorry \033[00m: you are \033[01;31moffline \033[00m!!\033[00m"
1125 | fi
1126 | fi
1127 | # check tool is installed or not
1128 | if [ ! -e ~/$tool_pac ]; then
1129 | echo "\033[01;31mSorry \033[00m: '$tool_name' \033[01;31mis not installed !!\033[00m"
1130 | else
1131 | echo "\033[00m'$tool_name' \033[00m: \033[01;32mis installed successfully !!\033[00m"
1132 | fi
1133 | else
1134 | echo "\033[01;31mSorry \033[00m: \033[00m'$tool_name' \033[01;32mis already installed !!\033[00m"
1135 | fi
1136 |
1137 | # for wget tools
1138 | elif [ $tool_installer = "wget" ]; then
1139 | # check tool is already installed or not
1140 | if [ ! -e ~/$tool_pac ]; then
1141 | # check sudo is null or not
1142 | if [ $sudo ]; then
1143 | #check user is online or not
1144 | wget -q --spider http://google.com
1145 | if [ $? -eq 0 ]; then
1146 | # install tool dependency
1147 | echo "\033[01;32mInstalling ...\033[00m"
1148 | sleep 1
1149 | if [ $tool_dependency != "null" ]; then
1150 | for dep_name in `echo $tool_dependency | tr ',' ' '`; do
1151 | # installing dependency
1152 | if [ ! -e $bin/$dep_name ]; then
1153 | $sudo $pac install $dep_name -y
1154 | fi
1155 | done
1156 | fi
1157 | # installing tools
1158 | if [ $tool_url != "" -a $tool_url != "null" ]; then
1159 | $sudo wget $tool_url -o ~/$tool_pac
1160 | fi
1161 | else
1162 | echo "\033[01;31mSorry you are offline !!\033[00m"
1163 | fi
1164 | else
1165 | #check user is online or not
1166 | wget -q --spider http://google.com
1167 | if [ $? -eq 0 ]; then
1168 | echo "\033[01;32mInstalling ...\033[00m"
1169 | sleep 1
1170 | # install tool dependency
1171 | if [ $tool_dependency != "null" ]; then
1172 | for dep_name in `echo $tool_dependency | tr ',' ' '`; do
1173 | # installing dependency
1174 | if [ ! -e $bin/$dep_name ]; then
1175 | $pac install $dep_name -y
1176 | fi
1177 | done
1178 | fi
1179 | # installing tools
1180 | if [ $tool_url != "" -a $tool_url != "null" ]; then
1181 | wget $tool_url -o ~/$tool_pac
1182 | fi
1183 | else
1184 | echo "\033[01;31mSorry \033[00m: you are \033[01;31moffline \033[00m!!\033[00m"
1185 | fi
1186 | fi
1187 | # check tool is installed or not
1188 | if [ ! -e ~/$tool_pac ]; then
1189 | echo "\033[01;31mSorry \033[00m: '$tool_name' \033[01;31mis not installed !!\033[00m"
1190 | else
1191 | echo "\033[00m'$tool_name' \033[00m: \033[01;32mis installed successfully !!\033[00m"
1192 | fi
1193 | else
1194 | echo "\033[01;31mSorry \033[00m: \033[00m'$tool_name' \033[01;32mis already installed !!\033[00m"
1195 | fi
1196 | # for any new installer
1197 | # put here
1198 | fi
1199 | fi
1200 | }
1201 |
1202 | # check tool is exists or not
1203 | cli_install() {
1204 | # get tools data
1205 | for data in `grep -i "^$1" $tools_data`; do
1206 | # display tools name from data
1207 | for tool in $data; do
1208 | # convert to lower case and check tool name
1209 | if [ `echo $tool | cut -d"|" -f1 | tr 'A-Z' 'a-z'` = `echo $1 | tr 'A-Z' 'a-z'` ]; then
1210 | get_tool_data=$tool
1211 | fi
1212 | done
1213 | done
1214 | # check data exists or not
1215 | if [ $get_tool_data ]; then
1216 | install_process $get_tool_data
1217 | else
1218 | echo "\033[01;31mSorry \033[00m: '$1' \033[01;31mtool not found !!\033[00m"
1219 | similar=`grep -i "^$1" $tools_data | cut -d"|" -f1`
1220 | if [ "$similar" ]; then
1221 | echo "\033[01;34mDid you mean\033[00m:"
1222 | echo -n "\033[01;32m"
1223 | grep -i "^$1" $tools_data | cut -d"|" -f1
1224 | echo -n "\033[00m"
1225 | fi
1226 | fi
1227 | }
1228 |
1229 | # search tool
1230 | cli_search() {
1231 | # get tools data
1232 | similar=`grep -i "^$1" $tools_data | cut -d"|" -f1`
1233 | if [ "$similar" ]; then
1234 | echo -n "\033[01;32m"
1235 | grep -i "^$1" $tools_data | cut -d"|" -f1
1236 | echo -n "\033[00m"
1237 | fi
1238 | }
1239 |
1240 | # remove function
1241 | cli_remove() {
1242 | # add remove tools functionality for remove tools data now it only uninstall onex.
1243 | # removing onex only
1244 | if [ -e $bin/onex ]; then
1245 | if [ -d $conf_dir/onex ]; then
1246 | if [ $sudo ]; then
1247 | $sudo rm -rf $bin/onex
1248 | $sudo rm -rf $conf_dir/onex
1249 | else
1250 | rm -rf $bin/onex
1251 | rm -rf $conf_dir/onex
1252 | fi
1253 | fi
1254 | fi
1255 | # check onex removed or not
1256 | if [ ! -e $bin/onex ]; then
1257 | if [ ! -d $conf_dir/onex ]; then
1258 | echo "\033[00m'onex' : \033[01;32muninstalled successfully !!\033[00m"
1259 | fi
1260 | fi
1261 | }
1262 |
1263 | # cli mode
1264 | if [ $# -eq 1 ]; then
1265 | case $1 in
1266 | start)
1267 | menu
1268 | ;;
1269 | list|-l)
1270 | cli_list_all
1271 | ;;
1272 | update|-u)
1273 | cli_update
1274 | ;;
1275 | remove|-r)
1276 | cli_remove
1277 | ;;
1278 | help|-h)
1279 | echo "\033[01;33mOnex \033[01;31mv0.1"
1280 | echo "\033[00mUsage \033[00m: \033[01;33m onex \033[00m[option]... [toolname]...\033[00m"
1281 | echo "\n \033[01;34mOption \tDescription\033[00m"
1282 | echo " ----------- \t--------------------"
1283 | echo " help, -h \tdisplay this help."
1284 | echo " list, -l \tlist all tools."
1285 | echo " list -a \tlist all tools."
1286 | echo " -l a \tlist all tools."
1287 | echo " install, -i \tinstall any tools."
1288 | echo " search, -s \tsearch tools."
1289 | echo " update, -u \tupdate onex."
1290 | echo " start \tstart onex menu mode."
1291 | ;;
1292 | *)
1293 | echo "\033[01;31mSorry \033[00m: '$1' \033[01;31minvalid option!!\033[00m"
1294 | echo "\033[01;34mtype \033[00m:\n 'onex -h' or 'onex help' for help.\033[00m"
1295 | ;;
1296 | esac
1297 | elif [ $# -eq 2 ]; then
1298 | case $1 in
1299 | list|-l)
1300 | case $2 in
1301 | -a|a)
1302 | cli_list_all
1303 | ;;
1304 | *)
1305 | echo "\033[01;31mSorry \033[00m: '$2' \033[01;31minvalid option!!\033[00m"
1306 | echo "\033[01;34mtype \033[00m:\n 'onex -h' or 'onex help' for help.\033[00m"
1307 | ;;
1308 | esac
1309 | ;;
1310 | install|-i)
1311 | cli_install $2
1312 | ;;
1313 | search|-s)
1314 | cli_search $2
1315 | ;;
1316 | *)
1317 | echo "\033[01;31mSorry \033[00m: '$1' \033[01;31minvalid option!!\033[00m"
1318 | echo "\033[01;34mtype \033[00m:\n 'onex -h' or 'onex help' for help.\033[00m"
1319 | ;;
1320 | esac
1321 | else
1322 | echo "\033[01;34mtype \033[00m:\n 'onex -h' or 'onex help' for help.\033[00m"
1323 | fi
--------------------------------------------------------------------------------