+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Sep 2009
    Posts
    2

    Question Regarding CSocketPlus

    Hiya everyone!

    I just recently picked up vb6 to learn. Therefore, please bare with me if I sounded too noobish or something.

    I have read several threads here on Reverse Connection. And have followed the advice by senior members on using CSocketMaster instead of winsock. Since it is much better.

    Yes, I have indeed my first very basic reverse connecting rat. However, now I do have a problem with multiple sockets. Therefore, I will like to switch to CSockPlus which is a "plus version" of CSocketMaster.

    This is how I code it when using CSockMaster:
    Code:
    Private Sub Form_Load()
        Set client = New CSocketMaster
        client.LocalPort = 2244
        client.Listen
    End Sub
    Right now when I code it using CSocketPlus:
    Code:
    Private Sub Form_Load()
        Set client = New CSocketMaster
        client.LocalPort = 2244
        client.Listen Index
    End Sub
    But I have no idea what is that, Index. I cant omit it. How am I supposed to make the application listen to the port on form load?

  2. #2
    Junior Member
    Join Date
    Aug 2009
    Posts
    5
    hey! i had the same prob when learning to use CsocketPlus but. I assure you, unless your coding a botnet that requires a HTTP GET attack with <200 Sockets then it is WAAAAY Better than Winsock! Ok to get to it this is how it should be:

    Private Sub Form_Load()
    Set client = New CsocketPlus
    client.arrayadd 0
    client.localport(0) = 2244
    client.listen
    End Sub

    (I haven't used CSOCKETPLUS in a while but i'm PRETTY sure thats how its done. Hope i Helped!)

    -Brandon

  3. #3
    Junior Member
    Join Date
    Sep 2009
    Posts
    2
    Thanks for your help, brandon!

    I have figured out this socket index. It is like a number assigned for each socket. Like the index for an array.

    However I am facing problems with CSocketPlus adding sockets into the socket array dynamically. Below is the flow of my logic (Not sure whether is it in the right direction, please advise.):

    1) On Form Load
    - Initialize a new socket array, CSocketPlus.
    - Initialize global variable, intIndex, to 0.
    - Initialize the first socket for listening.

    Code:
    Code:
    Set client = New CSocketPlus
    intIndex = 0
    client.ArrayAdd (intIndex)
    client.Bind intIndex, 9999, client.LocalIP(intIndex)
    client.Listen (intIndex)
    2) At Connection Request
    - Close the requested socket.
    - Initiate the connection with the socket.
    - Increase the array socket count by 1.
    - Add another socket into the array for listening.

    Code:
    Code:
    client.CloseSck (Index)
    client.Accept Index, requestID
    intIndex = intIndex + 1
    client.ArrayAdd (intIndex)
    client.Bind intIndex, 2244, client.LocalIP(intIndex)
    client.Listen (intIndex)
    My problem occurs at the connection request. When my server is trying to connect back to the client, it will have an error: "Out of memory".

    The only idea that I have in mind is that the array created is too small. Therefore unable to do an ArrayAdd.

    I tried debugging and the IDE shows me that I am having an error while cleaning the array in the CSocketPlus class.

    Below is the function that is having the error:
    Code:
    CleanSocketArray
    Please, would someone kindly point me to the correct direction for me to continue learning? Thanks!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. ok i got another question
    By mrpervie in forum Malware Discussion and General Help
    Replies: 4
    Last Post: 16-06-2009, 06:01
  2. ook i got a question...
    By mrpervie in forum Malware Discussion and General Help
    Replies: 6
    Last Post: 15-06-2009, 19:00
  3. CSocketPlus Binary Data Transfer = SLOW!
    By VB5 Forever in forum Visual Basic Help
    Replies: 5
    Last Post: 30-05-2009, 09:52
  4. C# Question Or C And C++
    By Akama in forum Malware Discussion and General Help
    Replies: 7
    Last Post: 16-09-2008, 20:28
  5. i have 1 question.
    By assassin in forum Delphi Help
    Replies: 3
    Last Post: 12-07-2007, 04:43

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.