├── .github └── workflows │ └── main.yml ├── LICENSE ├── README.md ├── SNAPSHOT_HASH ├── enginehash.csv ├── setup.py └── src ├── Enginer.info └── __init__.py /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - '*' 7 | 8 | jobs: 9 | build-android: 10 | runs-on: ubuntu-18.04 11 | steps: 12 | - name: Check out repository od 13 | uses: actions/checkout@v2 14 | - name: Set variables 15 | run: | 16 | HASH=$(cat SNAPSHOT_HASH) 17 | echo "SNAPSHOT_HASH=$HASH" >> $GITHUB_ENV 18 | - name: Install tools 19 | run: | 20 | sudo apt-get update 21 | sudo apt-get remove git git-man 22 | sudo add-apt-repository --remove --yes ppa:git-core/ppa 23 | sudo apt-get update 24 | sudo apt-get install --yes git git-svn 25 | sudo apt-get install -y git wget curl software-properties-common unzip python-pip python lsb-release sudo apt-transport-https 26 | DEBIAN_FRONTEND="noninteractive" sudo apt-get -y install tzdata 27 | pip install wheel 28 | pip install . 29 | git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git 30 | git clone https://github.com/flutter/engine.git 31 | - name: gclient sync 32 | run: | 33 | ROOT_DIR=`pwd` 34 | export PATH=$PATH:$ROOT_DIR/depot_tools 35 | cd engine 36 | git config --global user.email "reflutter@example.com" && git config --global user.name "reflutter" 37 | git fetch origin $(reflutter ${{env.SNAPSHOT_HASH}} -l) 38 | git reset --hard FETCH_HEAD 39 | reflutter ${{env.SNAPSHOT_HASH}} -l 40 | echo 'reflutter' > REFLUTTER 41 | git add . && git commit -am "reflutter" 42 | cd $ROOT_DIR 43 | mkdir --parents customEngine 44 | cd customEngine 45 | echo 'solutions = [{"managed": False,"name": "src/flutter","url": "'$ROOT_DIR/engine'","custom_deps": {},"deps_file": "DEPS","safesync_url": "",},]' > .gclient 46 | gclient sync 47 | reflutter ${{env.SNAPSHOT_HASH}} -l 48 | - name: Install BuildDeps 49 | run: sudo customEngine/src/build/install-build-deps-android.sh --no-prompt 50 | - name: ninja build libflutter 51 | run: export PATH=$PATH:`pwd`/depot_tools && customEngine/src/flutter/tools/gn --android --android-cpu=arm64 --runtime-mode=release && ninja -C customEngine/src/out/android_release_arm64 52 | - name: ninja build libflutter32 53 | run: export PATH=$PATH:`pwd`/depot_tools && customEngine/src/flutter/tools/gn --android --android-cpu=arm --runtime-mode=release && ninja -C customEngine/src/out/android_release 54 | - name: Move to release 55 | run: | 56 | cp customEngine/src/out/android_release_arm64/lib.stripped/libflutter.so libflutter_arm64.so 2>/dev/null || : 57 | cp customEngine/src/out/android_release/lib.stripped/libflutter.so libflutter_arm.so 2>/dev/null || : 58 | cp customEngine/src/out/android_release_x64/lib.stripped/libflutter.so libflutter_x64.so 2>/dev/null || : 59 | cp customEngine/src/out/android_jit_release_x86/lib.stripped/libflutter.so libflutter_x86.so 2>/dev/null || : 60 | - name: Release 61 | uses: softprops/action-gh-release@v1 62 | with: 63 | target_commitish: v2-${{env.SNAPSHOT_HASH}} 64 | tag_name: android-v2-${{env.SNAPSHOT_HASH}} 65 | files: | 66 | ./*.so 67 | 68 | build-ios: 69 | runs-on: macos-10.15 70 | steps: 71 | - name: Check out repository od 72 | uses: actions/checkout@v2 73 | - name: Setup Xcode version 74 | uses: maxim-lobanov/setup-xcode@v1.3.0 75 | with: 76 | xcode-version: 12.4 77 | - name: Set variables 78 | run: | 79 | HASH=$(cat SNAPSHOT_HASH) 80 | echo "SNAPSHOT_HASH=$HASH" >> $GITHUB_ENV 81 | - name: Install tools 82 | run: | 83 | brew update 84 | brew install libzip openssl libplist autoconf automake libtool autoconf-archive pkg-config 85 | export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/opt/openssl@1.1/lib/pkgconfig 86 | git clone https://github.com/libimobiledevice/libplist 87 | cd libplist && ./autogen.sh --without-cython && sudo make install && cd .. 88 | cd libusbmuxd && ./autogen.sh && sudo make install && cd .. 89 | xcrun --sdk macosx --show-sdk-path 90 | brew install ideviceinstaller 91 | brew install ios-deploy 92 | pip3 install wheel 93 | pip3 install . 94 | git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git 95 | git clone https://github.com/flutter/engine.git 96 | - name: gclient sync 97 | run: | 98 | ROOT_DIR=`pwd` 99 | export PATH=$PATH:$ROOT_DIR/depot_tools 100 | cd engine 101 | git config --global user.email "reflutter@example.com" && git config --global user.name "reflutter" 102 | git fetch origin $(reflutter ${{env.SNAPSHOT_HASH}} -l) 103 | git reset --hard FETCH_HEAD 104 | reflutter ${{env.SNAPSHOT_HASH}} -l 105 | echo 'reflutter' > REFLUTTER 106 | git add . && git commit -am "reflutter" 107 | cd $ROOT_DIR 108 | mkdir customEngine 109 | cd customEngine 110 | echo 'solutions = [{"managed": False,"name": "src/flutter","url": "'$ROOT_DIR/engine'","custom_deps": {},"deps_file": "DEPS","safesync_url": "",},]' > .gclient 111 | gclient sync 112 | reflutter ${{env.SNAPSHOT_HASH}} -l 113 | - name: ninja build Flutter.framework 114 | run: export PATH=$PATH:`pwd`/depot_tools && sudo xcode-select -s /Applications/Xcode_12.4.app && customEngine/src/flutter/tools/gn --ios --ios-cpu=arm64 --runtime-mode=release && ninja -C customEngine/src/out/ios_release 115 | - name: Move to release 116 | run: | 117 | cp customEngine/src/out/ios_release/Flutter.framework/Flutter Flutter 118 | - name: Release 119 | uses: softprops/action-gh-release@v1 120 | with: 121 | target_commitish: v2-${{env.SNAPSHOT_HASH}} 122 | tag_name: ios-v2-${{env.SNAPSHOT_HASH}} 123 | files: | 124 | ./Flutter 125 | -------------------------------------------------------------------------------- /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 | 635 | Copyright (C) 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 | Copyright (C) 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 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Twitter](https://img.shields.io/twitter/follow/lmpact_l.svg?logo=twitter)](https://twitter.com/lmpact_l) 2 | 3 | [![stars](https://img.shields.io/github/stars/ptswarm/reFlutter)](https://github.com/ptswarm/reFlutter/stargazers) [![workflow](https://img.shields.io/github/workflow/status/ptswarm/reFlutter/Build)](https://github.com/ptswarm/reFlutter/actions) 4 | 5 |

6 | 7 | # 8 | This framework helps with Flutter apps reverse engineering using the patched version of the Flutter library which is already compiled and ready for app repacking. This library has snapshot deserialization process modified to allow you perform dynamic analysis in a convenient way. 9 | 10 | Key features: 11 | - `socket.cc` is patched for traffic monitoring and interception; 12 | - `dart.cc` is modified to print classes, functions and some fields; 13 | - contains minor changes for successfull compilation; 14 | - if you would like to implement your own patches, there is manual Flutter code change is supported using specially crafted `Dockerfile` 15 | ### Supported engines 16 | - Android: arm64, arm32; 17 | - iOS: arm64; 18 | - Release: Stable, Beta 19 | ### Install 20 | ``` 21 | # Linux, Windows, MacOS 22 | pip3 install reflutter 23 | ``` 24 | ### Usage 25 | ```console 26 | impact@f:~$ reflutter main.apk 27 | 28 | Please enter your Burp Suite IP: 29 | 30 | SnapshotHash: 8ee4ef7a67df9845fba331734198a953 31 | The resulting apk file: ./release.RE.apk 32 | Please sign the apk file 33 | 34 | Configure Burp Suite proxy server to listen on *:8083 35 | Proxy Tab -> Options -> Proxy Listeners -> Edit -> Binding Tab 36 | 37 | Then enable invisible proxying in Request Handling Tab 38 | Support Invisible Proxying -> true 39 | 40 | impact@f:~$ reflutter main.ipa 41 | ``` 42 | ### Traffic interception 43 | You need to specify the IP of your Burp Suite Proxy Server located in the same network where the device with the flutter application is. Next, you should configure the Proxy in `BurpSuite -> Listener Proxy -> Options tab` 44 | - Add port: `8083` 45 | - Bind to address: `All interfaces` 46 | - Request handling: Support invisible proxying = `True` 47 |

48 | 49 | You don't need to install any certificates. On an Android device, you don't need root access as well. reFlutter also allows to bypass some of the flutter certificate pinning implementations. 50 | ### Usage on Android 51 | The resulting apk must be aligned and signed. I use [uber-apk-signer](https://github.com/patrickfav/uber-apk-signer/releases/tag/v1.2.1) 52 | ```java -jar uber-apk-signer.jar --allowResign -a release.RE.apk```. 53 | To see which code is loaded through DartVM, you need to run the application on the device. Note that you must manually find what `_kDartIsolateSnapshotInstructions` (ex. 0xB000 ) equals to using a binary search. reFlutter writes the dump to the root folder of the application and sets `777` permissions to the file and folder. You can pull the file with adb command 54 | ```console 55 | impact@f:~$ adb -d shell "cat /data/data//dump.dart" > dump.dart 56 | ``` 57 |
58 | file contents 59 | 60 | 61 | ```dart 62 | Library:'package:anyapp/navigation/DeepLinkImpl.dart' Class: Navigation extends Object { 63 | 64 | String* DeepUrl = anyapp://evil.com/ ; 65 | 66 | Function 'Navigation.': constructor. (dynamic, dynamic, dynamic, dynamic) => NavigationInteractor { 67 | 68 | Code Offset: _kDartIsolateSnapshotInstructions + 0x0000000000009270 69 | 70 | } 71 | 72 | Function 'initDeepLinkHandle':. (dynamic) => Future* { 73 | 74 | Code Offset: _kDartIsolateSnapshotInstructions + 0x0000000000412fe8 75 | 76 | } 77 | 78 | Function '_navigateDeepLink@547106886':. (dynamic, dynamic, {dynamic navigator}) => void { 79 | 80 | Code Offset: _kDartIsolateSnapshotInstructions + 0x0000000000002638 81 | 82 | } 83 | 84 | } 85 | 86 | Library:'package:anyapp/auth/navigation/AuthAccount.dart' Class: AuthAccount extends Account { 87 | 88 | PlainNotificationToken* _instance = sentinel; 89 | 90 | Function 'getAuthToken':. (dynamic, dynamic, dynamic, dynamic) => Future* { 91 | 92 | Code Offset: _kDartIsolateSnapshotInstructions + 0x00000000003ee548 93 | 94 | } 95 | 96 | Function 'checkEmail':. (dynamic, dynamic) => Future* { 97 | 98 | Code Offset: _kDartIsolateSnapshotInstructions + 0x0000000000448a08 99 | 100 | } 101 | 102 | Function 'validateRestoreCode':. (dynamic, dynamic, dynamic) => Future* { 103 | 104 | Code Offset: _kDartIsolateSnapshotInstructions + 0x0000000000412c34 105 | 106 | } 107 | 108 | Function 'sendSmsRestorePassword':. (dynamic, dynamic) => Future* { 109 | 110 | Code Offset: _kDartIsolateSnapshotInstructions + 0x00000000003efb88 111 | 112 | } 113 | } 114 | ``` 115 |
116 | 117 | ### Usage on iOS 118 | Use the IPA file created after the execution of `reflutter main.ipa` command. To see which code is loaded through DartVM, you need to run the application on the device. reFlutter prints its output in console logs in XCode with the `reflutter` tag. 119 |

120 | 121 | ### To Do 122 | - [x] Display absolute code offset for functions; 123 | - [ ] Extract more strings and fields; 124 | - [x] Add socket patch; 125 | - [ ] Extend engine support to Debug using Fork and Github Actions; 126 | - [ ] Improve detection of `App.framework` and `libapp.so` inside zip archive 127 | 128 | ### Build Engine 129 | The engines are built using [reFlutter](https://github.com/ptswarm/reFlutter/blob/main/.github/workflows/main.yml) in [Github Actions](https://github.com/ptswarm/reFlutter/actions) to build the desired version, commits and snapshot hashes are used from this [table](https://github.com/ptswarm/reFlutter/blob/main/enginehash.csv). 130 | The hash of the snapshot is extracted from ```storage.googleapis.com/flutter_infra_release/flutter//android-arm64-release/linux-x64.zip``` 131 |
132 | release 133 | 134 | [![gif](https://user-images.githubusercontent.com/87244850/135758767-47b7d51f-8b6c-40b5-85aa-a13c5a94423a.gif)](https://github.com/ptswarm/reFlutter/actions) 135 | 136 |
137 | 138 | ### Custom Build 139 | If you would like to implement your own patches, manual Flutter code change is supported using specially crafted [Docker](https://hub.docker.com/r/ptswarm/reflutter) 140 | 141 | ```sudo docker pull ptswarm/reflutter``` 142 | ``` 143 | # Linux, Windows 144 | EXAMPLE BUILD ANDROID ARM64: 145 | sudo docker run -e WAIT=300 -e x64=0 -e arm=0 -e HASH_PATCH= -e COMMIT= --rm -iv${PWD}:/t ptswarm/reflutter 146 | 147 | FLAGS: 148 | -e x64=0 149 | -e arm=0 150 | -e WAIT=300 151 | -e HASH_PATCH=[Snapshot_Hash] 152 | -e COMMIT=[Engine_commit] 153 | ``` 154 | -------------------------------------------------------------------------------- /SNAPSHOT_HASH: -------------------------------------------------------------------------------- 1 | 59da07d9da5a83be4ce75b7913b63dbd 2 | -------------------------------------------------------------------------------- /enginehash.csv: -------------------------------------------------------------------------------- 1 | version,Engine_commit,Snapshot_Hash 2 | 2.17.0-182.2.beta,486f4a749e532b865d5d24990d865f7d902b8fb3,a0cb0c928b23bc17a26e062b351dc44d 3 | 2.17.0-69.2.beta,e3559935720ea88dfcdf9079c394ffdb5146ceab,ded6ef11c73fdc638d6ff6d3ad22a67b 4 | 2.16.0-134.1.beta,63ca99584a1aef79722b2a7c6414570b54416bab,d56742caf7b3b3f4bd2df93a9bbb5503 5 | 2.16.0-80.1.beta,234aca678a2fb70ff2659870186f97c32f8894f4,3318fe66091c0ffbb64faec39976cb7d 6 | 2.8.0-3.1.pre,09f1520e8b9585d133faf1eccced9357670c6d11,adf563436d12ba0d50ea5beb7f3be1bb 7 | 2.7.0-3.0.pre,bbba2b2437d739a455ecafb66a22a46d31b233ed,24d9d411c2f90c8fbe8907f99e89d4b0 8 | 2.6.0-5.2.pre,1d521d89d8d98f27be4e0ff84d5c6b72dbdc91ca,f10776149bf76be288def3c2ca73bdc1 9 | 2.5.0,f0826da7ef2d301eb8f4ead91aaf026aa2b52881,9cf77f4405212c45daf608e1cd646852 10 | 2.4.0,844c29f42a614420b2205c178f22d30b43a8b0bb,659a72e41e3276e882709901c27de33d 11 | 2.3.0,9d517f475ba1282b619477bde8e708d6a34287cf,7a5b240780941844bae88eca5dbaa7b8 12 | 2.2.0,a9d88a4d182bdae23e3a4989abfb7ea25954aad1,e4a09dbf2bb120fe4674e0576617a0dc 13 | 2.2.0-10.1.pre,d2a2e93510ad6cfc3d62a90d903b7056e4da8264,34f6eec64e9371856eaaa278ccf56538 14 | 2.1.0-12.2.pre,711ab3fda05004ee5f6035f2a0bf099fca39a129,39a9141bbcc3cae43e6f9f6b7fbaafe3 15 | 2.0.6,05e680e202af9a92461070cb2d9982acad46c83c,5b97292b25f0a715613b7a28e0734f77 16 | 1.25.0-8.3.pre,7a8f8ca02c276dce02f8dd42a44e776ac03fa9bc,9e2165577cef0f0f70f9ff072107920c 17 | 1.24.0-10.2.pre,07c1eed46b9d9b58df78566e9b8b2e42e80d3380,a2bdb58c7edf9471da9180bf8185e7f7 18 | 1.23.0-18.1.pre,1d12d82d9cb54876f58044aa52198d53ec841c3d,953aa80d78c4d8886e3e4d784fd9d95f 19 | 1.22.6,2f0af3715217a0c2ada72c717d4ed9178d68f6ed,8ee4ef7a67df9845fba331734198a953 20 | 1.21.0-9.2.pre,20a953183580250aac2e15d36007664118bda5ab,5f40b0a9f04b5018fa08a9b67fd316cd 21 | 1.20.4,d1bc06f032f9d6c148ea6b96b48261d6f545004f,04645b6182fad3d68350d84669869ce5 22 | 1.20.0-7.2.pre,60b269d898cbe0be27e9b9ba9d21eae97b887ab6,8b2ca977d1d2920b9839d1b60eade6a7 23 | 1.19.0-4.3.pre,9a28c3bcf40ce64fee61e807ee3e1395fd6bd954,59da07d9da5a83be4ce75b7913b63dbd 24 | 1.18.0-11.1.pre,ef9215ceb2884ddf520d321bcd822d1461330876,b58ead73b2c5dfec69565df469bba387 25 | 1.17.5,ee76268252c22f5c11e82a7b87423ca3982e51a7,be7d304ff826e2dfac63538e227c3cc5 26 | 1.17.1,6bc433c6b6b5b98dcf4cc11aff31cdee90849f32,74edb834fac3fcea79d7ac2d1d6f1fb2 27 | 1.17.0-dev.3.1,c9506cb8e93e5e8879152ff5c948b175abb5b997,9e7cb7c9394c24c2398410b902673e13 28 | v1.15.17,5aff3119480996ca014ec0f8d26d74db617b5852,ee91a9191a5286c31d91a89754ba36af 29 | v1.14.6,c4229bfbbae455ad69c967be19aee3fadd6486e1,e739779cc1d28f0f697a92f2daf5f10f 30 | v1.13.6,bdc9708d235e582483d299642ad8682826ebb90d,81662522448cdd4d02eb060669e5d48b 31 | v1.12.13+hotfix.9,af51afceb8886cc11e25047523c4e0c7e1f5d408,20e5c4f7dc44368ac5a17643b93665f6 32 | v1.11.0,af04338413c3ed73316350f64248a152433073b6,2fb364d659ea53f7892be9ba5e036047 33 | v1.10.7,9e6314d348f9b5521e3c66856324d7a9c4a928c9,c3bbfe8f226120ad0569d7b78ed2d9ef 34 | v1.9.1+hotfix.6,b863200c37df4ed378042de11c4e9ff34e4e58c9,c8562f0ee0ebc38ba217c7955956d1cb 35 | v1.8.3,38ac5f30a7026e870619c2e8e8c99c070d74036f,34948253b59d5a56b2ec161e17975a4e 36 | v1.7.8+hotfix.4,fee001c93f25a1e7258e762781a7361f122d29f5,1d7acad1540192ac459cf60344efb7c1 37 | v1.6.3,8dc3a4cde2075a4f5458fd0eb199627f5124508d,c89592e3e4956c33956c8ba0f691dbd0 38 | v1.5.4-hotfix.2,52c7a1e849a170be4b2b2fe34142ca2c0a6fea1f,eed485c757fba5d731e4054412c99f2e 39 | v1.4.9-hotfix.1,4737fc5cd89b8f0136e927b00f2e159444b95a73,f630ecdf457e27dd24d3b9e0a6bc1c13 40 | v1.3.8,f4951df193a7966f9ed4da43d555eee0913d84d1,9a66dcb2da955dffdbdb0eafa0288784 41 | v1.2.1,3757390fa4b00d2d261bfdf5182d2e87c9113ff9,0c73eb70aa4d30f450273cb424be8c62 42 | v1.1.8,7112b72cc229e05d36716c3d7739885d3ffa72e6,317d4c7e607b1fd7d682c0010aadf1d0 43 | v1.0.0,7375a0f414bde4bc941e623482221db2fc8c4ab5,8343f188ada07642f47c56e518f1307c 44 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | """Setup script for reflutter""" 2 | 3 | import setuptools 4 | 5 | 6 | # Get version information without importing the package 7 | SHORT_DESCRIPTION = 'Reverse Flutter' 8 | LONG_DESCRIPTION = open('README.md', 'rt').read() 9 | 10 | CLASSIFIERS = [ 11 | 'Development Status :: 5 - Production/Stable', 12 | 'Intended Audience :: Developers', 13 | 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', 14 | 'Programming Language :: Python :: 2', 15 | 'Programming Language :: Python :: 2.7', 16 | 'Programming Language :: Python :: 3', 17 | 'Programming Language :: Python :: 3.3', 18 | 'Programming Language :: Python :: 3.4', 19 | 'Programming Language :: Python :: 3.5', 20 | 'Programming Language :: Python :: 3.6', 21 | 'Programming Language :: Python :: Implementation :: PyPy', 22 | 'Topic :: Software Development :: Build Tools', 23 | ] 24 | 25 | setuptools.setup( 26 | name='reflutter', 27 | version='0.6.5', 28 | description=SHORT_DESCRIPTION, 29 | long_description=LONG_DESCRIPTION, 30 | author='impact', 31 | author_email='routeros7.1@gmail.com', 32 | url='https://github.com/ptswarm/reFlutter', 33 | packages=setuptools.find_packages(), 34 | license='GPLv3+', 35 | platforms=['any'], 36 | keywords='distutils setuptools egg pip requirements', 37 | classifiers=CLASSIFIERS, 38 | entry_points={ 39 | 'console_scripts': [ 40 | 'reflutter = src.__init__:main', 41 | ], 42 | }, 43 | ) 44 | -------------------------------------------------------------------------------- /src/Enginer.info: -------------------------------------------------------------------------------- 1 | Dart SDK version: 2.17.0-182.2.beta (beta) (Mon Mar 28 14:06:26 2022 +0200) on "linux_simarm64" 2 | Engine: 486f4a749e532b865d5d24990d865f7d902b8fb3 3 | EngineHashSnapshot: 4 | a0cb0c928b23bc17a26e062b351dc44d 5 | Dart SDK version: 2.17.0-182.1.beta (beta) (Mon Mar 14 13:49:22 2022 +0100) on "linux_simarm64" 6 | Engine: e9f57b5d0f56ea3288c7206f56717ca19ffe5358 7 | EngineHashSnapshot: 8 | a0cb0c928b23bc17a26e062b351dc44d 9 | Dart SDK version: 2.17.0-69.2.beta (beta) (Mon Feb 14 13:41:58 2022 +0100) on "linux_simarm64" 10 | Engine: e3559935720ea88dfcdf9079c394ffdb5146ceab 11 | EngineHashSnapshot: 12 | ded6ef11c73fdc638d6ff6d3ad22a67b 13 | Dart SDK version: 2.16.0-134.1.beta (beta) (Wed Jan 5 20:13:09 2022 +0100) on "linux_simarm64" 14 | Engine: 63ca99584a1aef79722b2a7c6414570b54416bab 15 | EngineHashSnapshot: 16 | d56742caf7b3b3f4bd2df93a9bbb5503 17 | Dart SDK version: 2.16.0-80.1.beta (beta) (Mon Dec 13 11:59:02 2021 +0100) on "linux_simarm64" 18 | Engine: 234aca678a2fb70ff2659870186f97c32f8894f4 19 | EngineHashSnapshot: 20 | 3318fe66091c0ffbb64faec39976cb7d 21 | Dart SDK version: 2.15.0-268.8.beta (beta) (Wed Nov 10 09:03:40 2021 +0100) on "linux_simarm64" 22 | Engine: 09f1520e8b9585d133faf1eccced9357670c6d11 23 | EngineHashSnapshot: 24 | adf563436d12ba0d50ea5beb7f3be1bb 25 | Dart SDK version: 2.15.0-178.1.beta (beta) (Tue Oct 12 11:11:28 2021 +0200) on "linux_simarm64" 26 | Engine: bbba2b2437d739a455ecafb66a22a46d31b233ed 27 | EngineHashSnapshot: 28 | 24d9d411c2f90c8fbe8907f99e89d4b0 29 | Dart SDK version: 2.15.0-82.2.beta (beta) (Wed Sep 15 13:03:43 2021 +0200) on "linux_simarm64" 30 | Engine: 1d521d89d8d98f27be4e0ff84d5c6b72dbdc91ca 31 | EngineHashSnapshot: 32 | f10776149bf76be288def3c2ca73bdc1 33 | Dart SDK version: 2.14.0 (stable) (Mon Sep 6 13:47:59 2021 +0200) on "linux_simarm64" 34 | Engine: f0826da7ef2d301eb8f4ead91aaf026aa2b52881 35 | EngineHashSnapshot: 36 | 9cf77f4405212c45daf608e1cd646852 37 | Dart SDK version: 2.13.4 (stable) (Wed Jun 23 13:08:41 2021 +0200) on "linux_simarm64" 38 | Engine: 241c87ad800beeab545ab867354d4683d5bfb6ce 39 | EngineHashSnapshot: 40 | e4a09dbf2bb120fe4674e0576617a0dc 41 | Dart SDK version: 2.13.3 (stable) (Wed Jun 9 12:44:44 2021 +0200) on "linux_simarm64" 42 | Engine: 91c9fc8fe011352879e3bb6660966eafc0847233 43 | EngineHashSnapshot: 44 | e4a09dbf2bb120fe4674e0576617a0dc 45 | Dart SDK version: 2.13.1 (stable) (Fri May 21 12:45:36 2021 +0200) on "linux_simarm64" 46 | Engine: 0fdb562ac8068ce3dda6b69aca3f355f4d1d2718 47 | EngineHashSnapshot: 48 | e4a09dbf2bb120fe4674e0576617a0dc 49 | Dart SDK version: 2.13.0 (stable) (Wed May 12 12:45:49 2021 +0200) on "linux_simarm64" 50 | Engine: a9d88a4d182bdae23e3a4989abfb7ea25954aad1 51 | EngineHashSnapshot: 52 | e4a09dbf2bb120fe4674e0576617a0dc 53 | Dart SDK version: 2.12.3 (stable) (Wed Apr 14 11:02:39 2021 +0200) on "linux_simarm64" 54 | Engine: 05e680e202af9a92461070cb2d9982acad46c83c 55 | EngineHashSnapshot: 56 | 5b97292b25f0a715613b7a28e0734f77 57 | Dart SDK version: 2.12.3 (stable) (Wed Apr 14 11:02:39 2021 +0200) on "linux_simarm64" 58 | Engine: b09f014e9658da6647361e7e416d1a159d34192d 59 | EngineHashSnapshot: 60 | 5b97292b25f0a715613b7a28e0734f77 61 | Dart SDK version: 2.12.2 (stable) (Wed Mar 17 10:30:20 2021 +0100) on "linux_simarm64" 62 | Engine: 2dce47073a378673f6ca095e91b8065544c3a881 63 | EngineHashSnapshot: 64 | 5b97292b25f0a715613b7a28e0734f77 65 | Dart SDK version: 2.12.2 (stable) (Wed Mar 17 10:30:20 2021 +0100) on "linux_simarm64" 66 | Engine: 3459eb24361807fb186953a864cf890fa8e9d26a 67 | EngineHashSnapshot: 68 | 5b97292b25f0a715613b7a28e0734f77 69 | Dart SDK version: 2.12.1 (stable) (Wed Mar 10 10:18:47 2021 +0100) on "linux_simarm64" 70 | Engine: 5d8bf811b3072390933d69f3e289a4bb673636c4 71 | EngineHashSnapshot: 72 | 5b97292b25f0a715613b7a28e0734f77 73 | Dart SDK version: 2.12.0 (stable) (Thu Feb 25 19:50:53 2021 +0100) on "linux_simarm64" 74 | Engine: 40441def692f444660a11e20fac37af9050245ab 75 | EngineHashSnapshot: 76 | 5b97292b25f0a715613b7a28e0734f77 77 | Dart SDK version: 2.10.5 (stable) (Tue Jan 19 13:05:37 2021 +0100) on "linux_simarm64" 78 | Engine: 2f0af3715217a0c2ada72c717d4ed9178d68f6ed 79 | EngineHashSnapshot: 80 | 8ee4ef7a67df9845fba331734198a953 81 | Dart SDK version: 2.10.4 (stable) (Wed Nov 11 13:35:58 2020 +0100) on "linux_simarm64" 82 | Engine: ae90085a8437c0ae94d6b5ad2741739ebc742cb4 83 | EngineHashSnapshot: 84 | 8ee4ef7a67df9845fba331734198a953 85 | Dart SDK version: 2.10.4 (stable) (Wed Nov 11 13:35:58 2020 +0100) on "linux_simarm64" 86 | Engine: 2c956a31c0a3d350827aee6c56bb63337c5b4e6e 87 | EngineHashSnapshot: 88 | 8ee4ef7a67df9845fba331734198a953 89 | Dart SDK version: 2.10.3 (stable) (Tue Oct 27 14:44:30 2020 +0100) on "linux_simarm64" 90 | Engine: a1440ca392ca23e874a105c5f3248b495bd0e247 91 | EngineHashSnapshot: 92 | 8ee4ef7a67df9845fba331734198a953 93 | Dart SDK version: 2.10.2 (stable) (Tue Oct 13 15:50:27 2020 +0200) on "linux_simarm64" 94 | Engine: b8752bbfff0419c8bf616b602bc59fd28f6a3d1b 95 | EngineHashSnapshot: 96 | 8ee4ef7a67df9845fba331734198a953 97 | Dart SDK version: 2.10.1 (stable) (Tue Oct 6 10:54:20 2020 +0200) on "linux_simarm64" 98 | Engine: 75bef9f6c8ac2ed4e1e04cdfcd88b177d9f1850d 99 | EngineHashSnapshot: 100 | 8ee4ef7a67df9845fba331734198a953 101 | Dart SDK version: 2.10.0 (stable) (Mon Sep 28 09:21:23 2020 +0200) on "linux_simarm64" 102 | Engine: 5babba6c4d25fa237bbf755ab85c9a0c50b3c6ec 103 | EngineHashSnapshot: 104 | 8ee4ef7a67df9845fba331734198a953 105 | Dart SDK version: 2.9.2 (stable) (Wed Aug 26 12:44:28 2020 +0200) on "linux_simarm64" 106 | Engine: d1bc06f032f9d6c148ea6b96b48261d6f545004f 107 | EngineHashSnapshot: 108 | 04645b6182fad3d68350d84669869ce5 109 | Dart SDK version: 2.9.1 (stable) (Wed Aug 12 12:37:19 2020 +0200) on "linux_simarm64" 110 | Engine: 9d5b21729ff53dbf8eadd8bc97e0e30d77abec95 111 | EngineHashSnapshot: 112 | 04645b6182fad3d68350d84669869ce5 113 | Dart SDK version: 2.9.0 (stable) (Fri Jul 31 10:59:48 2020 +0200) on "linux_simarm64" 114 | Engine: c8e3b9485386425213e2973126d6f57e7ed83c54 115 | EngineHashSnapshot: 116 | 04645b6182fad3d68350d84669869ce5 117 | Dart VM version: 2.8.4 (stable) (Wed Jun 3 12:26:04 2020 +0200) on "linux_simarm64" 118 | Engine: ee76268252c22f5c11e82a7b87423ca3982e51a7 119 | EngineHashSnapshot: 120 | be7d304ff826e2dfac63538e227c3cc5 121 | Dart VM version: 2.8.3 (stable) (Tue May 26 18:39:38 2020 +0200) on "linux_simarm64" 122 | Engine: b851c718295a896918dc93cb1ff14f2f895a1b90 123 | EngineHashSnapshot: 124 | be7d304ff826e2dfac63538e227c3cc5 125 | Dart VM version: 2.8.2 (stable) (Mon May 11 15:06:42 2020 +0200) on "linux_simarm64" 126 | Engine: 6bc433c6b6b5b98dcf4cc11aff31cdee90849f32 127 | EngineHashSnapshot: 128 | 74edb834fac3fcea79d7ac2d1d6f1fb2 129 | Dart VM version: 2.8.1 (stable) (Thu Apr 30 09:25:21 2020 +0200) on "linux_simarm64" 130 | Engine: 540786dd51f112885a89792d678296b95e6622e5 131 | EngineHashSnapshot: 132 | 74edb834fac3fcea79d7ac2d1d6f1fb2 133 | Dart VM version: 2.7.2 (Mon Mar 23 22:11:27 2020 +0100) on "linux_simarm64" 134 | Engine: af51afceb8886cc11e25047523c4e0c7e1f5d408 135 | EngineHashSnapshot: 136 | 20e5c4f7dc44368ac5a17643b93665f6 137 | Dart VM version: 2.7.0 (Fri Dec 6 16:26:51 2019 +0100) on "linux_simarm64" 138 | Engine: e1e6ced81d029258d449bdec2ba3cddca9c2ca0c 139 | EngineHashSnapshot: 140 | 20e5c4f7dc44368ac5a17643b93665f6 141 | Dart VM version: 2.7.0 (Mon Dec 2 20:10:59 2019 +0100) on "linux_simarm64" 142 | Engine: a67792536ca236a971d0efbcfd7af4efb8f6c119 143 | EngineHashSnapshot: 144 | 20e5c4f7dc44368ac5a17643b93665f6 145 | Dart VM version: 2.7.0 (Mon Dec 2 20:10:59 2019 +0100) on "linux_simarm64" 146 | Engine: 2994f7e1e682039464cb25e31a78b86a3c59b695 147 | EngineHashSnapshot: 148 | 20e5c4f7dc44368ac5a17643b93665f6 149 | Dart VM version: 2.5.0 (Fri Sep 6 20:10:36 2019 +0200) on "linux_simarm64" 150 | Engine: b863200c37df4ed378042de11c4e9ff34e4e58c9 151 | EngineHashSnapshot: 152 | c8562f0ee0ebc38ba217c7955956d1cb 153 | Dart VM version: 2.4.0 (Wed Jun 19 11:53:45 2019 +0200) on "linux_simarm64" 154 | Engine: fee001c93f25a1e7258e762781a7361f122d29f5 155 | EngineHashSnapshot: 156 | 1d7acad1540192ac459cf60344efb7c1 157 | Dart VM version: 2.4.0 (Wed Jun 19 11:53:45 2019 +0200) on "linux_simarm64" 158 | Engine: 54ad777fd29b031b87c7a68a6637fb48c0932862 159 | EngineHashSnapshot: 160 | 1d7acad1540192ac459cf60344efb7c1 161 | Dart VM version: 2.4.0 (Wed Jun 19 11:53:45 2019 +0200) on "linux_simarm64" 162 | Engine: b1cb0d9e9b44393efeb735f664672a74732cdc8b 163 | EngineHashSnapshot: 164 | 1d7acad1540192ac459cf60344efb7c1 165 | Dart VM version: 2.3.0-dev.0.5.flutter-a1668566e5 (Tue Apr 30 20:35:41 2019 +0200) on "linux_simarm64" 166 | Engine: 52c7a1e849a170be4b2b2fe34142ca2c0a6fea1f 167 | EngineHashSnapshot: 168 | eed485c757fba5d731e4054412c99f2e 169 | Dart VM version: 2.1.2-dev.0.0.flutter-0a7dcf17eb (Tue Feb 12 01:59:15 2019 +0000) on "linux_simarm64" 170 | Engine: 3757390fa4b00d2d261bfdf5182d2e87c9113ff9 171 | EngineHashSnapshot: 172 | 0c73eb70aa4d30f450273cb424be8c62 173 | Dart VM version: 2.1.0-dev.9.4.flutter-f9ebf21297 (Thu Nov 8 23:00:07 2018 +0100) on "linux_simarm64" 174 | Engine: 7375a0f414bde4bc941e623482221db2fc8c4ab5 175 | EngineHashSnapshot: 176 | 8343f188ada07642f47c56e518f1307c 177 | Dart SDK version: 2.14.0-377.8.beta (beta) (Wed Sep 1 11:09:24 2021 +0200) on "linux_simarm64" 178 | Engine: fcde2c8b2f0891c80e1f0f794bc7c26dd50f2949 179 | EngineHashSnapshot: 180 | 9cf77f4405212c45daf608e1cd646852 181 | Dart SDK version: 2.14.0-377.7.beta (beta) (Wed Aug 18 07:42:19 2021 +0200) on "linux_simarm64" 182 | Engine: 7a4c4505f6a7a1aa758d62b58150dce43cfa473f 183 | EngineHashSnapshot: 184 | 9cf77f4405212c45daf608e1cd646852 185 | Dart SDK version: 2.14.0-377.4.beta (beta) (Tue Aug 10 12:47:37 2021 +0200) on "linux_simarm64" 186 | Engine: fbeb7e22bd6d594a16c487cc138970fbd2a77d40 187 | EngineHashSnapshot: 188 | 9cf77f4405212c45daf608e1cd646852 189 | Dart SDK version: 2.14.0-301.2.beta (beta) (Mon Jul 19 23:53:21 2021 +0200) on "linux_simarm64" 190 | Engine: 844c29f42a614420b2205c178f22d30b43a8b0bb 191 | EngineHashSnapshot: 192 | 659a72e41e3276e882709901c27de33d 193 | Dart SDK version: 2.14.0-301.0.dev (dev) (Sat Jul 10 17:56:59 2021 -0700) on "linux_simarm64" 194 | Engine: ed25e8f01efe6e778cdc65a1858ba3c5ce629786 195 | EngineHashSnapshot: 196 | 659a72e41e3276e882709901c27de33d 197 | Dart SDK version: 2.14.0-188.5.beta (beta) (Thu Jun 24 15:29:20 2021 +0200) on "linux_simarm64" 198 | Engine: 9d517f475ba1282b619477bde8e708d6a34287cf 199 | EngineHashSnapshot: 200 | 7a5b240780941844bae88eca5dbaa7b8 201 | Dart SDK version: 2.13.0-211.14.beta (beta) (Mon May 3 08:08:14 2021 +0200) on "linux_simarm64" 202 | Engine: a123e75c6082da3a08f229b9c565e64b5b24a8a3 203 | EngineHashSnapshot: 204 | e4a09dbf2bb120fe4674e0576617a0dc 205 | Dart SDK version: 2.13.0-211.13.beta (beta) (Mon Apr 26 14:25:18 2021 +0200) on "linux_simarm64" 206 | Engine: 91ed51e05c68efdbddf642735f164fc914358cff 207 | EngineHashSnapshot: 208 | e4a09dbf2bb120fe4674e0576617a0dc 209 | Dart SDK version: 2.13.0-211.6.beta (beta) (Wed Apr 14 13:59:12 2021 +0200) on "linux_simarm64" 210 | Engine: d2a2e93510ad6cfc3d62a90d903b7056e4da8264 211 | EngineHashSnapshot: 212 | 34f6eec64e9371856eaaa278ccf56538 213 | Dart SDK version: 2.13.0-116.0.dev (dev) (Sun Mar 7 18:57:20 2021 -0800) on "linux_simarm64" 214 | Engine: 711ab3fda05004ee5f6035f2a0bf099fca39a129 215 | EngineHashSnapshot: 216 | 39a9141bbcc3cae43e6f9f6b7fbaafe3 217 | Dart SDK version: 2.12.0-259.16.beta (beta) (Tue Feb 23 00:10:18 2021 +0100) on "linux_simarm64" 218 | Engine: 042c82b02c83c20e57a67d86a8d3b7677d983556 219 | EngineHashSnapshot: 220 | 5b97292b25f0a715613b7a28e0734f77 221 | Dart SDK version: 2.12.0-259.15.beta (beta) (Fri Feb 19 12:27:24 2021 +0100) on "linux_simarm64" 222 | Engine: 4a466e17cb02da06e9e256a278cb9779f2abb245 223 | EngineHashSnapshot: 224 | 5b97292b25f0a715613b7a28e0734f77 225 | Dart SDK version: 2.12.0-259.12.beta (beta) (Fri Feb 12 11:00:34 2021 +0100) on "linux_simarm64" 226 | Engine: 21fa8bb99e9a20563d9a7d39afeba8e5c811a7eb 227 | EngineHashSnapshot: 228 | 5b97292b25f0a715613b7a28e0734f77 229 | Dart SDK version: 2.12.0-259.9.beta (beta) (Mon Feb 8 11:28:48 2021 +0100) on "linux_simarm64" 230 | Engine: d4453f601890ec682bbf8f5659b70f15cce1d67d 231 | EngineHashSnapshot: 232 | 5b97292b25f0a715613b7a28e0734f77 233 | Engine Not Found: 2c527d6c7e70e2f51bca1a46f1174b250f84c5da 234 | Dart SDK version: 2.12.0-133.7.beta (beta) (Tue Jan 12 09:25:38 2021 +0100) on "linux_simarm64" 235 | Engine: 7a8f8ca02c276dce02f8dd42a44e776ac03fa9bc 236 | EngineHashSnapshot: 237 | 9e2165577cef0f0f70f9ff072107920c 238 | Dart SDK version: 2.12.0-133.2.beta (beta) (Tue Dec 15 09:55:09 2020 +0100) on "linux_simarm64" 239 | Engine: 92ae191c17a53144bf4d62f3863c110be08e3fd3 240 | EngineHashSnapshot: 241 | 9e2165577cef0f0f70f9ff072107920c 242 | Dart SDK version: 2.12.0-29.10.beta (beta) (Tue Nov 17 10:50:22 2020 +0100) on "linux_simarm64" 243 | Engine: 07c1eed46b9d9b58df78566e9b8b2e42e80d3380 244 | EngineHashSnapshot: 245 | a2bdb58c7edf9471da9180bf8185e7f7 246 | Dart SDK version: 2.11.0-213.1.beta (beta) (Wed Oct 14 10:49:52 2020 +0200) on "linux_simarm64" 247 | Engine: 1d12d82d9cb54876f58044aa52198d53ec841c3d 248 | EngineHashSnapshot: 249 | 953aa80d78c4d8886e3e4d784fd9d95f 250 | Dart SDK version: 2.10.0-110.5.beta (beta) (Wed Sep 23 11:05:07 2020 +0200) on "linux_simarm64" 251 | Engine: f763b5b9b936872bc6c84b4395286ce684e3b431 252 | EngineHashSnapshot: 253 | 8ee4ef7a67df9845fba331734198a953 254 | Dart SDK version: 2.10.0-110.3.beta (beta) (Tue Sep 15 14:39:26 2020 +0200) on "linux_simarm64" 255 | Engine: 4654fc6cf6416daae78eac2c211ad84c46e21625 256 | EngineHashSnapshot: 257 | 8ee4ef7a67df9845fba331734198a953 258 | Dart SDK version: 2.10.0-7.3.beta (beta) (Wed Aug 26 09:46:50 2020 +0200) on "linux_simarm64" 259 | Engine: 20a953183580250aac2e15d36007664118bda5ab 260 | EngineHashSnapshot: 261 | 5f40b0a9f04b5018fa08a9b67fd316cd 262 | Dart SDK version: 2.10.0-7.2.beta (beta) (Mon Aug 17 11:01:01 2020 +0200) on "linux_simarm64" 263 | Engine: 267070c17a6956de1a03dbe09cda56f0c485f41b 264 | EngineHashSnapshot: 265 | 5f40b0a9f04b5018fa08a9b67fd316cd 266 | Dart SDK version: 2.9.0-21.10.beta (beta) (Tue Jul 21 10:46:30 2020 +0200) on "linux_simarm64" 267 | Engine: d6ee1499c27a156a797d9f1539ffb7892855c1d0 268 | EngineHashSnapshot: 269 | 04645b6182fad3d68350d84669869ce5 270 | Dart SDK version: 2.9.0-21.10.beta (beta) (Tue Jul 21 10:46:30 2020 +0200) on "linux_simarm64" 271 | Engine: ac95267aef5175b3f6c3387d502070c68f588ad5 272 | EngineHashSnapshot: 273 | 04645b6182fad3d68350d84669869ce5 274 | Dart SDK version: 2.9.0-21.2.beta (beta) (Fri Jul 10 17:39:56 2020 +0200) on "linux_simarm64" 275 | Engine: 60b269d898cbe0be27e9b9ba9d21eae97b887ab6 276 | EngineHashSnapshot: 277 | 8b2ca977d1d2920b9839d1b60eade6a7 278 | Dart VM version: 2.9.0-14.1.beta (beta) (Tue Jun 9 10:52:57 2020 +0200) on "linux_simarm64" 279 | Engine: 9a28c3bcf40ce64fee61e807ee3e1395fd6bd954 280 | EngineHashSnapshot: 281 | 59da07d9da5a83be4ce75b7913b63dbd 282 | Dart VM version: 2.9.0-8.2.beta (beta) (Tue May 12 09:05:56 2020 +0200) on "linux_simarm64" 283 | Engine: ef9215ceb2884ddf520d321bcd822d1461330876 284 | EngineHashSnapshot: 285 | b58ead73b2c5dfec69565df469bba387 286 | Dart VM version: 2.8.0 (stable) (Thu Apr 23 13:05:36 2020 +0200) on "linux_simarm64" 287 | Engine: 376ad6a64b08aa26005e3f82aed26de2e290b572 288 | EngineHashSnapshot: 289 | 74edb834fac3fcea79d7ac2d1d6f1fb2 290 | Dart VM version: 2.8.0-dev.20.10 (beta) (Mon Apr 20 12:00:58 2020 +0200) on "linux_simarm64" 291 | Engine: 4c8c31f591882b3c668992d2e9da761118899f38 292 | EngineHashSnapshot: 293 | 74edb834fac3fcea79d7ac2d1d6f1fb2 294 | Dart VM version: 2.8.0-dev.18.0.flutter-eea9717938 (be) (Wed Apr 1 08:55:31 2020 +0000) on "linux_simarm64" 295 | Engine: c9506cb8e93e5e8879152ff5c948b175abb5b997 296 | EngineHashSnapshot: 297 | 9e7cb7c9394c24c2398410b902673e13 298 | Dart VM version: 2.8.0-dev.12.0.flutter-9983424a3c (Thu Mar 5 16:51:44 2020 +0000) on "linux_simarm64" 299 | Engine: 5aff3119480996ca014ec0f8d26d74db617b5852 300 | EngineHashSnapshot: 301 | ee91a9191a5286c31d91a89754ba36af 302 | Dart VM version: 2.8.0-dev.5.0.flutter-fc3af737c7 (Fri Jan 24 09:53:26 2020 +0000) on "linux_simarm64" 303 | Engine: c4229bfbbae455ad69c967be19aee3fadd6486e1 304 | EngineHashSnapshot: 305 | e739779cc1d28f0f697a92f2daf5f10f 306 | Dart VM version: 2.8.0-dev.0.0.flutter-c547f5d933 (Fri Dec 27 00:43:14 2019 +0000) on "linux_simarm64" 307 | Engine: bdc9708d235e582483d299642ad8682826ebb90d 308 | EngineHashSnapshot: 309 | 81662522448cdd4d02eb060669e5d48b 310 | Dart VM version: 2.7.0 (Mon Dec 2 20:10:59 2019 +0100) on "linux_simarm64" 311 | Engine: ac9391978e7c0693b75a82c219e059b6ffee35c4 312 | EngineHashSnapshot: 313 | 20e5c4f7dc44368ac5a17643b93665f6 314 | Dart VM version: 2.7.0 (Mon Dec 2 20:10:59 2019 +0100) on "linux_simarm64" 315 | Engine: 6955b06cedb2425f4363f10642c9b0e63e496af0 316 | EngineHashSnapshot: 317 | 20e5c4f7dc44368ac5a17643b93665f6 318 | Dart VM version: 2.7.0 (Mon Dec 2 20:10:59 2019 +0100) on "linux_simarm64" 319 | Engine: c1e322b685a81c11c16bddd22282925b7d0272e8 320 | EngineHashSnapshot: 321 | 20e5c4f7dc44368ac5a17643b93665f6 322 | Dart VM version: 2.7.0 (Fri Nov 8 17:16:37 2019 +0000) on "linux_simarm64" 323 | Engine: af04338413c3ed73316350f64248a152433073b6 324 | EngineHashSnapshot: 325 | 2fb364d659ea53f7892be9ba5e036047 326 | Dart VM version: 2.6.0-dev.4.0.flutter-1103600280 (Tue Oct 1 15:17:52 2019 +0000) on "linux_simarm64" 327 | Engine: 9e6314d348f9b5521e3c66856324d7a9c4a928c9 328 | EngineHashSnapshot: 329 | c3bbfe8f226120ad0569d7b78ed2d9ef 330 | Dart VM version: 2.5.0 (Sun Sep 1 19:58:36 2019 +0200) on "linux_simarm64" 331 | Engine: cc88fa45dbf4c55bc23cecea17fb90f43bccf588 332 | EngineHashSnapshot: 333 | c8562f0ee0ebc38ba217c7955956d1cb 334 | Dart VM version: 2.5.0-dev.1.0.flutter-0ca1582afd (Thu Jul 25 23:50:46 2019 +0000) on "linux_simarm64" 335 | Engine: 38ac5f30a7026e870619c2e8e8c99c070d74036f 336 | EngineHashSnapshot: 337 | 34948253b59d5a56b2ec161e17975a4e 338 | Dart VM version: 2.3.2-dev.0.0.flutter-e3edfd36b2 (Wed May 22 16:01:07 2019 +0000) on "linux_simarm64" 339 | Engine: 8dc3a4cde2075a4f5458fd0eb199627f5124508d 340 | EngineHashSnapshot: 341 | c89592e3e4956c33956c8ba0f691dbd0 342 | Dart VM version: 2.3.0-dev.0.1.flutter-cf4444b803 (Thu Apr 18 21:21:18 2019 +0000) on "linux_simarm64" 343 | Engine: ca31a7c57bada458fa7f5c0d3f36bc1af4ccbc79 344 | EngineHashSnapshot: 345 | eed485c757fba5d731e4054412c99f2e 346 | Dart VM version: 2.2.1-dev.4.0.flutter-None (Tue Apr 2 16:55:41 2019 +0000) on "linux_simarm64" 347 | Engine: 4737fc5cd89b8f0136e927b00f2e159444b95a73 348 | EngineHashSnapshot: 349 | f630ecdf457e27dd24d3b9e0a6bc1c13 350 | Dart VM version: 2.2.1-dev.0.0.flutter-571ea80e11 (Mon Mar 4 19:30:53 2019 +0000) on "linux_simarm64" 351 | Engine: f4951df193a7966f9ed4da43d555eee0913d84d1 352 | EngineHashSnapshot: 353 | 9a66dcb2da955dffdbdb0eafa0288784 354 | Dart VM version: 2.1.1-dev.0.1.flutter-ec86471ccc (Thu Jan 3 22:43:43 2019 +0000) on "linux_simarm64" 355 | Engine: 7112b72cc229e05d36716c3d7739885d3ffa72e6 356 | EngineHashSnapshot: 357 | 317d4c7e607b1fd7d682c0010aadf1d0 358 | Dart VM version: 2.1.0-dev.9.4.flutter-f9ebf21297 (Thu Nov 8 23:00:07 2018 +0100) on "linux_simarm64" 359 | Engine: 72c7a7567228cdaf8b7aa4a9e3d212ef9d4cc0ed 360 | EngineHashSnapshot: 361 | 8343f188ada07642f47c56e518f1307c 362 | Dart VM version: 2.1.0-dev.9.4.flutter-f9ebf21297 (Thu Nov 8 23:00:07 2018 +0100) on "linux_simarm64" 363 | Engine: be973ea196127383f356d39be466e2f3bd163083 364 | EngineHashSnapshot: 365 | 8343f188ada07642f47c56e518f1307c 366 | Dart VM version: 2.1.0-dev.9.4.flutter-f9ebf21297 (Thu Nov 8 23:00:07 2018 +0100) on "linux_simarm64" 367 | Engine: eebc6a58958587203f624528ff46b1d4b2b0f2fa 368 | EngineHashSnapshot: 369 | 8343f188ada07642f47c56e518f1307c 370 | Dart VM version: 2.1.0-dev.9.4.flutter-f9ebf21297 (Thu Nov 8 23:00:07 2018 +0100) on "linux_simarm64" 371 | Engine: 5c8147450db52b81232c138b9f9a65a8f9c61862 372 | EngineHashSnapshot: 373 | 8343f188ada07642f47c56e518f1307c 374 | Dart VM version: 2.1.0-dev.9.4.flutter-f9ebf21297 (Thu Nov 8 23:00:07 2018 +0100) on "linux_simarm64" 375 | Engine: 1baf081343530dbaa8bec378fe1ce26b4897c23f 376 | EngineHashSnapshot: 377 | 8343f188ada07642f47c56e518f1307c 378 | Dart VM version: 2.1.0-dev.9.4.flutter-f9ebf21297 (Thu Nov 8 23:00:07 2018 +0100) on "linux_simarm64" 379 | Engine: 2e06da3df9cb370795f49747fdfd295b8168c133 380 | EngineHashSnapshot: 381 | 8343f188ada07642f47c56e518f1307c 382 | Dart VM version: 2.1.0-dev.9.3.flutter-9c07fb64c4 (Wed Nov 7 06:47:47 2018 +0100) on "linux_simarm64" 383 | Engine: 5646e86a6f442dc6f4158ae7010ab13d72a0b356 384 | EngineHashSnapshot: 385 | d124ce50a30741a188e41c52c424c127 386 | Dart VM version: 2.1.0-dev.8.0.flutter-bf26f760b1 (Thu Oct 25 07:36:06 2018 +0000) on "linux_simarm64" 387 | Engine: 6c2ade9fa2b555899530a31cc8cbd1dff3bf5eea 388 | EngineHashSnapshot: 389 | 46b2bfb57b5647c5f7527ff9aa56c69b 390 | Dart VM version: 2.1.0-dev.5.0.flutter-a2eb050044 (Mon Sep 24 15:27:07 2018 +0000) on "linux_simarm64" 391 | Engine: 74625aed323d04f2add0410e84038d250f51b616 392 | EngineHashSnapshot: 393 | a135b1a4c6790a272609c9405379bc63 394 | Dart VM version: 2.1.0-dev.3.1.flutter-760a9690c2 (Wed Aug 29 07:29:38 2018 +0000) on "linux_simarm64" 395 | Engine: 58a1894a1cd798de2f9a206f157a90d45944028b 396 | EngineHashSnapshot: 397 | 1b444eb4796616ea2f955f3f1e440801 398 | Dart VM version: 2.1.0-dev.1.0.flutter-ccb16f7282 (Tue Aug 21 22:21:20 2018 +0000) on "linux_simarm64" 399 | Engine: af42b6dc95bd9f719e43c4e9f29a00640f0f0bba 400 | EngineHashSnapshot: 401 | d0cf500478165d79bdefccb0847ffb33 402 | Dart VM version: 2.1.0-dev.0.0.flutter-be6309690f (Fri Aug 10 06:04:10 2018 +0000) on "linux_simarm64" 403 | Engine: e3687f70c7ece72000b32ee1b3c02755ba5361ac 404 | EngineHashSnapshot: 405 | 35224090f45cbae1402bafd97a112a40 406 | Dart VM version: 2.0.0-dev.58.0.flutter-f981f09760 (Sat May 26 03:16:14 2018 +0000) on "linux_simarm64" 407 | Engine: 1ed25ca7b7e3e3e8047df050bba4174074c9b336 408 | EngineHashSnapshot: 409 | 04cb98b58e7d69109004454c20b492f7 410 | Dart VM version: 2.0.0-dev.54.0.flutter-46ab040e58 (Fri May 11 17:50:46 2018 +0000) on "linux_simarm64" 411 | Engine: 06afdfe54ebef9168a90ca00a6721c2d36e6aafa 412 | EngineHashSnapshot: 413 | 1b155eedbb3a2640a88d2e54d2f2d204 414 | Building a core snapshot requires specifying output files for --vm_snapshot_data and --isolate_snapshot_data. Usage: gen_snapshot [] [] [] Global options: --package_root= Where to find packages, that is, package:... imports. --packages= Where to find a package spec file --url_mapping= Uses the URL mapping(s) specified on the command line to load the libraries. --dependencies= Generates a Makefile with snapshot output files as targets and all transitive imports as sources. --print_dependencies Prints all transitive imports to stdout. --dependencies_only Don't create and output the snapshot. To create a core snapshot: --snapshot_kind=core --vm_snapshot_data= --isolate_snapshot_data= [] Writes a snapshot of to the specified snapshot files. If no is passed, a generic snapshot of all the corelibs is created. To create a script snapshot with respect to a given core snapshot: --snapshot_kind=script --vm_snapshot_data= --isolate_snapshot_data= --script_snapshot= Writes a snapshot of to the specified snapshot files. If no is passed, a generic snapshot of all the corelibs is created. To create an AOT application snapshot as blobs suitable for loading with mmap: --snapshot_kind=app-aot-blobs --vm_snapshot_data= --vm_snapshot_instructions= --isolate_snapshot_data= --isolate_snapshot_instructions= {--embedder_entry_points_manifest=} [--obfuscate] [--save-obfuscation-map=] To create an AOT application snapshot as assembly suitable for compilation as a static or dynamic library: --snapshot_kind=app-aot-assembly --assembly= {--embedder_entry_points_manifest=} [--obfuscate] [--save-obfuscation-map=] AOT snapshots require entry points manifest files, which list the places in the Dart program the embedder calls from the C API (Dart_Invoke, etc). Not specifying these may cause the tree shaker to remove them from the program. The format of this manifest is as follows. Each line in the manifest is a comma separated list of three elements. The first entry is the library URI, the second entry is the class name and the final entry the function name. The file must be terminated with a newline character. Example: dart:something,SomeClass,doSomething AOT snapshots can be obfuscated: that is all identifiers will be renamed during compilation. This mode is enabled with --obfuscate flag. Mapping between original and obfuscated names can be serialized as a JSON array using --save-obfuscation-map= option. See dartbug.com/30524 for implementation details and limitations of the obfuscation pass. 415 | Engine: 09d05a38912a3c1a906e95099cac9a7e14fae85f 416 | EngineHashSnapshot: 417 | 39646f79e9336fb65ac68c8568544c92 418 | Building a core snapshot requires specifying output files for --vm_snapshot_data and --isolate_snapshot_data. Usage: gen_snapshot [] [] [] Global options: --package_root= Where to find packages, that is, package:... imports. --packages= Where to find a package spec file --url_mapping= Uses the URL mapping(s) specified on the command line to load the libraries. --dependencies= Generates a Makefile with snapshot output files as targets and all transitive imports as sources. --print_dependencies Prints all transitive imports to stdout. --dependencies_only Don't create and output the snapshot. To create a core snapshot: --snapshot_kind=core --vm_snapshot_data= --isolate_snapshot_data= [] Writes a snapshot of to the specified snapshot files. If no is passed, a generic snapshot of all the corelibs is created. To create a script snapshot with respect to a given core snapshot: --snapshot_kind=script --vm_snapshot_data= --isolate_snapshot_data= --script_snapshot= Writes a snapshot of to the specified snapshot files. If no is passed, a generic snapshot of all the corelibs is created. To create an AOT application snapshot as blobs suitable for loading with mmap: --snapshot_kind=app-aot-blobs --vm_snapshot_data= --vm_snapshot_instructions= --isolate_snapshot_data= --isolate_snapshot_instructions= {--embedder_entry_points_manifest=} [--obfuscate] [--save-obfuscation-map=] To create an AOT application snapshot as assembly suitable for compilation as a static or dynamic library: --snapshot_kind=app-aot-assembly --assembly= {--embedder_entry_points_manifest=} [--obfuscate] [--save-obfuscation-map=] AOT snapshots require entry points manifest files, which list the places in the Dart program the embedder calls from the C API (Dart_Invoke, etc). Not specifying these may cause the tree shaker to remove them from the program. The format of this manifest is as follows. Each line in the manifest is a comma separated list of three elements. The first entry is the library URI, the second entry is the class name and the final entry the function name. The file must be terminated with a newline character. Example: dart:something,SomeClass,doSomething AOT snapshots can be obfuscated: that is all identifiers will be renamed during compilation. This mode is enabled with --obfuscate flag. Mapping between original and obfuscated names can be serialized as a JSON array using --save-obfuscation-map= option. See dartbug.com/30524 for implementation details and limitations of the obfuscation pass. 419 | Engine: c903c217a1a8206cdebdab1703b52ec6180edf37 420 | EngineHashSnapshot: 421 | d72bf5003e5924b61a7943f58e7b6814 422 | Building a core snapshot requires specifying output files for --vm_snapshot_data and --isolate_snapshot_data. Usage: gen_snapshot [] [] [] Global options: --package_root= Where to find packages, that is, package:... imports. --packages= Where to find a package spec file --url_mapping= Uses the URL mapping(s) specified on the command line to load the libraries. --dependencies= Generates a Makefile with snapshot output files as targets and all transitive imports as sources. --print_dependencies Prints all transitive imports to stdout. --dependencies_only Don't create and output the snapshot. To create a core snapshot: --snapshot_kind=core --vm_snapshot_data= --isolate_snapshot_data= [] Writes a snapshot of to the specified snapshot files. If no is passed, a generic snapshot of all the corelibs is created. To create a script snapshot with respect to a given core snapshot: --snapshot_kind=script --vm_snapshot_data= --isolate_snapshot_data= --script_snapshot= Writes a snapshot of to the specified snapshot files. If no is passed, a generic snapshot of all the corelibs is created. To create an AOT application snapshot as blobs suitable for loading with mmap: --snapshot_kind=app-aot-blobs --vm_snapshot_data= --vm_snapshot_instructions= --isolate_snapshot_data= --isolate_snapshot_instructions= {--embedder_entry_points_manifest=} [--obfuscate] [--save-obfuscation-map=] To create an AOT application snapshot as assembly suitable for compilation as a static or dynamic library: --snapshot_kind=app-aot-assembly --assembly= {--embedder_entry_points_manifest=} [--obfuscate] [--save-obfuscation-map=] AOT snapshots require entry points manifest files, which list the places in the Dart program the embedder calls from the C API (Dart_Invoke, etc). Not specifying these may cause the tree shaker to remove them from the program. The format of this manifest is as follows. Each line in the manifest is a comma separated list of three elements. The first entry is the library URI, the second entry is the class name and the final entry the function name. The file must be terminated with a newline character. Example: dart:something,SomeClass,doSomething AOT snapshots can be obfuscated: that is all identifiers will be renamed during compilation. This mode is enabled with --obfuscate flag. Mapping between original and obfuscated names can be serialized as a JSON array using --save-obfuscation-map= option. See dartbug.com/30524 for implementation details and limitations of the obfuscation pass. 423 | Engine: e61bb9ac3a3fd789754e2e54220bcfc27076a857 424 | EngineHashSnapshot: 425 | 0d015018f02a6de0c92ac1ac59191b55 426 | Building a core snapshot requires specifying output files for --vm_snapshot_data and --isolate_snapshot_data. Usage: gen_snapshot [] [] [] Global options: --package_root= Where to find packages, that is, package:... imports. --packages= Where to find a package spec file --url_mapping= Uses the URL mapping(s) specified on the command line to load the libraries. --dependencies= Generates a Makefile with snapshot output files as targets and all transitive imports as sources. --print_dependencies Prints all transitive imports to stdout. --dependencies_only Don't create and output the snapshot. To create a core snapshot: --snapshot_kind=core --vm_snapshot_data= --isolate_snapshot_data= [] Writes a snapshot of to the specified snapshot files. If no is passed, a generic snapshot of all the corelibs is created. To create a script snapshot with respect to a given core snapshot: --snapshot_kind=script --vm_snapshot_data= --isolate_snapshot_data= --script_snapshot= Writes a snapshot of to the specified snapshot files. If no is passed, a generic snapshot of all the corelibs is created. To create an AOT application snapshot as blobs suitable for loading with mmap: --snapshot_kind=app-aot-blobs --vm_snapshot_data= --vm_snapshot_instructions= --isolate_snapshot_data= --isolate_snapshot_instructions= {--embedder_entry_points_manifest=} [--obfuscate] [--save-obfuscation-map=] To create an AOT application snapshot as assembly suitable for compilation as a static or dynamic library: --snapshot_kind=app-aot-assembly --assembly= {--embedder_entry_points_manifest=} [--obfuscate] [--save-obfuscation-map=] AOT snapshots require entry points manifest files, which list the places in the Dart program the embedder calls from the C API (Dart_Invoke, etc). Not specifying these may cause the tree shaker to remove them from the program. The format of this manifest is as follows. Each line in the manifest is a comma separated list of three elements. The first entry is the library URI, the second entry is the class name and the final entry the function name. The file must be terminated with a newline character. Example: dart:something,SomeClass,doSomething AOT snapshots can be obfuscated: that is all identifiers will be renamed during compilation. This mode is enabled with --obfuscate flag. Mapping between original and obfuscated names can be serialized as a JSON array using --save-obfuscation-map= option. See dartbug.com/30524 for implementation details and limitations of the obfuscation pass. 427 | Engine: ead227f118077d1f2b57842a32abaf105b573b8a 428 | EngineHashSnapshot: 429 | 9bc066b6e8ef5a9f7224c2926c6ad2f4 430 | -------------------------------------------------------------------------------- /src/__init__.py: -------------------------------------------------------------------------------- 1 | import pkg_resources 2 | from io import BytesIO 3 | import re 4 | import sys 5 | import csv 6 | import string 7 | import os 8 | import os.path 9 | from os.path import join 10 | from zipfile import ZipFile 11 | import zipfile 12 | import shutil 13 | 14 | if sys.version_info[0] >= 3: 15 | from urllib.request import urlretrieve 16 | from urllib.request import urlopen 17 | else: 18 | from urllib import urlretrieve 19 | from urllib import urlopen 20 | 21 | IPBurp = '192.168.1.12' 22 | libAppArm64 = '','' 23 | libAppArm = '','' 24 | libAppX64 = '','' 25 | libAppX86 = '','' 26 | libios = '','' 27 | libappHash = '' 28 | ZIPSTORED = False 29 | 30 | def patchLibrary(): 31 | if len(libios[1]) != 0: 32 | buffer = open('Flutter', 'rb').read().replace(b'192.168.133.104', IPBurp.encode('ascii')) 33 | open('Flutter', 'wb').write(buffer) 34 | if len(libAppArm64[1]) != 0: 35 | buffer = open('libflutter_arm64.so', 'rb').read().replace(b'192.168.133.104', IPBurp.encode('ascii')) 36 | open('libflutter_arm64.so', 'wb').write(buffer) 37 | if len(libAppArm[1]) != 0: 38 | buffer = open('libflutter_arm.so', 'rb').read().replace(b'192.168.133.104', IPBurp.encode('ascii')) 39 | open('libflutter_arm.so', 'wb').write(buffer) 40 | if len(libAppX64[1]) != 0: 41 | buffer = open('libflutter_x64.so', 'rb').read().replace(b'192.168.133.104', IPBurp.encode('ascii')) 42 | open('libflutter_x64.so', 'wb').write(buffer) 43 | 44 | def inputIPBurp(): 45 | global IPBurp 46 | try: 47 | IPBurp = raw_input("Example: (192.168.1.154) etc.\nPlease enter your BurpSuite IP: ") 48 | if not re.match(r'[0-9]+(?:\.[0-9]+){3}', IPBurp): 49 | print("Invalid IP Address") 50 | inputIPBurp() 51 | except: 52 | IPBurp = input('Example: (192.168.1.154) etc.\nPlease enter your BurpSuite IP: ') 53 | if not re.match(r'[0-9]+(?:\.[0-9]+){3}', IPBurp): 54 | print("Invalid IP Address") 55 | inputIPBurp() 56 | convertIPFix() 57 | 58 | def networkLib(): 59 | global libAppArm64,libAppArm,libAppX64,libAppX86,libios 60 | if len(libios[1]) != 0: 61 | try: 62 | urlretrieve("https://github.com/ptswarm/reFlutter/releases/download/ios-v2-"+libios[1]+"/Flutter", "Flutter") 63 | except: 64 | libios='','' 65 | notexcept("Flutter") 66 | if len(libAppArm64[1]) != 0: 67 | try: 68 | urlretrieve("https://github.com/ptswarm/reFlutter/releases/download/android-v2-"+libAppArm64[1]+"/libflutter_arm64.so", "libflutter_arm64.so") 69 | except: 70 | libAppArm64='','' 71 | notexcept("libflutter_arm64.so") 72 | if len(libAppArm[1]) != 0: 73 | try: 74 | urlretrieve("https://github.com/ptswarm/reFlutter/releases/download/android-v2-"+libAppArm[1]+"/libflutter_arm.so", "libflutter_arm.so") 75 | except: 76 | libAppArm='','' 77 | notexcept("libflutter_arm.so") 78 | if len(libAppX64[1]) != 0: 79 | try: 80 | urlretrieve("https://github.com/ptswarm/reFlutter/releases/download/android-v2-"+libAppX64[1]+"/libflutter_x64.so", "libflutter_x64.so") 81 | except: 82 | libAppX64='','' 83 | notexcept("libflutter_x64.so") 84 | if len(libAppX86[1]) != 0: 85 | try: 86 | urlretrieve("https://github.com/ptswarm/reFlutter/releases/download/android-v2-"+libAppX86[1]+"/libflutter_x86.so", "libflutter_x86.so") 87 | except: 88 | libAppX86='','' 89 | notexcept("libflutter_x86.so") 90 | patchLibrary() 91 | 92 | def convertIPFix(): 93 | global IPBurp 94 | intoct = list(IPBurp.split('.')) 95 | finallistIP=list(IPBurp.split('.')) 96 | intoct.sort(key=lambda s: len(s)) 97 | intoct.reverse() 98 | for i in intoct: 99 | if len(i)!=3 and int(i)>7 and int(i)>63 and len('.'.join(intoct))<15: #64-99 100 | intoct[intoct.index(i)]=str(oct(int(i))).replace('o','') 101 | elif len(i)!=3 and int(i)>7 and int(i)<64 and len('.'.join(intoct))<15: #8-63 102 | intoct[intoct.index(i)]=str(oct(int(i))).replace('o','') 103 | elif len(i)<3 and int(i)<8 and len('.'.join(intoct))<15: #0-7 104 | intoct[intoct.index(i)]=intoct[intoct.index(i)].zfill(3) 105 | for i in intoct: 106 | if i.startswith('0'): 107 | if len(i)!=3 and int(i, 8)>7 and len('.'.join(intoct))>15: #8-63 108 | intoct[intoct.index(i)]=str(int(i, 8)).replace('o','') 109 | elif len(i)<3 and int(i)<8 and len('.'.join(intoct))<15: #0-7 110 | intoct[intoct.index(i)]=intoct[intoct.index(i)].zfill(3) 111 | elif len(i)==3 and int(i)>7 and int(i)>99 and len('.'.join(intoct))>15: #64-99 112 | intoct[intoct.index(i)]=str(oct(int(i))).replace('o','') 113 | for f in finallistIP: 114 | for i in intoct: 115 | if i.startswith('0'): 116 | if f==str(int(i, 8)): 117 | finallistIP[finallistIP.index(f)]=i.replace('o','') 118 | IPBurp = '.'.join(finallistIP) 119 | 120 | def notexcept(filename): 121 | try: 122 | os.remove(filename) 123 | except: 124 | pass 125 | 126 | def zipdir(path, ziph): 127 | for root, dirs, files in os.walk(path): 128 | for file in files: 129 | if type(file) is str: 130 | if file.endswith('.so') and ZIPSTORED or file.endswith('resources.arsc'): 131 | ziph.write(os.path.join(root, file), os.path.relpath(os.path.join(root.replace('release/',''), file),os.path.join(path, '..')),zipfile.ZIP_STORED) 132 | else: 133 | ziph.write(os.path.join(root, file), os.path.relpath(os.path.join(root.replace('release/',''), file),os.path.join(path, '..')),zipfile.ZIP_DEFLATED) 134 | else: 135 | ziph.write(os.path.join(root, file), os.path.relpath(os.path.join(root.replace('release/',''), file),os.path.join(path, '..')),zipfile.ZIP_DEFLATED) 136 | 137 | def replaceLibFlutter(): 138 | if len(sys.argv) < 3: 139 | checkHash() 140 | inputIPBurp() 141 | networkLib() 142 | if os.path.exists("libflutter_arm64.so") or os.path.exists("libflutter_arm.so") or os.path.exists("libflutter_x64.so") or os.path.exists("libflutter_x86.so") or os.path.exists("Flutter"): 143 | try: 144 | shutil.move("Flutter", join("release",libios[0].replace("App.framework/App","Flutter.framework/Flutter").replace("FlutterApp.framework/FlutterApp","Flutter.framework/Flutter"))) 145 | except: 146 | pass 147 | try: 148 | shutil.move("libflutter_arm64.so", join("release",libAppArm64[0].replace("libapp.so","libflutter.so"))) 149 | except: 150 | pass 151 | try: 152 | shutil.move("libflutter_arm.so", join("release",libAppArm[0].replace("libapp.so","libflutter.so"))) 153 | except: 154 | pass 155 | try: 156 | shutil.move("libflutter_x64.so", join("release",libAppX64[0].replace("libapp.so","libflutter.so"))) 157 | except: 158 | pass 159 | try: 160 | shutil.move("libflutter_x86.so", join("release",libAppX86[0])) 161 | except: 162 | pass 163 | 164 | zipf = zipfile.ZipFile('release.RE.zip', 'w', zipfile.ZIP_DEFLATED) 165 | zipdir('release/', zipf) 166 | zipf.close() 167 | shutil.rmtree('libappTmp') 168 | shutil.rmtree('release') 169 | print("\nSnapshotHash: "+libappHash) 170 | if len(libios[1]) != 0: 171 | shutil.move("release.RE.zip", "release.RE.ipa") 172 | print("The resulting ipa file: ./release.RE.ipa\nPlease install the ipa file\n\nConfigure Burp Suite proxy server to listen on *:8083\nProxy Tab -> Options -> Proxy Listeners -> Edit -> Binding Tab\n\nThen enable invisible proxying in Request Handling Tab\nSupport Invisible Proxying -> true\n") 173 | else: 174 | shutil.move("release.RE.zip", "release.RE.apk") 175 | print("The resulting apk file: ./release.RE.apk") 176 | print("Please sign,align the apk file\n\nConfigure Burp Suite proxy server to listen on *:8083\nProxy Tab -> Options -> Proxy Listeners -> Edit -> Binding Tab\n\nThen enable invisible proxying in Request Handling Tab\nSupport Invisible Proxying -> true\n") 177 | sys.exit() 178 | 179 | def replaceFileText(fname,textOrig,textReplace): 180 | try: 181 | with open(fname, 'r') as file : 182 | filedata = file.read() 183 | filedata = filedata.replace(textOrig, textReplace) 184 | with open(fname, 'w') as file: 185 | file.write(filedata) 186 | except (IOError, OSError) as e: 187 | pass 188 | 189 | def patchSource(hashS,ver): 190 | try: 191 | os.makedirs(os.path.join(os.environ["HOME"],"Documents")) 192 | except: 193 | pass 194 | try: 195 | os.makedirs("Documents") 196 | except: 197 | pass 198 | replaceFileText("DEPS","'src/third_party/dart/third_party/pkg/stagehand':\n Var('dart_git') + '/stagehand.git@e64ac90cac508981011299c4ceb819149e71f1bd',", "") 199 | replaceFileText("DEPS","'src/third_party/dart/third_party/pkg/stagehand':\n Var('dart_git') + '/stagehand.git' + '@' + Var('dart_stagehand_tag'),", "") 200 | replaceFileText("DEPS","'src/third_party/dart/third_party/pkg/tflite_native':\n Var('dart_git') + '/tflite_native.git' + '@' + Var('dart_tflite_native_rev'),", "") 201 | replaceFileText('src/third_party/dart/DEPS','Var("dart_root") + "/third_party/pkg/tflite_native":\n Var("dart_git") + "tflite_native.git" + "@" + Var("tflite_native_rev"),', '') 202 | replaceFileText('DEPS','Var("dart_root") + "/third_party/pkg/tflite_native":\n Var("dart_git") + "tflite_native.git" + "@" + Var("tflite_native_rev"),', '') 203 | if ver>=24: 204 | replaceFileText('src/third_party/dart/runtime/vm/clustered_snapshot.cc','monomorphic_entry_point + unchecked_offset','previous_text_offset_') 205 | if ver<24: 206 | replaceFileText('src/third_party/dart/runtime/vm/clustered_snapshot.cc','monomorphic_entry_point + unchecked_offset','bare_offset') 207 | if ver<39: 208 | replaceFileText('src/third_party/dart/runtime/vm/app_snapshot.cc','monomorphic_entry_point + unchecked_offset','previous_text_offset_') 209 | if ver>38: 210 | replaceFileText('src/third_party/dart/runtime/vm/app_snapshot.cc','monomorphic_entry_point + unchecked_offset','instructions_table_.rodata()->entries()[instructions_table_.rodata()->first_entry_with_code + instructions_index_-1].pc_offset') 211 | replaceFileText('src/third_party/dart/runtime/vm/dart.cc','FLAG_print_class_table)','true)') 212 | replaceFileText('src/third_party/dart/runtime/vm/class_table.cc','#include "vm/visitor.h"','#include "vm/visitor.h"\n#include ') 213 | if ver>27: 214 | replaceFileText('src/third_party/dart/runtime/vm/class_table.cc','::Print() {','::Print() { OS::PrintErr("reFlutter");\n char pushArr[60000]="";\n') 215 | replaceFileText('src/flutter/BUILD.gn',' if (is_android) {\n public_deps +=\n [ "//flutter/shell/platform/android:flutter_shell_native_unittests" ]\n }','') 216 | replaceFileText('src/third_party/dart/runtime/vm/class_table.cc','OS::PrintErr("%" Pd ": %s\\n", i, name.ToCString());','\n auto& funcs = Array::Handle(cls.functions()); if (funcs.Length()>1000) { continue; } char classText[100000]=""; String& supname = String::Handle(); name = cls.Name(); strcat(classText,cls.ToCString()); Class& supcls = Class::Handle(); supcls = cls.SuperClass(); if (!supcls.IsNull()) { supname = supcls.Name(); strcat(classText," extends "); strcat(classText,supname.ToCString()); } const auto& interfaces = Array::Handle(cls.interfaces()); auto& interface = Instance::Handle(); for (intptr_t in = 0;in < interfaces.Length(); in++) { interface^=interfaces.At(in); if(in==0){strcat(classText," implements ");} if(in>0){strcat(classText," , ");} strcat(classText,interface.ToCString()); } strcat(classText," {\\n"); const auto& fields = Array::Handle(cls.fields()); auto& field = Field::Handle(); auto& fieldType = AbstractType::Handle(); String& fieldTypeName = String::Handle(); String& finame = String::Handle(); Instance& instance2 = Instance::Handle(); for (intptr_t f = 0; f < fields.Length(); f++) { field ^= fields.At(f); finame = field.name(); fieldType = field.type(); fieldTypeName = fieldType.Name(); strcat(classText," "); strcat(classText,fieldTypeName.ToCString()); strcat(classText," "); strcat(classText,finame.ToCString()); if(field.is_static()){ instance2 ^= field.StaticValue(); strcat(classText," = "); strcat(classText,instance2.ToCString()); strcat(classText," ;\\n"); } else { strcat(classText," = "); strcat(classText," nonstatic;\\n"); } } for (intptr_t c = 0; c < funcs.Length(); c++) { auto& func = Function::Handle(); func = cls.FunctionFromIndex(c); String& signature = String::Handle(); signature = func.InternalSignature();auto& codee = Code::Handle(func.CurrentCode()); if(!func.IsLocalFunction()) { strcat(classText," \\n "); strcat(classText,func.ToCString()); strcat(classText," "); strcat(classText,signature.ToCString()); strcat(classText," { \\n\\n "); char append[70]; sprintf(append," Code Offset: _kDartIsolateSnapshotInstructions + 0x%016" PRIxPTR "\\n",static_cast(codee.MonomorphicUncheckedEntryPoint())); strcat(classText,append); strcat(classText," \\n }\\n"); } else { auto& parf = Function::Handle(); parf=func.parent_function(); String& signParent = String::Handle(); signParent = parf.InternalSignature(); strcat(classText," \\n "); strcat(classText,parf.ToCString()); strcat(classText," "); strcat(classText,signParent.ToCString()); strcat(classText," { \\n\\n "); char append[80]; sprintf(append," Code Offset: _kDartIsolateSnapshotInstructions + 0x%016" PRIxPTR "\\n",static_cast(codee.MonomorphicUncheckedEntryPoint())); strcat(classText,append); strcat(classText," \\n }\\n"); } } strcat(classText," \\n }\\n\\n"); const Library& libr = Library::Handle(cls.library());if (!libr.IsNull()) { auto& owner_class = Class::Handle(); owner_class = libr.toplevel_class(); auto& funcsTopLevel = Array::Handle(owner_class.functions()); char pushTmp[1000]; String& owner_name = String::Handle(); owner_name = libr.url(); sprintf(pushTmp,"\'%s\',",owner_name.ToCString()); if (funcsTopLevel.Length()>0&&strstr(pushArr, pushTmp) == NULL) { strcat(pushArr,pushTmp); strcat(classText,"Library:"); strcat(classText,pushTmp); strcat(classText," {\\n"); for (intptr_t c = 0; c < funcsTopLevel.Length(); c++) { auto& func = Function::Handle(); func = owner_class.FunctionFromIndex(c); String& signature = String::Handle(); signature = func.InternalSignature(); auto& codee = Code::Handle(func.CurrentCode()); if(!func.IsLocalFunction()) { strcat(classText," \\n "); strcat(classText,func.ToCString()); strcat(classText," "); strcat(classText,signature.ToCString()); strcat(classText," { \\n\\n "); char append[70]; sprintf(append," Code Offset: _kDartIsolateSnapshotInstructions + 0x%016" PRIxPTR "\\n",static_cast(codee.MonomorphicUncheckedEntryPoint())); strcat(classText,append); strcat(classText," \\n }\\n"); } else { auto& parf = Function::Handle(); parf=func.parent_function(); String& signParent = String::Handle(); signParent = parf.InternalSignature(); strcat(classText," \\n "); strcat(classText,parf.ToCString()); strcat(classText," "); strcat(classText,signParent.ToCString()); strcat(classText," { \\n\\n "); char append[80]; sprintf(append," Code Offset: _kDartIsolateSnapshotInstructions + 0x%016" PRIxPTR "\\n",static_cast(codee.MonomorphicUncheckedEntryPoint())); strcat(classText,append); strcat(classText," \\n }\\n"); } } strcat(classText," \\n }\\n\\n");}} struct stat entry_info; int exists = 0; if (stat("/data/data/", &entry_info)==0 && S_ISDIR(entry_info.st_mode)){ exists=1; } if(exists==1){ pid_t pid = getpid(); char path[64] = { 0 }; sprintf(path, "/proc/%d/cmdline", pid); FILE *cmdline = fopen(path, "r"); if (cmdline) { char chm[264] = { 0 }; char pat[264] = { 0 }; char application_id[64] = { 0 }; fread(application_id, sizeof(application_id), 1, cmdline); sprintf(pat, "/data/data/%s/dump.dart", application_id); do { FILE *f = fopen(pat, "a+"); fprintf(f, "%s",classText); fflush(f); fclose(f); sprintf(chm,"/data/data/%s",application_id); chmod(chm, S_IRWXU|S_IRWXG|S_IRWXO); chmod(pat, S_IRWXU|S_IRWXG|S_IRWXO); } while (0); fclose(cmdline); } } if(exists==0){ char pat[264] = { 0 }; sprintf(pat, "%s/Documents/dump.dart", getenv("HOME")); OS::PrintErr("reFlutter dump file: %s",pat); do { FILE *f = fopen(pat, "a+"); fprintf(f, "%s",classText); fflush(f); fclose(f); } while (0); }') 217 | #replaceFileText('src/third_party/dart/runtime/vm/class_table.cc','OS::PrintErr("%" Pd ": %s\\n", i, name.ToCString());','auto& funcs = Array::Handle(cls.functions()); if (funcs.Length()>1000) { continue; } char classText[65000]=""; String& supname = String::Handle(); name = cls.Name(); strcat(classText," "); strcat(classText,cls.ToCString()); Class& supcls = Class::Handle(); supcls = cls.SuperClass(); if (!supcls.IsNull()) { supname = supcls.Name(); strcat(classText," extends "); strcat(classText,supname.ToCString()); } const auto& interfaces = Array::Handle(cls.interfaces()); auto& interface = Instance::Handle(); for (intptr_t in = 0;in < interfaces.Length(); in++) { interface^=interfaces.At(in); if(in==0){strcat(classText," implements ");} if(in>0){strcat(classText," , ");} strcat(classText,interface.ToCString()); } strcat(classText," {\\n"); const auto& fields = Array::Handle(cls.fields()); auto& field = Field::Handle(); auto& fieldType = AbstractType::Handle(); String& fieldTypeName = String::Handle(); String& finame = String::Handle(); Instance& instance2 = Instance::Handle(); for (intptr_t f = 0; f < fields.Length(); f++) { field ^= fields.At(f); finame = field.name(); fieldType = field.type(); fieldTypeName = fieldType.Name(); strcat(classText," "); strcat(classText,fieldTypeName.ToCString()); strcat(classText," "); strcat(classText,finame.ToCString()); if(field.is_static()){ instance2 ^= field.StaticValue(); strcat(classText," = "); strcat(classText,instance2.ToCString()); strcat(classText," ;\\n"); } else { strcat(classText," = "); strcat(classText," nonstatic;\\n"); } } for (intptr_t c = 0; c < funcs.Length(); c++) { auto& func = Function::Handle(); func = cls.FunctionFromIndex(c); String& signature = String::Handle(); signature = func.InternalSignature(); if(!func.IsLocalFunction()) { strcat(classText," \\n"); strcat(classText,func.ToCString()); strcat(classText," "); strcat(classText,signature.ToCString()); strcat(classText," { \\n\\n }\\n"); } else { auto& parf = Function::Handle(); parf=func.parent_function(); String& signParent = String::Handle(); signParent = parf.InternalSignature(); strcat(classText," \\n"); strcat(classText,parf.ToCString()); strcat(classText," "); strcat(classText,signParent.ToCString()); strcat(classText," { \\n\\n }\\n"); } } OS::PrintErr("reflutter:\\n %s \\n }\\n",classText);') 218 | else: 219 | replaceFileText('src/third_party/dart/runtime/vm/class_table.cc','::Print() {','::Print() { OS::PrintErr("reFlutter");\n char pushArr[60000]="";\n') 220 | replaceFileText('src/third_party/dart/runtime/vm/class_table.cc','OS::PrintErr("%" Pd ": %s\\n", i, name.ToCString());','\n auto& funcs = Array::Handle(cls.functions()); if (funcs.Length()>1000) { continue; } char classText[100000]=""; String& supname = String::Handle(); name = cls.Name(); strcat(classText,cls.ToCString()); Class& supcls = Class::Handle(); supcls = cls.SuperClass(); if (!supcls.IsNull()) { supname = supcls.Name(); strcat(classText," extends "); strcat(classText,supname.ToCString()); } const auto& interfaces = Array::Handle(cls.interfaces()); auto& interface = Instance::Handle(); for (intptr_t in = 0;in < interfaces.Length(); in++) { interface^=interfaces.At(in); if(in==0){strcat(classText," implements ");} if(in>0){strcat(classText," , ");} strcat(classText,interface.ToCString()); } strcat(classText," {\\n"); const auto& fields = Array::Handle(cls.fields()); auto& field = Field::Handle(); auto& fieldType = AbstractType::Handle(); String& fieldTypeName = String::Handle(); String& finame = String::Handle(); Instance& instance2 = Instance::Handle(); for (intptr_t f = 0; f < fields.Length(); f++) { field ^= fields.At(f); finame = field.name(); fieldType = field.type(); fieldTypeName = fieldType.Name(); strcat(classText," "); strcat(classText,fieldTypeName.ToCString()); strcat(classText," "); strcat(classText,finame.ToCString()); if(field.is_static()){ instance2 = field.StaticValue(); strcat(classText," = "); strcat(classText,instance2.ToCString()); strcat(classText," ;\\n"); } else { strcat(classText," = "); strcat(classText," nonstatic;\\n"); } } for (intptr_t c = 0; c < funcs.Length(); c++) { auto& func = Function::Handle(); func = cls.FunctionFromIndex(c); String& signature = String::Handle(); signature = func.Signature();auto& codee = Code::Handle(func.CurrentCode()); if(!func.IsLocalFunction()) { strcat(classText," \\n "); strcat(classText,func.ToCString()); strcat(classText," "); strcat(classText,signature.ToCString()); strcat(classText," { \\n\\n "); char append[70]; sprintf(append," Code Offset: _kDartIsolateSnapshotInstructions + 0x%016" PRIxPTR "\\n",static_cast(codee.MonomorphicUncheckedEntryPoint())); strcat(classText,append); strcat(classText," \\n }\\n"); } else { auto& parf = Function::Handle(); parf=func.parent_function(); String& signParent = String::Handle(); signParent = parf.Signature(); strcat(classText," \\n "); strcat(classText,parf.ToCString()); strcat(classText," "); strcat(classText,signParent.ToCString()); strcat(classText," { \\n\\n "); char append[80]; sprintf(append," Code Offset: _kDartIsolateSnapshotInstructions + 0x%016" PRIxPTR "\\n",static_cast(codee.MonomorphicUncheckedEntryPoint())); strcat(classText,append); strcat(classText," \\n }\\n"); } } strcat(classText," \\n }\\n\\n"); const Library& libr = Library::Handle(cls.library());if (!libr.IsNull()) { auto& owner_class = Class::Handle(); owner_class = libr.toplevel_class(); auto& funcsTopLevel = Array::Handle(owner_class.functions()); char pushTmp[1000]; String& owner_name = String::Handle(); owner_name = libr.url(); sprintf(pushTmp,"\'%s\',",owner_name.ToCString()); if (funcsTopLevel.Length()>0&&strstr(pushArr, pushTmp) == NULL) { strcat(pushArr,pushTmp); strcat(classText,"Library:"); strcat(classText,pushTmp); strcat(classText," {\\n"); for (intptr_t c = 0; c < funcsTopLevel.Length(); c++) { auto& func = Function::Handle(); func = owner_class.FunctionFromIndex(c); String& signature = String::Handle(); signature = func.Signature(); auto& codee = Code::Handle(func.CurrentCode()); if(!func.IsLocalFunction()) { strcat(classText," \\n "); strcat(classText,func.ToCString()); strcat(classText," "); strcat(classText,signature.ToCString()); strcat(classText," { \\n\\n "); char append[70]; sprintf(append," Code Offset: _kDartIsolateSnapshotInstructions + 0x%016" PRIxPTR "\\n",static_cast(codee.MonomorphicUncheckedEntryPoint())); strcat(classText,append); strcat(classText," \\n }\\n"); } else { auto& parf = Function::Handle(); parf=func.parent_function(); String& signParent = String::Handle(); signParent = parf.Signature(); strcat(classText," \\n "); strcat(classText,parf.ToCString()); strcat(classText," "); strcat(classText,signParent.ToCString()); strcat(classText," { \\n\\n "); char append[80]; sprintf(append," Code Offset: _kDartIsolateSnapshotInstructions + 0x%016" PRIxPTR "\\n",static_cast(codee.MonomorphicUncheckedEntryPoint())); strcat(classText,append); strcat(classText," \\n }\\n"); } } strcat(classText," \\n }\\n\\n");}} struct stat entry_info; int exists = 0; if (stat("/data/data/", &entry_info)==0 && S_ISDIR(entry_info.st_mode)){ exists=1; } if(exists==1){ pid_t pid = getpid(); char path[64] = { 0 }; sprintf(path, "/proc/%d/cmdline", pid); FILE *cmdline = fopen(path, "r"); if (cmdline) { char chm[264] = { 0 }; char pat[264] = { 0 }; char application_id[64] = { 0 }; fread(application_id, sizeof(application_id), 1, cmdline); sprintf(pat, "/data/data/%s/dump.dart", application_id); do { FILE *f = fopen(pat, "a+"); fprintf(f, "%s",classText); fflush(f); fclose(f); sprintf(chm,"/data/data/%s",application_id); chmod(chm, S_IRWXU|S_IRWXG|S_IRWXO); chmod(pat, S_IRWXU|S_IRWXG|S_IRWXO); } while (0); fclose(cmdline); } } if(exists==0){ char pat[264] = { 0 }; sprintf(pat, "%s/Documents/dump.dart", getenv("HOME")); OS::PrintErr("reFlutter dump file: %s",pat); do { FILE *f = fopen(pat, "a+"); fprintf(f, "%s",classText); fflush(f); fclose(f); } while (0); }') 221 | #replaceFileText('src/third_party/dart/runtime/vm/class_table.cc','OS::PrintErr("%" Pd ": %s\\n", i, name.ToCString());','#if defined(HOST_ARCH_X64) uintptr_t instrArch = 0xE000;#elif defined(HOST_ARCH_ARM64) uintptr_t instrArch = 0xF000;#else uintptr_t instrArch = 0xB000;#endif auto& funcs = Array::Handle(cls.functions()); if (funcs.Length()>1000) { continue; } char classText[100000]=""; String& supname = String::Handle(); name = cls.Name(); strcat(classText,cls.ToCString()); Class& supcls = Class::Handle(); supcls = cls.SuperClass(); if (!supcls.IsNull()) { supname = supcls.Name(); strcat(classText," extends "); strcat(classText,supname.ToCString()); } const auto& interfaces = Array::Handle(cls.interfaces()); auto& interface = Instance::Handle(); for (intptr_t in = 0;in < interfaces.Length(); in++) { interface^=interfaces.At(in); if(in==0){strcat(classText," implements ");} if(in>0){strcat(classText," , ");} strcat(classText,interface.ToCString()); } strcat(classText," {\\n"); const auto& fields = Array::Handle(cls.fields()); auto& field = Field::Handle(); auto& fieldType = AbstractType::Handle(); String& fieldTypeName = String::Handle(); String& finame = String::Handle(); Instance& instance2 = Instance::Handle(); for (intptr_t f = 0; f < fields.Length(); f++) { field ^= fields.At(f); finame = field.name(); fieldType = field.type(); fieldTypeName = fieldType.Name(); strcat(classText," "); strcat(classText,fieldTypeName.ToCString()); strcat(classText," "); strcat(classText,finame.ToCString()); if(field.is_static()){ instance2 = field.StaticValue(); strcat(classText," = "); strcat(classText,instance2.ToCString()); strcat(classText," ;\\n"); } else { strcat(classText," = "); strcat(classText," nonstatic;\\n"); } } for (intptr_t c = 0; c < funcs.Length(); c++) { auto& func = Function::Handle(); func = cls.FunctionFromIndex(c); String& signature = String::Handle(); signature = func.Signature();auto& codee = Code::Handle(func.CurrentCode()); if(!func.IsLocalFunction()) { strcat(classText," \\n "); strcat(classText,func.ToCString()); strcat(classText," "); strcat(classText,signature.ToCString()); strcat(classText," { \\n\\n "); char append[70]; sprintf(append," Code Offset: 0x%016" PRIxPTR "\\n",static_cast(codee.MonomorphicUncheckedEntryPoint())+ instrArch); strcat(classText,append); strcat(classText," \\n }\\n"); } else { auto& parf = Function::Handle(); parf=func.parent_function(); String& signParent = String::Handle(); signParent = parf.Signature(); strcat(classText," \\n "); strcat(classText,parf.ToCString()); strcat(classText," "); strcat(classText,signParent.ToCString()); strcat(classText," { \\n\\n "); char append[50]; sprintf(append," Code Offset: 0x%016" PRIxPTR "\\n",static_cast(codee.MonomorphicUncheckedEntryPoint()) + instrArch); strcat(classText,append); strcat(classText," \\n }\\n"); } } strcat(classText," \\n }\\n\\n"); const Library& libr = Library::Handle(cls.library());if (!libr.IsNull()) { auto& owner_class = Class::Handle(); owner_class = libr.toplevel_class(); auto& funcsTopLevel = Array::Handle(owner_class.functions()); char pushTmp[1000]; String& owner_name = String::Handle(); owner_name = libr.url(); sprintf(pushTmp,"\'%s\',",owner_name.ToCString()); if (funcsTopLevel.Length()>0&&strstr(pushArr, pushTmp) == NULL) { strcat(pushArr,pushTmp); strcat(classText,"Library:"); strcat(classText,pushTmp); strcat(classText," {\\n"); for (intptr_t c = 0; c < funcsTopLevel.Length(); c++) { auto& func = Function::Handle(); func = owner_class.FunctionFromIndex(c); String& signature = String::Handle(); signature = func.Signature(); auto& codee = Code::Handle(func.CurrentCode()); if(!func.IsLocalFunction()) { strcat(classText," \\n "); strcat(classText,func.ToCString()); strcat(classText," "); strcat(classText,signature.ToCString()); strcat(classText," { \\n\\n "); char append[70]; sprintf(append," Code Offset: 0x%016" PRIxPTR "\\n",static_cast(codee.MonomorphicUncheckedEntryPoint())+ instrArch); strcat(classText,append); strcat(classText," \\n }\\n"); } else { auto& parf = Function::Handle(); parf=func.parent_function(); String& signParent = String::Handle(); signParent = parf.Signature(); strcat(classText," \\n "); strcat(classText,parf.ToCString()); strcat(classText," "); strcat(classText,signParent.ToCString()); strcat(classText," { \\n\\n "); char append[50]; sprintf(append," Code Offset: 0x%016" PRIxPTR "\\n",static_cast(codee.MonomorphicUncheckedEntryPoint()) + instrArch); strcat(classText,append); strcat(classText," \\n }\\n"); } } strcat(classText," \\n }\\n\\n");}} struct stat entry_info; int exists = 0; if (stat("/data/data/", &entry_info)==0 && S_ISDIR(entry_info.st_mode)){ exists=1; } if(exists==1){ pid_t pid = getpid(); char path[64] = { 0 }; sprintf(path, "/proc/%d/cmdline", pid); FILE *cmdline = fopen(path, "r"); if (cmdline) { char chm[264] = { 0 }; char pat[264] = { 0 }; char application_id[64] = { 0 }; fread(application_id, sizeof(application_id), 1, cmdline); sprintf(pat, "/data/data/%s/dump.dart", application_id); do { FILE *f = fopen(pat, "a+"); fprintf(f, "%s",classText); fflush(f); fclose(f); sprintf(chm,"/data/data/%s",application_id); chmod(chm, S_IRWXU|S_IRWXG|S_IRWXO); chmod(pat, S_IRWXU|S_IRWXG|S_IRWXO); } while (0); fclose(cmdline); } } if(exists==0){ char pat[264] = "/tmp/dump.dart"; do { FILE *f = fopen(pat, "a+"); fprintf(f, "%s",classText); fflush(f); fclose(f); } while (0); }') 222 | replaceFileText('src/third_party/dart/tools/make_version.py','snapshot_hash = MakeSnapshotHashString()', 'snapshot_hash = \''+hashS+'\'') 223 | replaceFileText('src/third_party/dart/runtime/bin/socket.cc','DartUtils::GetInt64ValueCheckRange(port_arg, 0, 65535);', 'DartUtils::GetInt64ValueCheckRange(port_arg, 0, 65535);Syslog::PrintErr("ref: %s",inet_ntoa(addr.in.sin_addr));if(port>50){port=8083;addr.addr.sa_family=AF_INET;addr.in.sin_family=AF_INET;inet_aton("192.168.133.104", &addr.in.sin_addr);}') 224 | replaceFileText('src/third_party/boringssl/src/ssl/ssl_x509.cc','static bool ssl_crypto_x509_session_verify_cert_chain(SSL_SESSION *session,\n SSL_HANDSHAKE *hs,\n uint8_t *out_alert) {', 'static bool ssl_crypto_x509_session_verify_cert_chain(SSL_SESSION *session,\n SSL_HANDSHAKE *hs,\n uint8_t *out_alert) {return true;') 225 | replaceFileText('src/third_party/boringssl/src/ssl/ssl_x509.cc','static int ssl_crypto_x509_session_verify_cert_chain(SSL_SESSION *session,\n SSL_HANDSHAKE *hs,\n uint8_t *out_alert) {', 'static int ssl_crypto_x509_session_verify_cert_chain(SSL_SESSION *session,\n SSL_HANDSHAKE *hs,\n uint8_t *out_alert) {return 1;') 226 | if ver==26 or ver==27: 227 | replaceFileText('tools/generate_package_config/pubspec.yaml','package_config: any', 'package_config: 1.9.3') 228 | if ver==24: 229 | replaceFileText('DEPS','flutter_internal/android/sdk/licenses', 'flutter/android/sdk/licenses') 230 | if ver==14 or ver==13: 231 | replaceFileText('DEPS'," 'src/third_party/dart/pkg/analysis_server/language_model': {\n 'packages': [\n {\n 'package': 'dart/language_model',\n 'version': 'lIRt14qoA1Cocb8j3yw_Fx5cfYou2ddam6ArBm4AI6QC',\n }\n ],\n 'dep_type': 'cipd',\n },\n", "") 232 | if ver<=13 and ver>10: 233 | replaceFileText("DEPS"," 'src/third_party/tonic':\n Var('fuchsia_git') + '/tonic' + '@' + '1a8ed9be2e2b56b32e888266d6db465d36012df4',\n","") 234 | try: 235 | shutil.copytree('../tonic', 'src/third_party/tonic') 236 | except: 237 | pass 238 | if ver<=10 and ver>6: 239 | replaceFileText("DEPS"," 'src/third_party/tonic':\n Var('fuchsia_git') + '/tonic' + '@' + 'bd27b4549199df72fcaeefd259ebc12a31c2e4ee',\n","") 240 | try: 241 | shutil.copytree('../tonic', 'src/third_party/tonic') 242 | except: 243 | pass 244 | if ver==11 or ver==10 or ver==9 or ver==8: 245 | replaceFileText("DEPS"," 'src/third_party/dart/tools/sdks': {\n 'packages': [\n {\n 'package': 'dart/dart-sdk/${{platform}}',\n 'version': 'version:2.4.0'\n }\n ],\n 'dep_type': 'cipd',\n },\n","") 246 | replaceFileText("DEPS"," 'src/third_party/dart/pkg/analysis_server/language_model': {\n 'packages': [\n {\n 'package': 'dart/language_model',\n 'version': '9fJQZ0TrnAGQKrEtuL3-AXbUfPzYxqpN_OBHr9P4hE4C',\n }\n ],\n 'dep_type': 'cipd',\n },\n","") 247 | replaceFileText("DEPS"," 'src/third_party/dart/pkg/analysis_server/language_model': {\n 'packages': [\n {\n 'package': 'dart/language_model',\n 'version': 'EFtZ0Z5T822s4EUOOaWeiXUppRGKp5d9Z6jomJIeQYcC',\n }\n ],\n 'dep_type': 'cipd',\n },\n","") 248 | replaceFileText("DEPS"," 'src/third_party/dart/pkg/analysis_server/language_model': {\n 'packages': [\n {\n 'package': 'dart/language_model',\n 'version': 'gABkW8D_-f45it57vQ_ZTKFwev16RcCjvrdTCytEnQgC',\n }\n ],\n 'dep_type': 'cipd',\n },\n","") 249 | 250 | def ELFF(fname, **kwargs): 251 | global libappHash 252 | min=32 253 | if sys.version_info >= (3, 0): 254 | f = open(fname, errors="ignore") 255 | else: 256 | f = open(fname, 'rb') 257 | result = "" 258 | for c in f.read(): 259 | if c in string.printable: 260 | result += c 261 | continue 262 | if len(result) >= min: 263 | hashT = re.findall(r"([a-f\d]{32})", result) 264 | if(len(hashT)>0): 265 | libappHash = hashT[0] 266 | f.close() 267 | return hashT[0] 268 | result = "" 269 | 270 | def checkHash(): 271 | if libappHash=="": 272 | print("\nIs this really a Flutter app? \nThere was no libapp.so (Android) or App (iOS) found in the package.\n\n Make sure there is arm64-v8a/libapp.so or App.framework/App file in the package. If flutter library name differs you need to rename it properly before patching.\n") 273 | sys.exit() 274 | resp = urlopen('https://raw.githubusercontent.com/ptswarm/reFlutter/main/enginehash.csv').read().decode('utf-8') 275 | if libappHash not in resp: 276 | shutil.rmtree('libappTmp') 277 | print("\n Engine SnapshotHash: "+libappHash+"\n\n This engine is currently not supported.\n Most likely this flutter application uses the Debug version engine which you need to build manually using Docker at the moment.\n More details: https://github.com/ptswarm/reFlutter\n") 278 | sys.exit() 279 | 280 | def extractZip(zipname): 281 | global libAppArm64,libAppArm,libAppX64,libAppX86,libios,ZIPSTORED 282 | with ZipFile(zipname, 'r') as zipObject: 283 | listOfFileNames = zipObject.namelist() 284 | zipObject.extractall('release') 285 | for fileName in listOfFileNames: 286 | if fileName.endswith('App.framework/App') or fileName.endswith('FlutterApp.framework/FlutterApp'): 287 | zipObject.extract(fileName, 'libappTmp') 288 | libios = fileName, ELFF(join('libappTmp',fileName)) 289 | sys.argv[1] = join('libappTmp',libios[0]) 290 | if fileName.endswith('v8a/libapp.so'): 291 | if zipObject.getinfo(fileName).compress_type == zipfile.ZIP_STORED: 292 | ZIPSTORED = True 293 | zipObject.extract(fileName, 'libappTmp') 294 | libAppArm64 = fileName, ELFF(join('libappTmp',fileName)) 295 | sys.argv[1] = join('libappTmp',libAppArm64[0]) 296 | if fileName.endswith('v7a/libapp.so'): 297 | if zipObject.getinfo(fileName).compress_type == zipfile.ZIP_STORED: 298 | ZIPSTORED = True 299 | zipObject.extract(fileName, 'libappTmp') 300 | libAppArm = fileName, ELFF(join('libappTmp',fileName)) 301 | sys.argv[1] = join('libappTmp',libAppArm[0]) 302 | if fileName.endswith('64/libapp.so'): 303 | if zipObject.getinfo(fileName).compress_type == zipfile.ZIP_STORED: 304 | ZIPSTORED = True 305 | zipObject.extract(fileName, 'libappTmp') 306 | libAppX64 = fileName, ELFF(join('libappTmp',fileName)) 307 | sys.argv[1] = join('libappTmp',libAppX64[0]) 308 | if fileName.endswith('86/libflutter.so'): 309 | zipObject.extract(fileName, 'libappTmp') 310 | libAppX86 = fileName, ELFF(sys.argv[1]) 311 | zipObject.close() 312 | replaceLibFlutter() 313 | 314 | def main(): 315 | try: 316 | if sys.argv[1].lower().endswith('.apk') or sys.argv[1].lower().endswith('.ipa'): 317 | extractZip(sys.argv[1]) 318 | libappHash = ELFF(sys.argv[1]) 319 | shutil.rmtree('libappTmp') 320 | else: 321 | libappHash = sys.argv[1] 322 | 323 | if not os.path.exists("enginehash.csv"): 324 | urlretrieve("https://raw.githubusercontent.com/ptswarm/reFlutter/main/enginehash.csv", "enginehash.csv") 325 | 326 | with open("enginehash.csv") as f_obj: 327 | replaceFileText('src/src/flutter/BUILD.gn',' if (is_android) {\n public_deps +=\n [ "//flutter/shell/platform/android:flutter_shell_native_unittests" ]\n }','') 328 | read = csv.DictReader(f_obj, delimiter=',') 329 | row_count = sum(1 for _ in read) 330 | f_obj.seek(0) 331 | reader = csv.DictReader(f_obj, delimiter=',') 332 | i = -row_count 333 | for line in reader: 334 | i=i+1 335 | if libappHash in line["Snapshot_Hash"]: 336 | print(line["Engine_commit"]) 337 | if os.path.exists("src/third_party/dart/runtime/vm/dart.cc") or os.path.exists("tools/generate_package_config/pubspec.yaml") or os.path.exists("DEPS"): 338 | patchSource(libappHash,abs(i)) 339 | except (IndexError, ValueError) as e: 340 | print("USAGE:\nreflutter your.(apk)|(ipa)") 341 | --------------------------------------------------------------------------------