Hack Forums
[.NET] [RELEASE] ✹✹ T0SH1VA ✹✹'s - Private Functions - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] [RELEASE] ✹✹ T0SH1VA ✹✹'s - Private Functions (/showthread.php?tid=1317027)

Pages: Pages 1 2


[RELEASE] ✹✹ T0SH1VA ✹✹'s - Private Functions - T0SH1VA - May 24, 2011

[img]http://img4.fotos-hochladen.net/uploads/logoprivatefunchser8ntdym.png[/img]

First:
I decided to release some of my private functions. I think they will be
very useful for RATs and other tools which are providing information from
computer and user.


Functions
° Get Hard-disk usage °
° Get CPU-usage °
° Get RAM-usage °
° Get CPU information °
° Get external IP °
° Get local IP °
° Get TCP traffic °
° Get HWID (Processor) °
° Get Proxyserver °
° Get ammount of installed programs °


SourceCode


Code
Function gethdusage(ByVal what As Byte)
        Dim spacefree As String = 0
        Dim space As String = 0
        For Each xx As DriveInfo In DriveInfo.GetDrives
            If xx.DriveType = IO.DriveType.Fixed Then
                Try
                    space = space + CShort(xx.TotalSize / 1024 / 1024 / 1024)
                    spacefree = spacefree + CShort(xx.TotalFreeSpace / 1024 / 1024 / 1024)
                Catch
                End Try
            End If
        Next

        If what = 0 Then
            Return CInt(space - spacefree) 'Gives back the used space of your HDs in GB.
        ElseIf what = 1 Then
            Return CInt(space) 'Gives back the HDs Space in GB.
        ElseIf what = 2 Then
            Return CUInt(100 - ((spacefree / space) * 100)) 'Gives back the % of used space of the fixed HDs.
            'e.g.: if you got a 100GB HD and 70GB is in use (30GB is free) this will give back "70"
            'for "70% in use".
        Else
            Return Nothing
        End If
    End Function

    Dim cpuCounter = New PerformanceCounter("Processor", "% Processor Time", "_Total") '<-- needed to get cpu usage!
    Function getcpuusage()
        Dim xx As Byte = 0
        While xx = 0
            xx = cpuCounter.NextValue() 'Gets the percetnual usage of your cpu.
        End While
        Return xx
    End Function

    Function getramusage(ByVal what As Byte)
        Dim space As String = CInt(My.Computer.Info.TotalPhysicalMemory / 1024 / 1024)
        Dim spacefree As String = CInt(My.Computer.Info.AvailablePhysicalMemory / 1024 / 1024)
        If what = 0 Then
            Return space - spacefree
        ElseIf what = 1 Then
            Return space
        ElseIf what = 2 Then
            Return CInt(100 - ((spacefree / space) * 100))
        Else
            Return Nothing
        End If
    End Function

    Function getcpuinformation()
        On Error GoTo ErrHandler

        Dim oWMI As Object
        Dim sSQL As String
        Dim oResult As Object
        Dim oItem As Object
        Dim sTemp As String
        Dim sProz As String

        oWMI = GetObject("winmgmts:")

        sSQL = "SELECT Name FROM Win32_Processor"
        oResult = oWMI.ExecQuery(sSQL)

        For Each oItem In oResult
            sTemp = Trim$(oItem.Name)
            If Len(sTemp) > 0 Then
                sProz = sTemp
                While InStr(sProz, "  ") > 0
                    sProz = Replace(sProz, "  ", " ")
                End While
                Exit For
            End If
        Next
        On Error Resume Next
        oItem = Nothing
        oResult = Nothing
        oWMI = Nothing
        On Error GoTo 0

        Return sProz
        Exit Function
ErrHandler:
        getcpuinformation = ""
    End Function

    Function getexternalip()
        Dim client As New WebClient
        Dim ip As String = client.DownloadString("http://whatismyip.com/automation/n09230945.asp")
        Return ip
    End Function

    Function getlocalip()
        Dim StrngAr() As String
        Try
            Dim IP As Net.IPAddress
            Dim IPList As Array = Net.Dns.GetHostEntry(SystemInformation.ComputerName.ToString).AddressList
            If IPList.Length > 0 Then
                ReDim StrngAr(IPList.Length - 1)
                For i As Integer = 0 To IPList.Length - 1
                    IP = IPList.GetValue(i)
                    StrngAr(i) = IP.ToString
                Next
                Return StrngAr
            End If
        Catch ex As Exception
        End Try
        ReDim StrngAr(0)
        Return StrngAr
    End Function

    Function gettcptraffic(ByVal what As Byte)
        Dim xxx() As NetworkInterface = NetworkInterface.GetAllNetworkInterfaces()
        Dim xx As IPv4InterfaceStatistics = xxx(0).GetIPv4Statistics()
        If what = 0 Then
            Return CInt(xx.BytesSent / 1024)
        ElseIf what = 1 Then
            Return CInt(xx.BytesReceived / 1024)
        Else
            Return Nothing
        End If
    End Function

    Function gethwid()
        Dim strProcessorId As String = String.Empty
        Dim query As New SelectQuery("Win32_processor")
        Dim search As New ManagementObjectSearcher(query)
        Dim info As ManagementObject

        For Each info In search.Get()
            strProcessorId = info("processorId").ToString()
        Next
        Return strProcessorId
    End Function

    Function getproxy()
        Return My.Computer.Registry.GetValue("HKEY_CURRENT_USER\Software\" & _
   "Microsoft\Windows\CurrentVersion\Internet Settings", _
   "ProxyServer", "Kein Proxy")
    End Function

    Function getinstalled()
        Dim wmi As New ManagementObjectSearcher("\root\cimv2", "SELECT * FROM " & _
          "win32_Product")
        Return wmi.Get.Count
    End Function

Screenshot
Spoiler (Click to View)











* - Active - May 24, 2011

Thanks I might use this , nice .


* - Gooples - May 24, 2011

Please provide a virus scan, thanks.


* - SIM-478284 - May 24, 2011

CPU-usage 100%? I think that part is not working.


* - T0SH1VA - May 24, 2011

(May 24, 2011 07:47 AM)Scripter4ever Wrote:  CPU-usage 100%? I think that part is not working.

sure it is Oo
why should a cpu not has 100% usage Oo Also this is only the physical usage of CPU.

(May 24, 2011 07:45 AM)PinZ Wrote:  Please provide a virus scan, thanks.

lol xD its a project not a binary xD you can see the sourcecode by your own xD no need for virusscan


* - SIM-478284 - May 24, 2011

Yeah ok sorry I was dumb. I got it.


* - Gooples - May 24, 2011

(May 24, 2011 07:47 AM)✹✹ T0SH1VA ✹✹ Wrote:  sure it is Oo
why should a cpu not has 100% usage Oo Also this is only the physical usage of CPU.


lol xD its a project not a binary xD you can see the sourcecode by your own xD no need for virusscan

I was kidding. . Also source can be backdoored ;).


* - T0SH1VA - May 24, 2011

(May 24, 2011 07:58 AM)PinZ Wrote:  I was kidding. . Also source can be backdoored ;).

sure :D but I think Im trusted enough ;)


* - N3oNight - May 24, 2011

Grate share man..
Keep it up...


* - pr0t0typ3 - May 24, 2011

Lol you actually took the time to make a banner for a source code thread ?
Anyway nice contribution.


* - T0SH1VA - May 24, 2011

(May 24, 2011 08:46 AM)pr0t0typ3 Wrote:  Lol you actually took the time to make a banner for a source code thread ?
Anyway nice contribution.

i got a stencil for banners :D i just add text, icon and graphic :3


* - Salvus - May 24, 2011

Thanks for this, I might use it!


* - T0SH1VA - May 26, 2011

hope u enjoy it :)

btw. Will add some functions these days ;)


* - ii_SNiPEzZ_xX - May 27, 2011

very nice thanks for this


* - RiperFish - May 27, 2011

nice contribution :).
too short.