Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathHTTPExploitExe.cs
More file actions
Latest commit
189 lines (172 loc) · 6.86 KB
/
Copy pathHTTPExploitExe.cs
File metadata and controls
189 lines (172 loc) · 6.86 KB
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
usingSystem;
usingSystem.Collections.Generic;
usingMicrosoft.Xna.Framework;
usingMicrosoft.Xna.Framework.Graphics;
namespaceHacknet
{
// Token: 0x02000123 RID: 291
internalclassHTTPExploitExe:ExeModule
{
// Token: 0x060006DD RID: 1757 RVA: 0x000715E8 File Offset: 0x0006F7E8
publicHTTPExploitExe(Rectanglelocation,OSoperatingSystem):base(location,operatingSystem)
{
this.needsProxyAccess=true;
this.ramCost=208;
this.IdentifierName="Apache Web Server Worm";
}
// Token: 0x060006DE RID: 1758 RVA: 0x0007165C File Offset: 0x0006F85C
publicoverridevoidLoadContent()
{
base.LoadContent();
this.graphPoints=newList<Vector2>();
this.backGraphPoints=newList<Vector2>();
floatnum=6f;
this.heightRange=(float)((this.bounds.Height-4-17)/3)*2f;
intnum2=(int)((float)(this.bounds.Width-4)/num);
Vector2vector=newVector2(2f,(float)(this.bounds.Height-4-17));
this.graphPoints.Add(newVector2(vector.X,vector.Y));
this.backGraphPoints.Add(newVector2(vector.X,vector.Y));
for(inti=1;i<num2-1;i++)
{
this.graphPoints.Add(newVector2(vector.X,vector.Y-(float)((Utils.random.NextDouble()*0.2+0.3)*(double)this.heightRange)));
this.backGraphPoints.Add(newVector2(vector.X,vector.Y-(float)(Utils.random.NextDouble()*(double)this.heightRange)));
vector.X+=num;
}
this.graphPoints.Add(newVector2(vector.X,vector.Y));
this.backGraphPoints.Add(newVector2(vector.X,vector.Y));
Computercomputer=Programs.getComputer(this.os,this.targetIP);
if(computer!=null)
{
computer.hostileActionTaken();
}
}
// Token: 0x060006DF RID: 1759 RVA: 0x00071824 File Offset: 0x0006FA24
publicoverridevoidUpdate(floatt)
{
base.Update(t);
Rectanglerectangle=newRectangle(this.bounds.X+1,this.bounds.Y+Module.PANEL_HEIGHT+1,this.bounds.Width-2,this.bounds.Height-Module.PANEL_HEIGHT-2);
this.heightRange=(float)((rectangle.Height-4-17)/3)*2f;
floaty=Math.Max(1f,(float)rectangle.Height-4f-17f);
this.graphPoints[0]=newVector2(this.graphPoints[0].X,y);
this.backGraphPoints[0]=newVector2(this.backGraphPoints[0].X,y);
this.graphPoints[this.graphPoints.Count-1]=newVector2(this.graphPoints[this.graphPoints.Count-1].X,y);
this.backGraphPoints[this.backGraphPoints.Count-1]=newVector2(this.backGraphPoints[this.backGraphPoints.Count-1].X,y);
this.progress+=t/HTTPExploitExe.DURATION;
if(this.progress>=1f)
{
this.progress=1f;
if(!this.hasCompleted)
{
this.Completed();
this.hasCompleted=true;
}
this.sucsessTimer-=t;
if(this.sucsessTimer<=0f)
{
this.isExiting=true;
}
}
else
{
this.tAccum+=t*1.5f;
this.fastTimeAccum+=t*4f;
}
for(inti=1;i<this.graphPoints.Count-1;i++)
{
Vector2value=this.graphPoints[i];
floatnum=Math.Abs(value.Y-this.heightRange/2f);
num/=this.heightRange/2f;
num*=num;
floatnum2=30f-num;
num*=(1f-this.progress)*num2+this.progress*30f;
value.Y+=(float)(Math.Sin((double)(this.fastTimeAccum+(float)(i*rectangle.Width)))*(double)HTTPExploitExe.GRAPH_MOVEMENT*(double)num*(double)t);
value.Y=Math.Min(value.Y,(float)rectangle.Height);
value.Y=Math.Max(value.Y,0f);
this.graphPoints[i]=value;
value=this.backGraphPoints[i];
num=this.heightRange/2f-Math.Abs(value.Y-this.heightRange/2f);
value.Y+=(float)(Math.Sin((double)(this.tAccum+(float)(i*rectangle.Width)))*(double)HTTPExploitExe.GRAPH_MOVEMENT*(double)num*(double)t);
this.backGraphPoints[i]=value;
}
}
// Token: 0x060006E0 RID: 1760 RVA: 0x00071BA0 File Offset: 0x0006FDA0
publicoverridevoidDraw(floatt)
{
base.Draw(t);
this.drawOutline();
this.drawTarget("app:");
Rectanglerectangle=this.bounds;
Rectanglebounds=this.bounds;
rectangle=newRectangle(this.bounds.X+1,this.bounds.Y+Module.PANEL_HEIGHT+1,this.bounds.Width-2,this.bounds.Height-Module.PANEL_HEIGHT-2);
rectangle=(this.bounds=rectangle);
Vector2value=newVector2((float)this.bounds.X,(float)this.bounds.Y);
for(inti=0;i<this.graphPoints.Count-1;i++)
{
Vector2value2=this.backGraphPoints[i];
Vector2value3=this.backGraphPoints[i+1];
value2.Y=Math.Min(value2.Y,(float)this.bounds.Height);
value2.Y=Math.Max(value2.Y,0f);
value3.Y=Math.Min(value3.Y,this.heightRange);
value3.Y=Math.Max(value3.Y,0f);
this.drawLine(value2+value,value3+value,this.os.subtleTextColor);
}
for(inti=0;i<this.graphPoints.Count-1;i++)
{
this.drawLine(this.graphPoints[i]+value,this.graphPoints[i+1]+value,Color.White);
}
rectangle.X+=2;
rectangle.Width-=4;
rectangle.Y=this.bounds.Y+this.bounds.Height-1-13;
rectangle.Height=13;
this.spriteBatch.Draw(Utils.white,rectangle,this.os.outlineColor*this.fade);
rectangle.X++;
rectangle.Y++;
rectangle.Width-=2;
rectangle.Height-=2;
this.spriteBatch.Draw(Utils.white,rectangle,Color.White*this.fade);
rectangle.Width=(int)((float)rectangle.Width*this.progress);
this.spriteBatch.Draw(Utils.white,rectangle,this.os.highlightColor*this.fade);
this.bounds=bounds;
}
// Token: 0x060006E1 RID: 1761 RVA: 0x00071E84 File Offset: 0x00070084
publicvoiddrawLine(Vector2origin,Vector2dest,Colorc)
{
floaty=Vector2.Distance(origin,dest);
floatnum=(float)Math.Atan2((double)(dest.Y-origin.Y),(double)(dest.X-origin.X));
num+=4.712389f;
this.spriteBatch.Draw(Utils.white,origin,null,c*this.fade,num,Vector2.Zero,newVector2(1f,y),SpriteEffects.None,0.5f);
}
// Token: 0x060006E2 RID: 1762 RVA: 0x00071F08 File Offset: 0x00070108
publicoverridevoidCompleted()
{
base.Completed();
Computercomputer=Programs.getComputer(this.os,this.targetIP);
if(computer!=null)
{
computer.openPort(80,this.os.thisComputer.ip);
}
}
// Token: 0x040007B0 RID: 1968
publicstaticfloatDURATION=14f;
// Token: 0x040007B1 RID: 1969
publicstaticfloatAFTER_COMPLETION_STALL=1f;
// Token: 0x040007B2 RID: 1970
publicstaticfloatGRAPH_MOVEMENT=22f;
// Token: 0x040007B3 RID: 1971
privatefloatprogress=0f;
// Token: 0x040007B4 RID: 1972
privateboolhasCompleted=false;
// Token: 0x040007B5 RID: 1973
privatefloatsucsessTimer=HTTPExploitExe.AFTER_COMPLETION_STALL;
// Token: 0x040007B6 RID: 1974
privatefloattAccum=0f;
// Token: 0x040007B7 RID: 1975
privatefloatfastTimeAccum=0f;
// Token: 0x040007B8 RID: 1976
privatefloatheightRange=0f;
// Token: 0x040007B9 RID: 1977
privateList<Vector2>graphPoints;
// Token: 0x040007BA RID: 1978
privateList<Vector2>backGraphPoints;
}
}