Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

how a use listbox proxy with httpwebrequest

hi guys
im really happy for join with members hack forums
im old member here from 2009 and i left world hack for 5years , now im back to world hack again and forget all Programming 👍
now im want help for use listbox proxy with httpwebrequest , im Programming that code and not work fine. but i am want use every 5sec new proxy from listbox auto, who can fix my code or make source code example for me . thanks all 👍

here link code
pastebin.com/rU2srQr7
Code
request.Proxy = listbox1.Items(index).ToString()


Haven't opened up VB in a while, but it should be close.

Index ofc is the index of the current proxy in the listbox.
fuck.
[Image: wyEbCMi.png]

Not trying to be a dick, It just comes naturally.
(Dec 25, 2018 05:23 PM)StarZ Wrote:  
Code
request.Proxy = listbox1.Items(index).ToString()


Haven't opened up VB in a while, but it should be close.

Index ofc is the index of the current proxy in the listbox.

thanks , but i am want use every 5sec new proxy from listbox auto.
Create timer, background thread or task and then call Thead.Sleep(5000) in loop

In each iteration just initialize proxy from listbox as you wish
Consider getting rid of the following..

On Error Resume Next
-Implement the Try/Catch pattern anywhere you think an error may occur.

CheckForIllegalCrossThreadCalls = False
-Consider using Invoke.

There are many ways to do this but for clarity sake, I will try to stay as close as possible to your coding model.

'On the form thread: (inside a start button or something)

PHP Code

<?php 
Dim lstProxies 
As New List(Of String)(ListBox1.Items.Cast(Of String))

Dim t As New Thread(Sub() Start(lstProxies)) With {.IsBackground = True}
t.Start() 

You've set the items of ListBox1 to lstProxies.
A Thread is then spawned with those items in a parameter.

PHP Code

<?php 
Private Sub Start(lstProxies As IEnumerable(Of String))
 
       For Each s As String In lstProxies
            
'use s
        Next
End Sub 
(Dec 25, 2018 06:36 PM)GHackiHG Wrote:  Create timer, background thread or task and then call Thead.Sleep(5000) in loop

In each iteration just initialize proxy from listbox as you wish

thanks, but here is my problem if u can fix it or make source code example for me


pastebin.com/RjCHbbuh


(Dec 26, 2018 12:14 AM)DBots Wrote:  Consider getting rid of the following..

On Error Resume Next
-Implement the Try/Catch pattern anywhere you think an error may occur.

CheckForIllegalCrossThreadCalls = False
-Consider using Invoke.

There are many ways to do this but for clarity sake, I will try to stay as close as possible to your coding model.

'On the form thread: (inside a start button or something)

PHP Code

<?php 
Dim lstProxies 
As New List(Of String)(ListBox1.Items.Cast(Of String))

Dim t As New Thread(Sub() Start(lstProxies)) With {.IsBackground = True}
t.Start() 

You've set the items of ListBox1 to lstProxies.
A Thread is then spawned with those items in a parameter.

PHP Code

<?php 
Private Sub Start(lstProxies As IEnumerable(Of String))
 
       For Each s As String In lstProxies
            
'use s
        Next
End Sub 

thanks man good job , im will test that 👍


(Dec 26, 2018 12:14 AM)DBots Wrote:  Consider getting rid of the following..

On Error Resume Next
-Implement the Try/Catch pattern anywhere you think an error may occur.

CheckForIllegalCrossThreadCalls = False
-Consider using Invoke.

There are many ways to do this but for clarity sake, I will try to stay as close as possible to your coding model.

'On the form thread: (inside a start button or something)

PHP Code

<?php 
Dim lstProxies 
As New List(Of String)(ListBox1.Items.Cast(Of String))

Dim t As New Thread(Sub() Start(lstProxies)) With {.IsBackground = True}
t.Start() 

You've set the items of ListBox1 to lstProxies.
A Thread is then spawned with those items in a parameter.

PHP Code

<?php 
Private Sub Start(lstProxies As IEnumerable(Of String))
 
       For Each s As String In lstProxies
            
'use s
        Next
End Sub 

i am make good job and soon done my project but have that problem if u can fix it , ty for your time

p o s t i m g.cc/B8Q3VWs2
no one help here all code is nothing ,but thanks all im make good code and done my project 👍
that video project
streamable.com/ypldg

close post.
All these mentions of threads and threaded timers and Thread.Sleep for timing... 🤦‍♂

System.Windows.Forms.Timer is the only good way to go here, and if you need to deal with the data on a separate thread, then spawn it there utilizing a threadpool or something. You don't need to use threads for anything but the actual processing using the proxies, as dealing with the listbox object collection is all the UI thread in the first place...
Getting Started: C/C++
[C/C++/.NET/x86 ASM - Automation Programmer]


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C#] by HardStoNMay 2, 2021 12:59 AM 5 268 May 2, 2021 12:59 AM
Last Post: vaiperboy
[C#] by draxyeeSep 10, 2019 01:37 PM 12 382 Sep 10, 2019 01:37 PM
Last Post: MavenGradle
[.NET] by freesixJan 19, 2019 02:14 AM 13 490 Jan 19, 2019 02:14 AM
Last Post: StarZ