Guest User

Untitled

a guest
Nov 12th, 2017
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.54 KB | None | 0 0
  1. package ProxyPackage;
  2.  
  3. import java.util.Scanner;
  4.  
  5.  
  6. public class Proxies {
  7.  
  8. int session = 10;
  9. String usCountry = "servercountry-us.zproxy.luminati.io:22225:";
  10. String ukCountry = "servercountry-gb.zproxy.luminati.io:22225:";
  11. //String usUserName = "lum-customer-yeezys-zone-residential-country-us-session-";
  12. //String ukUserName = "lum-customer-justthekickz-zone-notjones-country-gb-session-";
  13. private String password,customer, zone, locale;
  14.  
  15.  
  16. public Proxies()
  17. {
  18. //this.session = session;
  19. this.password = password;
  20. this.zone = zone;
  21. this.customer = customer;
  22. }
  23. public Proxies(String customer,String zone, String password)
  24. {
  25. //this.session = session;
  26. this.password = password;
  27. this.zone = zone;
  28. this.customer = customer;
  29. }
  30.  
  31. private String getPassword()
  32. {
  33. return password;
  34. }
  35.  
  36. /**
  37. * @param password the password to set
  38. */
  39. public void setPassword(String password) {
  40. this.password = password;
  41. }
  42.  
  43. /**
  44. * @return the customer
  45. */
  46. public String getCustomer() {
  47. return customer;
  48. }
  49.  
  50. /**
  51. * @param customer the customer to set
  52. */
  53. public void setCustomer(String customer) {
  54. this.customer = customer;
  55. }
  56.  
  57. /**
  58. * @return the zone
  59. */
  60. public String getZone() {
  61. return zone;
  62. }
  63.  
  64. /**
  65. * @param zone the zone to set
  66. */
  67. public void setZone(String zone) {
  68. this.zone = zone;
  69. }
  70.  
  71. public int getNumOfSessions(){
  72. System.out.print("Please input number of sessions: ");
  73. Scanner scan = new Scanner(System.in);
  74. session = scan.nextInt();
  75.  
  76. return session;
  77. }
  78. /*
  79. public String incrementSession()
  80. {
  81. int count = 0;
  82. for (int i = 0; i < session; i++)
  83. {
  84. count++;
  85. String result = usCountry + usUserName + count + ":" + password;
  86. System.out.println(result);
  87.  
  88. }
  89. return Integer.toString(count);
  90. }
  91. */
  92. public String getLocale()
  93. {
  94. System.out.print("What is your region, 'us' or 'uk'? ");
  95. Scanner scan = new Scanner(System.in);
  96. locale = scan.nextLine();
  97. return locale;
  98. }
  99.  
  100. public void setLocale(){
  101. this.locale = locale;
  102. }
  103.  
  104. public void incrementUk()
  105. {
  106. int count = 0;
  107. for (int i = 0; i < session; i++)
  108. {
  109. count++;
  110. String result = ukCountry + "lum-customer-" + getCustomer() + "-zone-"
  111. + getZone() + "-country-uk-session-" + count
  112. + ":" + password;
  113. System.out.println(result);
  114. }
  115.  
  116. }
  117.  
  118. public void incrementUs()
  119. {
  120. int count = 0;
  121. for (int i = 0; i < session; i++)
  122. {
  123. count++;
  124. String result = usCountry + "lum-customer-" + getCustomer() + "-zone-"
  125. + getZone() + "-country-us-session-" + count
  126. + ":" + password;
  127. System.out.println(result);
  128. }
  129. }
  130.  
  131. public void incrementSession()
  132. {
  133. if (locale == "gb")
  134. {
  135. incrementUk();
  136.  
  137. }
  138. else {
  139.  
  140. if (locale == "us")
  141. {
  142. incrementUs();
  143. }
  144. }
  145. }
  146. }
Add Comment
Please, Sign In to add comment