SlideShare ist ein Scribd-Unternehmen logo
1 von 2
ui drop down("Threads", "10,20,30,40,50", #INPUT Threads) 
ui stat monitor("Threads (Active/Total):", "<b>{#THREADS Active}/{#THREADS 
Max}</b>") 
ui stat monitor("COUNT:", #COUNT) 
set(#FOLDER Root, $special folder("Application"), "Global") 
set(#THREADS Max, #INPUT Threads, "Global") 
clear table(&RESULTS) 
add list to table as row(&RESULTS, 0, 0, $list from text("Proxy 
Used,IP,Proxy,City,Country,ISP,STATUS", ",")) 
set(#RESULTS ROW, 1, "Global") 
clear list(%PROXIES) 
add list to list(%PROXIES, $list from file("{#FOLDER Root}proxies.txt"), 
"Delete", "Global") 
set(#PROXIES ROW, 0, "Global") 
set(#COUNT, $list total(%PROXIES), "Global") 
if($comparison(#THREADS Max, ">", #COUNT)) { 
then { 
alert("You need to have more proxies than threads.") 
stop script 
} 
else { 
} 
} 
comment("Reset counter to 0.") 
set(#THREADS Active, $plugin function("Threads Counter.dll", "threads counter", 
"reset"), "Global") 
comment("Main Threading Loop") 
loop while($comparison(#COUNT, ">", 0)) { 
if($comparison($plugin function("Threads Counter.dll", "threads counter", 
"read"), "<", #THREADS Max)) { 
then { 
comment("Increment Number Of Threads And Store Value to UBot 
Variable.") 
set(#THREADS Active, $plugin function("Threads Counter.dll", 
"threads counter", "increment"), "Global") 
if($comparison(#PROXIES ROW, ">=", $list total(%PROXIES))) { 
then { 
set(#PROXIES ROW, 0, "Global") 
} 
else { 
} 
} 
THREAD START(#PROXIES ROW, #RESULTS ROW) 
increment(#PROXIES ROW) 
increment(#RESULTS ROW) 
decrement(#COUNT) 
} 
else { 
wait(0.2) 
} 
} 
} 
comment("Thread Command") 
define THREAD START(#PROXIES ROW, #RESULTS ROW) { 
thread { 
in new browser { 
CHANGE PROXY(#PROXIES ROW) 
SCRAPE WHATSMYIP(#PROXIES ROW, #RESULTS ROW) 
} 
set(#THREADS Active, $plugin function("Threads Counter.dll", "threads 
counter", "decrement"), "Global") 
} 
} 
comment("Wait For Threads To Close")
set(#THREADS Active, $plugin function("Threads Counter.dll", "threads counter", 
"read"), "Global") 
loop while($comparison(#THREADS Active, ">", 0)) { 
set(#THREADS Active, $plugin function("Threads Counter.dll", "threads 
counter", "read"), "Global") 
wait(2) 
} 
save to file("{#FOLDER Root}results.csv", &RESULTS) 
stop script 
define CHANGE PROXY(#PROXIES ROW) { 
clear list(%PROXY) 
add list to list(%PROXY, $list from text($list item(%PROXIES, #PROXIES ROW), 
":"), "Don't Delete", "Global") 
if($comparison($list total(%PROXY), "=", 4)) { 
then { 
set proxy credentials($list item(%PROXY, 2), $list item(%PROXY, 3)) 
change proxy("{$list item(%PROXY, 0)}:{$list item(%PROXY, 1)}") 
} 
else if($comparison($list total(%PROXY), "=", 2)) { 
change proxy("{$list item(%PROXY, 0)}:{$list item(%PROXY, 1)}") 
} 
else { 
alert("Proxy on row #{#PROXIES ROW} is invalid.") 
stop script 
} 
} 
} 
define SCRAPE WHATSMYIP(#PROXIES ROW, #RESULTS ROW) { 
navigate("http://www.whatismyip.com/", "Wait") 
wait for browser event("DOM Ready", "") 
wait for element(<class="the-ip">, "", "Appear") 
if($exists(<class="the-ip">)) { 
then { 
set table cell(&RESULTS, #RESULTS ROW, 0, $list item(%PROXIES, 
#PROXIES ROW)) 
set table cell(&RESULTS, #RESULTS ROW, 1, $scrape 
attribute(<class="the-ip">, "innertext")) 
set table cell(&RESULTS, #RESULTS ROW, 2, $scrape 
attribute(<class="the-proxy">, "innertext")) 
set table cell(&RESULTS, #RESULTS ROW, 3, $scrape 
attribute(<class="the-city">, "innertext")) 
set table cell(&RESULTS, #RESULTS ROW, 4, $scrape 
attribute(<class="the-country">, "innertext")) 
set table cell(&RESULTS, #RESULTS ROW, 5, $scrape 
attribute(<class="the-isp">, "innertext")) 
set table cell(&RESULTS, #RESULTS ROW, 6, "SUCCESS") 
} 
else { 
set table cell(&RESULTS, #RESULTS ROW, 6, "FAIL") 
} 
} 
}

Weitere ähnliche Inhalte

Was ist angesagt?

Pemrograman Web 8 - MySQL
Pemrograman Web 8 - MySQLPemrograman Web 8 - MySQL
Pemrograman Web 8 - MySQLNur Fadli Utomo
 
Pemrograman Web 9 - Input Form DB dan Session
Pemrograman Web 9 - Input Form DB dan SessionPemrograman Web 9 - Input Form DB dan Session
Pemrograman Web 9 - Input Form DB dan SessionNur Fadli Utomo
 
Jqeury ajax plugins
Jqeury ajax pluginsJqeury ajax plugins
Jqeury ajax pluginsInbal Geffen
 
C A S Sample Php
C A S Sample PhpC A S Sample Php
C A S Sample PhpJH Lee
 
Future of HTTP in CakePHP
Future of HTTP in CakePHPFuture of HTTP in CakePHP
Future of HTTP in CakePHPmarkstory
 
PHP and Rich Internet Applications
PHP and Rich Internet ApplicationsPHP and Rich Internet Applications
PHP and Rich Internet Applicationselliando dias
 
Integration with Camel
Integration with CamelIntegration with Camel
Integration with CamelJosué Neis
 
JQuery Presentation
JQuery PresentationJQuery Presentation
JQuery PresentationSony Jain
 
Php update and delet operation
Php update and delet operationPhp update and delet operation
Php update and delet operationsyeda zoya mehdi
 
The Origin of Lithium
The Origin of LithiumThe Origin of Lithium
The Origin of LithiumNate Abele
 
Ch3(working with file)
Ch3(working with file)Ch3(working with file)
Ch3(working with file)Chhom Karath
 
Up.Php
Up.PhpUp.Php
Up.Phpwsoom
 
DEV Čtvrtkon #76 - Fluent Interface
DEV Čtvrtkon #76 - Fluent InterfaceDEV Čtvrtkon #76 - Fluent Interface
DEV Čtvrtkon #76 - Fluent InterfaceCtvrtkoncz
 

Was ist angesagt? (20)

Pemrograman Web 8 - MySQL
Pemrograman Web 8 - MySQLPemrograman Web 8 - MySQL
Pemrograman Web 8 - MySQL
 
Pemrograman Web 9 - Input Form DB dan Session
Pemrograman Web 9 - Input Form DB dan SessionPemrograman Web 9 - Input Form DB dan Session
Pemrograman Web 9 - Input Form DB dan Session
 
Jqeury ajax plugins
Jqeury ajax pluginsJqeury ajax plugins
Jqeury ajax plugins
 
C A S Sample Php
C A S Sample PhpC A S Sample Php
C A S Sample Php
 
Future of HTTP in CakePHP
Future of HTTP in CakePHPFuture of HTTP in CakePHP
Future of HTTP in CakePHP
 
Php
PhpPhp
Php
 
Tax management-system
Tax management-systemTax management-system
Tax management-system
 
Laravel the right way
Laravel   the right wayLaravel   the right way
Laravel the right way
 
PHP and Rich Internet Applications
PHP and Rich Internet ApplicationsPHP and Rich Internet Applications
PHP and Rich Internet Applications
 
Integration with Camel
Integration with CamelIntegration with Camel
Integration with Camel
 
Conexion php
Conexion phpConexion php
Conexion php
 
JQuery Presentation
JQuery PresentationJQuery Presentation
JQuery Presentation
 
Php Mysql
Php Mysql Php Mysql
Php Mysql
 
My shell
My shellMy shell
My shell
 
[Php] navigations
[Php] navigations[Php] navigations
[Php] navigations
 
Php update and delet operation
Php update and delet operationPhp update and delet operation
Php update and delet operation
 
The Origin of Lithium
The Origin of LithiumThe Origin of Lithium
The Origin of Lithium
 
Ch3(working with file)
Ch3(working with file)Ch3(working with file)
Ch3(working with file)
 
Up.Php
Up.PhpUp.Php
Up.Php
 
DEV Čtvrtkon #76 - Fluent Interface
DEV Čtvrtkon #76 - Fluent InterfaceDEV Čtvrtkon #76 - Fluent Interface
DEV Čtvrtkon #76 - Fluent Interface
 

Andere mochten auch

Bulletin d adhesion
Bulletin d adhesionBulletin d adhesion
Bulletin d adhesionetd76
 
Golf trophies for golf competitions
Golf trophies for golf competitionsGolf trophies for golf competitions
Golf trophies for golf competitionsmilton_sss
 
20110825 Stoll Brochure final file-low res
20110825  Stoll Brochure final file-low res20110825  Stoll Brochure final file-low res
20110825 Stoll Brochure final file-low resEmily Keller
 
PROTOCOL DE DERIVACIÓ DE PACIENTS AMB SOSPITA DE DETERIORAMENT COGNITIU
PROTOCOL DE DERIVACIÓ DE PACIENTS AMB SOSPITA DE DETERIORAMENT COGNITIU PROTOCOL DE DERIVACIÓ DE PACIENTS AMB SOSPITA DE DETERIORAMENT COGNITIU
PROTOCOL DE DERIVACIÓ DE PACIENTS AMB SOSPITA DE DETERIORAMENT COGNITIU lprats
 
Big Data University ML0101EN Certificate _ Big Data University
Big Data University ML0101EN Certificate _ Big Data UniversityBig Data University ML0101EN Certificate _ Big Data University
Big Data University ML0101EN Certificate _ Big Data UniversityImam Raza
 
The Cloud (la Nube) Fabian smith
The Cloud (la Nube) Fabian smith The Cloud (la Nube) Fabian smith
The Cloud (la Nube) Fabian smith fabiansmith17
 
How buyer behaviours have changed - Louisa Francis, Commonwealth Bank
How buyer behaviours have changed - Louisa Francis, Commonwealth BankHow buyer behaviours have changed - Louisa Francis, Commonwealth Bank
How buyer behaviours have changed - Louisa Francis, Commonwealth BankLinkedIn Sales Solutions
 
Four stroke Petrol Engine (Hanan From UET pakistan)
Four stroke Petrol Engine (Hanan From UET pakistan)Four stroke Petrol Engine (Hanan From UET pakistan)
Four stroke Petrol Engine (Hanan From UET pakistan)Hanan Mustafa
 
Android notifications
Android notificationsAndroid notifications
Android notificationsKetan Raval
 

Andere mochten auch (14)

Apresentação Duda
Apresentação DudaApresentação Duda
Apresentação Duda
 
ZNetCorp-1
ZNetCorp-1ZNetCorp-1
ZNetCorp-1
 
E l factor humano
E l factor humanoE l factor humano
E l factor humano
 
Bulletin d adhesion
Bulletin d adhesionBulletin d adhesion
Bulletin d adhesion
 
Golf trophies for golf competitions
Golf trophies for golf competitionsGolf trophies for golf competitions
Golf trophies for golf competitions
 
20110825 Stoll Brochure final file-low res
20110825  Stoll Brochure final file-low res20110825  Stoll Brochure final file-low res
20110825 Stoll Brochure final file-low res
 
Soq24
Soq24Soq24
Soq24
 
PROTOCOL DE DERIVACIÓ DE PACIENTS AMB SOSPITA DE DETERIORAMENT COGNITIU
PROTOCOL DE DERIVACIÓ DE PACIENTS AMB SOSPITA DE DETERIORAMENT COGNITIU PROTOCOL DE DERIVACIÓ DE PACIENTS AMB SOSPITA DE DETERIORAMENT COGNITIU
PROTOCOL DE DERIVACIÓ DE PACIENTS AMB SOSPITA DE DETERIORAMENT COGNITIU
 
Big Data University ML0101EN Certificate _ Big Data University
Big Data University ML0101EN Certificate _ Big Data UniversityBig Data University ML0101EN Certificate _ Big Data University
Big Data University ML0101EN Certificate _ Big Data University
 
The Cloud (la Nube) Fabian smith
The Cloud (la Nube) Fabian smith The Cloud (la Nube) Fabian smith
The Cloud (la Nube) Fabian smith
 
grace (original)
grace (original)grace (original)
grace (original)
 
How buyer behaviours have changed - Louisa Francis, Commonwealth Bank
How buyer behaviours have changed - Louisa Francis, Commonwealth BankHow buyer behaviours have changed - Louisa Francis, Commonwealth Bank
How buyer behaviours have changed - Louisa Francis, Commonwealth Bank
 
Four stroke Petrol Engine (Hanan From UET pakistan)
Four stroke Petrol Engine (Hanan From UET pakistan)Four stroke Petrol Engine (Hanan From UET pakistan)
Four stroke Petrol Engine (Hanan From UET pakistan)
 
Android notifications
Android notificationsAndroid notifications
Android notifications
 

Ähnlich wie Threading

Everything About PowerShell
Everything About PowerShellEverything About PowerShell
Everything About PowerShellGaetano Causio
 
Yy
YyYy
Yyyygh
 
Yy
YyYy
Yyyygh
 
Nouveau document texte
Nouveau document texteNouveau document texte
Nouveau document texteSai Ef
 
Mixing functional and object oriented approaches to programming in C#
Mixing functional and object oriented approaches to programming in C#Mixing functional and object oriented approaches to programming in C#
Mixing functional and object oriented approaches to programming in C#Mark Needham
 
MongoDB Aggregation Framework
MongoDB Aggregation FrameworkMongoDB Aggregation Framework
MongoDB Aggregation FrameworkCaserta
 
Productive Programming in Groovy
Productive Programming in GroovyProductive Programming in Groovy
Productive Programming in GroovyGanesh Samarthyam
 
Introduction to Nodejs
Introduction to NodejsIntroduction to Nodejs
Introduction to NodejsGabriele Lana
 
mobl - model-driven engineering lecture
mobl - model-driven engineering lecturemobl - model-driven engineering lecture
mobl - model-driven engineering lecturezefhemel
 
Scala and big data in ICM. Scoobie, Scalding, Spark, Stratosphere. Scalar 2014
Scala and big data in ICM. Scoobie, Scalding, Spark, Stratosphere. Scalar 2014Scala and big data in ICM. Scoobie, Scalding, Spark, Stratosphere. Scalar 2014
Scala and big data in ICM. Scoobie, Scalding, Spark, Stratosphere. Scalar 2014Michał Oniszczuk
 
Aplicacoes dinamicas Rails com Backbone
Aplicacoes dinamicas Rails com BackboneAplicacoes dinamicas Rails com Backbone
Aplicacoes dinamicas Rails com BackboneRafael Felix da Silva
 
How to Bring Common UI Patterns to ADF
How to Bring Common UI Patterns to ADF How to Bring Common UI Patterns to ADF
How to Bring Common UI Patterns to ADF Luc Bors
 
Utilizing Powerful Extensions for Analytics and Operations
Utilizing Powerful Extensions for Analytics and OperationsUtilizing Powerful Extensions for Analytics and Operations
Utilizing Powerful Extensions for Analytics and OperationsNeo4j
 
Backbone.js — Introduction to client-side JavaScript MVC
Backbone.js — Introduction to client-side JavaScript MVCBackbone.js — Introduction to client-side JavaScript MVC
Backbone.js — Introduction to client-side JavaScript MVCpootsbook
 

Ähnlich wie Threading (20)

Everything About PowerShell
Everything About PowerShellEverything About PowerShell
Everything About PowerShell
 
Yy
YyYy
Yy
 
Yy
YyYy
Yy
 
Nouveau document texte
Nouveau document texteNouveau document texte
Nouveau document texte
 
Mixing functional and object oriented approaches to programming in C#
Mixing functional and object oriented approaches to programming in C#Mixing functional and object oriented approaches to programming in C#
Mixing functional and object oriented approaches to programming in C#
 
C99.php
C99.phpC99.php
C99.php
 
MongoDB Aggregation Framework
MongoDB Aggregation FrameworkMongoDB Aggregation Framework
MongoDB Aggregation Framework
 
Productive Programming in Groovy
Productive Programming in GroovyProductive Programming in Groovy
Productive Programming in Groovy
 
Introduction to Nodejs
Introduction to NodejsIntroduction to Nodejs
Introduction to Nodejs
 
Miracle of std lib
Miracle of std libMiracle of std lib
Miracle of std lib
 
mobl - model-driven engineering lecture
mobl - model-driven engineering lecturemobl - model-driven engineering lecture
mobl - model-driven engineering lecture
 
How te bring common UI patterns to ADF
How te bring common UI patterns to ADFHow te bring common UI patterns to ADF
How te bring common UI patterns to ADF
 
Scala and big data in ICM. Scoobie, Scalding, Spark, Stratosphere. Scalar 2014
Scala and big data in ICM. Scoobie, Scalding, Spark, Stratosphere. Scalar 2014Scala and big data in ICM. Scoobie, Scalding, Spark, Stratosphere. Scalar 2014
Scala and big data in ICM. Scoobie, Scalding, Spark, Stratosphere. Scalar 2014
 
C99
C99C99
C99
 
Aplicacoes dinamicas Rails com Backbone
Aplicacoes dinamicas Rails com BackboneAplicacoes dinamicas Rails com Backbone
Aplicacoes dinamicas Rails com Backbone
 
How to Bring Common UI Patterns to ADF
How to Bring Common UI Patterns to ADF How to Bring Common UI Patterns to ADF
How to Bring Common UI Patterns to ADF
 
Utilizing Powerful Extensions for Analytics and Operations
Utilizing Powerful Extensions for Analytics and OperationsUtilizing Powerful Extensions for Analytics and Operations
Utilizing Powerful Extensions for Analytics and Operations
 
Play!ng with scala
Play!ng with scalaPlay!ng with scala
Play!ng with scala
 
jQuery
jQueryjQuery
jQuery
 
Backbone.js — Introduction to client-side JavaScript MVC
Backbone.js — Introduction to client-side JavaScript MVCBackbone.js — Introduction to client-side JavaScript MVC
Backbone.js — Introduction to client-side JavaScript MVC
 

Mehr von b290572 (20)

P3
P3P3
P3
 
P2
P2P2
P2
 
P1
P1P1
P1
 
P9
P9P9
P9
 
P8
P8P8
P8
 
P7
P7P7
P7
 
P6
P6P6
P6
 
P5
P5P5
P5
 
P4
P4P4
P4
 
P3
P3P3
P3
 
P2
P2P2
P2
 
P1
P1P1
P1
 
P5
P5P5
P5
 
P4
P4P4
P4
 
P3
P3P3
P3
 
P2
P2P2
P2
 
P1
P1P1
P1
 
P9
P9P9
P9
 
P8
P8P8
P8
 
P7
P7P7
P7
 

Threading

  • 1. ui drop down("Threads", "10,20,30,40,50", #INPUT Threads) ui stat monitor("Threads (Active/Total):", "<b>{#THREADS Active}/{#THREADS Max}</b>") ui stat monitor("COUNT:", #COUNT) set(#FOLDER Root, $special folder("Application"), "Global") set(#THREADS Max, #INPUT Threads, "Global") clear table(&RESULTS) add list to table as row(&RESULTS, 0, 0, $list from text("Proxy Used,IP,Proxy,City,Country,ISP,STATUS", ",")) set(#RESULTS ROW, 1, "Global") clear list(%PROXIES) add list to list(%PROXIES, $list from file("{#FOLDER Root}proxies.txt"), "Delete", "Global") set(#PROXIES ROW, 0, "Global") set(#COUNT, $list total(%PROXIES), "Global") if($comparison(#THREADS Max, ">", #COUNT)) { then { alert("You need to have more proxies than threads.") stop script } else { } } comment("Reset counter to 0.") set(#THREADS Active, $plugin function("Threads Counter.dll", "threads counter", "reset"), "Global") comment("Main Threading Loop") loop while($comparison(#COUNT, ">", 0)) { if($comparison($plugin function("Threads Counter.dll", "threads counter", "read"), "<", #THREADS Max)) { then { comment("Increment Number Of Threads And Store Value to UBot Variable.") set(#THREADS Active, $plugin function("Threads Counter.dll", "threads counter", "increment"), "Global") if($comparison(#PROXIES ROW, ">=", $list total(%PROXIES))) { then { set(#PROXIES ROW, 0, "Global") } else { } } THREAD START(#PROXIES ROW, #RESULTS ROW) increment(#PROXIES ROW) increment(#RESULTS ROW) decrement(#COUNT) } else { wait(0.2) } } } comment("Thread Command") define THREAD START(#PROXIES ROW, #RESULTS ROW) { thread { in new browser { CHANGE PROXY(#PROXIES ROW) SCRAPE WHATSMYIP(#PROXIES ROW, #RESULTS ROW) } set(#THREADS Active, $plugin function("Threads Counter.dll", "threads counter", "decrement"), "Global") } } comment("Wait For Threads To Close")
  • 2. set(#THREADS Active, $plugin function("Threads Counter.dll", "threads counter", "read"), "Global") loop while($comparison(#THREADS Active, ">", 0)) { set(#THREADS Active, $plugin function("Threads Counter.dll", "threads counter", "read"), "Global") wait(2) } save to file("{#FOLDER Root}results.csv", &RESULTS) stop script define CHANGE PROXY(#PROXIES ROW) { clear list(%PROXY) add list to list(%PROXY, $list from text($list item(%PROXIES, #PROXIES ROW), ":"), "Don't Delete", "Global") if($comparison($list total(%PROXY), "=", 4)) { then { set proxy credentials($list item(%PROXY, 2), $list item(%PROXY, 3)) change proxy("{$list item(%PROXY, 0)}:{$list item(%PROXY, 1)}") } else if($comparison($list total(%PROXY), "=", 2)) { change proxy("{$list item(%PROXY, 0)}:{$list item(%PROXY, 1)}") } else { alert("Proxy on row #{#PROXIES ROW} is invalid.") stop script } } } define SCRAPE WHATSMYIP(#PROXIES ROW, #RESULTS ROW) { navigate("http://www.whatismyip.com/", "Wait") wait for browser event("DOM Ready", "") wait for element(<class="the-ip">, "", "Appear") if($exists(<class="the-ip">)) { then { set table cell(&RESULTS, #RESULTS ROW, 0, $list item(%PROXIES, #PROXIES ROW)) set table cell(&RESULTS, #RESULTS ROW, 1, $scrape attribute(<class="the-ip">, "innertext")) set table cell(&RESULTS, #RESULTS ROW, 2, $scrape attribute(<class="the-proxy">, "innertext")) set table cell(&RESULTS, #RESULTS ROW, 3, $scrape attribute(<class="the-city">, "innertext")) set table cell(&RESULTS, #RESULTS ROW, 4, $scrape attribute(<class="the-country">, "innertext")) set table cell(&RESULTS, #RESULTS ROW, 5, $scrape attribute(<class="the-isp">, "innertext")) set table cell(&RESULTS, #RESULTS ROW, 6, "SUCCESS") } else { set table cell(&RESULTS, #RESULTS ROW, 6, "FAIL") } } }