mirror of
https://github.com/XploitWizer-Community/XploitSPY.git
synced 2024-11-14 22:39:21 +08:00
313 lines
7.6 KiB
Smali
313 lines
7.6 KiB
Smali
.class public final Lb/a/c/l;
|
|
.super Ljava/lang/Object;
|
|
.source ""
|
|
|
|
|
|
# instance fields
|
|
.field public final a:Lb/B;
|
|
|
|
.field public final b:I
|
|
|
|
.field public final c:Ljava/lang/String;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lb/B;ILjava/lang/String;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p1, p0, Lb/a/c/l;->a:Lb/B;
|
|
|
|
iput p2, p0, Lb/a/c/l;->b:I
|
|
|
|
iput-object p3, p0, Lb/a/c/l;->c:Ljava/lang/String;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a(Ljava/lang/String;)Lb/a/c/l;
|
|
.locals 8
|
|
|
|
const-string v0, "HTTP/1."
|
|
|
|
invoke-virtual {p0, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
|
|
|
|
move-result v0
|
|
|
|
const/16 v1, 0x20
|
|
|
|
const/4 v2, 0x4
|
|
|
|
const/16 v3, 0x9
|
|
|
|
const-string v4, "Unexpected status line: "
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
invoke-virtual {p0}, Ljava/lang/String;->length()I
|
|
|
|
move-result v0
|
|
|
|
if-lt v0, v3, :cond_2
|
|
|
|
const/16 v0, 0x8
|
|
|
|
invoke-virtual {p0, v0}, Ljava/lang/String;->charAt(I)C
|
|
|
|
move-result v0
|
|
|
|
if-ne v0, v1, :cond_2
|
|
|
|
const/4 v0, 0x7
|
|
|
|
invoke-virtual {p0, v0}, Ljava/lang/String;->charAt(I)C
|
|
|
|
move-result v0
|
|
|
|
add-int/lit8 v0, v0, -0x30
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
sget-object v0, Lb/B;->a:Lb/B;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v5, 0x1
|
|
|
|
if-ne v0, v5, :cond_1
|
|
|
|
sget-object v0, Lb/B;->b:Lb/B;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
new-instance v0, Ljava/net/ProtocolException;
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {v0, p0}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_2
|
|
new-instance v0, Ljava/net/ProtocolException;
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {v0, p0}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_3
|
|
const-string v0, "ICY "
|
|
|
|
invoke-virtual {p0, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_7
|
|
|
|
sget-object v0, Lb/B;->a:Lb/B;
|
|
|
|
const/4 v3, 0x4
|
|
|
|
:goto_0
|
|
invoke-virtual {p0}, Ljava/lang/String;->length()I
|
|
|
|
move-result v5
|
|
|
|
add-int/lit8 v6, v3, 0x3
|
|
|
|
if-lt v5, v6, :cond_6
|
|
|
|
:try_start_0
|
|
invoke-virtual {p0, v3, v6}, Ljava/lang/String;->substring(II)Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-static {v5}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
|
|
|
|
move-result v5
|
|
:try_end_0
|
|
.catch Ljava/lang/NumberFormatException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/String;->length()I
|
|
|
|
move-result v7
|
|
|
|
if-le v7, v6, :cond_5
|
|
|
|
invoke-virtual {p0, v6}, Ljava/lang/String;->charAt(I)C
|
|
|
|
move-result v6
|
|
|
|
if-ne v6, v1, :cond_4
|
|
|
|
add-int/2addr v3, v2
|
|
|
|
invoke-virtual {p0, v3}, Ljava/lang/String;->substring(I)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_4
|
|
new-instance v0, Ljava/net/ProtocolException;
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {v0, p0}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_5
|
|
const-string p0, ""
|
|
|
|
:goto_1
|
|
new-instance v1, Lb/a/c/l;
|
|
|
|
invoke-direct {v1, v0, v5, p0}, Lb/a/c/l;-><init>(Lb/B;ILjava/lang/String;)V
|
|
|
|
return-object v1
|
|
|
|
:catch_0
|
|
new-instance v0, Ljava/net/ProtocolException;
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {v0, p0}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_6
|
|
new-instance v0, Ljava/net/ProtocolException;
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {v0, p0}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_7
|
|
new-instance v0, Ljava/net/ProtocolException;
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {v0, p0}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public toString()Ljava/lang/String;
|
|
.locals 3
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
iget-object v1, p0, Lb/a/c/l;->a:Lb/B;
|
|
|
|
sget-object v2, Lb/B;->a:Lb/B;
|
|
|
|
if-ne v1, v2, :cond_0
|
|
|
|
const-string v1, "HTTP/1.0"
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-string v1, "HTTP/1.1"
|
|
|
|
:goto_0
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const/16 v1, 0x20
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
iget v2, p0, Lb/a/c/l;->b:I
|
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v2, p0, Lb/a/c/l;->c:Ljava/lang/String;
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v1, p0, Lb/a/c/l;->c:Ljava/lang/String;
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
:cond_1
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|