Results 1 to 6 of 6
  1. #1
    nathanael890's Avatar
    Join Date
    Aug 2008
    Gender
    male
    Posts
    158
    Reputation
    13
    Thanks
    46
    My Mood
    Bored

    NSLookup with VB.NET (2008)

    Hey there guys.

    I want to ask if there is any code that can be done on NSLookup?
    What would be the code to get the name, addresses, and the aliases of a site?

    I've searched on google but nothing worked.


    Status: Unknown

  2. #2
    Hassan's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    System.Threading.Tasks
    Posts
    4,764
    Reputation
    495
    Thanks
    2,133
    My Mood
    Dead
    Here is a good website that provides general information about the site:

    Mpgh.net, Comprehensive Information About Mpgh | Quarkbase

    All you need is good string manipulation skills so you can extract what you need to. I suggest using Regex. I may do it, but I am a bit busy atm.

  3. The Following User Says Thank You to Hassan For This Useful Post:

    NextGen1 (03-19-2012)

  4. #3
    nathanael890's Avatar
    Join Date
    Aug 2008
    Gender
    male
    Posts
    158
    Reputation
    13
    Thanks
    46
    My Mood
    Bored
    Oh. I didn't know you're not a minion force. <.<
    Grats.

    btw. I haven't yet used Regex from my applications and I don't know how to use them.
    I'm such a noob. =.=


    Status: Unknown

  5. #4
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    I wrote another Down & Dirty Function.

    Code:
        Public Function NDlookup(ByRef Domain As String)       
             Dim Proc As New Process
            With Proc.StartInfo
                .Arguments = Domain
                .UseShellExecute = False
                .RedirectStandardError = True
                .FileName = "nslookup.exe"
                .CreateNoWindow = True
                .RedirectStandardOutput = True
    
            End With
            Try
                Proc.Start()
                If Proc.WaitForExit(8000) Then
                    'Read Output
                    Return (Proc.StandardOutput.ReadToEnd)
                Else
                    'Failed
                    Return ("TimeOut")
                End If
            Catch ex As Exception
                MsgBox(ex.Message, MsgBoxStyle.Critical)
            End Try
        End Function
    This Function will Return the output from NSlookup
    To use it

    All you have to do is "bind" the returned information somewhere.

    Code:
    MsgBox(NDlookup("https://mpgh.net"))
    or

    Code:
    Label1.text = NDlookup("https://mpgh.net")
    etc etc.

    Hope it helps
    Last edited by NextGen1; 03-19-2012 at 08:45 PM. Reason: Forgot to set UseShellExecute argument, and forgot to set it to false. Whoops


     


     


     



    The Most complete application MPGH will ever offer - 68%




  6. #5
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Quote Originally Posted by NextGen1 View Post
    I wrote another Down & Dirty Function.

    Code:
        Public Function NDlookup(ByRef Domain As String)       
             Dim Proc As New Process
            With Proc.StartInfo
                .Arguments = Domain
                .UseShellExecute = False
                .RedirectStandardError = True
                .FileName = "nslookup.exe"
                .CreateNoWindow = True
                .RedirectStandardOutput = True
    
            End With
            Try
                Proc.Start()
                If Proc.WaitForExit(8000) Then
                    'Read Output
                    Return (Proc.StandardOutput.ReadToEnd)
                Else
                    'Failed
                    Return ("TimeOut")
                End If
            Catch ex As Exception
                MsgBox(ex.Message, MsgBoxStyle.Critical)
            End Try
        End Function
    This Function will Return the output from NSlookup
    To use it

    All you have to do is "bind" the returned information somewhere.

    Code:
    MsgBox(NDlookup("https://mpgh.net"))
    or

    Code:
    Label1.text = NDlookup("https://mpgh.net")
    etc etc.

    Hope it helps
    Quick FYI, you don't include the protocol in the address.

    Code:
    NDLookup("https://mpgh.net")
    won't work, but
    Code:
    NDLookup("www.mpgh.net")
    Will.

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  7. #6
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed



     
    DNS server handling your query: localhost
    DNS server's address: 127.0.0.1#53


    Name: mpgh.net
    Address: 173.245.61.146
    Name: mpgh.net
    Address: 199.27.135.56

    Same results above from nslookup.exe



     

     


    So apparently (if you use W3 or Protocol) it returns everything properly, just the Ip's seem off.
    But yea, I wasn't thinking when adding the domain, remember I am also (primarily) a Web Design/Developer which means, most of the time I write out URL's in quotes (single or double ' ") it contains https://
    ---------------------------------------------

    I did however miss two optional arguments that could be passed, so I added them to the function.

    Code:
    Public Function NDlookup(ByRef Domain As String, Optional Server As String = "localhost", Optional Address As String = "127.0.0.1")
            Dim Proc As New Process
            With Proc.StartInfo
                .Arguments = Domain & Server & Address
                .UseShellExecute = False
                .RedirectStandardError = True
                .FileName = "nslookup.exe"
                .CreateNoWindow = True
                .RedirectStandardOutput = True
    
            End With
            Try
                Proc.Start()
                If Proc.WaitForExit(8000) Then
                    'Returns Output 
                    Return (Proc.StandardOutput.ReadToEnd)
                Else
                    'Failed
                    Return ("TimeOut")
                End If
            Catch ex As Exception
                MsgBox(ex.Message, MsgBoxStyle.Critical)
            End Try
        End Function
    To use:

    It's

    Code:
    NDlookup("Domain",Optional Server as string, optional address as string)
    Because the last two arguments are optional, they have default arguments
    (Domain, Localhost, 127.0.0.1)

    Example with optional arguments.

    Code:
    MsgBox(NDlookup("mpgh.net", , ))

    Example with "Custom" Arguments.

    Msgbox(NDlookup("mpgh.net", nd5.hostgator.com,187,143,2,17)
    Last edited by NextGen1; 03-20-2012 at 12:57 AM.


     


     


     



    The Most complete application MPGH will ever offer - 68%




Similar Threads

  1. [Help] Error with Paint.net
    By perestroika57 in forum WarRock - International Hacks
    Replies: 5
    Last Post: 01-27-2010, 01:04 AM
  2. My Crosshair Hack made in VB.NET ( 2008)
    By startdriveturn in forum Visual Basic Programming
    Replies: 15
    Last Post: 09-06-2009, 12:52 PM
  3. VB.NET 2008 Setting Flash
    By dcrew09 in forum Visual Basic Programming
    Replies: 5
    Last Post: 08-30-2009, 11:00 AM
  4. is there a problem with MPGH.NET?
    By mexicano007 in forum Suggestions, Requests & General Help
    Replies: 8
    Last Post: 07-07-2009, 02:07 AM
  5. what happend with MPGH.net man...
    By GhostLife in forum WarRock - International Hacks
    Replies: 16
    Last Post: 01-15-2008, 09:26 AM