board_posting_duo 0.0.57 → 0.0.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/board_posting_duo.rb +455 -32
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6843b94bf6fdaedeaf451b44d6ec2e00488360567f1f3a020b7886c1fde1908b
|
4
|
+
data.tar.gz: 6112f687ed64443bdf7625ed911c6357d29b7ed06f818fdd4cb0d2152f24f690
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6ba92ef7b69a38af5bbfa6e1209a20c78b6d40f9d1ee0c6fb94d5471261df8a2135d83a10f146515b0589081b8a3f37214a4b522a833f9eccb365a0df123330
|
7
|
+
data.tar.gz: 0ea5541ae08b29bba63a70f0dbb302d01c9e2ca972ba15e42e9027abab0d2abb1ff6c9e9b894c86a8c64b423ee9eed33e6ec1c1d0712d4500162fca401da2488
|
data/lib/board_posting_duo.rb
CHANGED
@@ -1278,6 +1278,9 @@ sleep(2)
|
|
1278
1278
|
|
1279
1279
|
|
1280
1280
|
|
1281
|
+
sleep(1)
|
1282
|
+
##캡챠 이미지,2캡챠,,등등 코드 부분─────────────────────────────────────────────────────────────────────>
|
1283
|
+
|
1281
1284
|
sleep(1)
|
1282
1285
|
##캡챠 이미지,2캡챠,,등등 코드 부분─────────────────────────────────────────────────────────────────────>
|
1283
1286
|
puts '-[√] 캡챠 유형 탐색.......'.green
|
@@ -1285,9 +1288,12 @@ puts '-[√] 캡챠 유형 탐색.......'.green
|
|
1285
1288
|
|
1286
1289
|
begin
|
1287
1290
|
@driver.switch_to.default_content()
|
1288
|
-
|
1291
|
+
#@driver.find_element(:xpath, '//*[@id="mb_kcaptcha"]')
|
1292
|
+
el = @driver.find_element(:xpath, '//*[@id="mb_kcaptcha"]')
|
1293
|
+
@driver.action.move_to(el).perform
|
1289
1294
|
puts '-[√] 캡챠 발견!! 캡차 해제를 위한 환경설정 약 10초 소요.......'.red
|
1290
1295
|
puts '-[√] 챕챠 해제 중~ 해제 완료까지 마우스 움직이지 마세요.......'.red
|
1296
|
+
puts '-[√] 챕챠 코드 code 1.......'.red
|
1291
1297
|
sleep(1)
|
1292
1298
|
mouse_move_percentage(0.3,0.02)
|
1293
1299
|
sleep(0.5)
|
@@ -1312,9 +1318,12 @@ begin
|
|
1312
1318
|
rescue
|
1313
1319
|
begin
|
1314
1320
|
@driver.switch_to.default_content()
|
1315
|
-
|
1321
|
+
#@driver.find_element(:xpath, '//*[@alt="자동등록방지"]')
|
1322
|
+
el = @driver.find_element(:xpath, '//*[@alt="자동등록방지"]')
|
1323
|
+
@driver.action.move_to(el).perform
|
1316
1324
|
puts '-[√] 캡챠 발견!! 캡차 해제를 위한 환경설정 약 10초 소요.......'.red
|
1317
1325
|
puts '-[√] 챕챠 해제 중~ 해제 완료까지 마우스 움직이지 마세요.......'.red
|
1326
|
+
puts '-[√] 챕챠 코드 code 2.......'.red
|
1318
1327
|
sleep(1)
|
1319
1328
|
mouse_move_percentage(0.3,0.02)
|
1320
1329
|
sleep(0.5)
|
@@ -1339,19 +1348,29 @@ rescue
|
|
1339
1348
|
rescue
|
1340
1349
|
begin
|
1341
1350
|
@driver.switch_to.default_content()
|
1342
|
-
|
1351
|
+
sleep(1)
|
1352
|
+
#@driver.find_element(:xpath, '//*[@id="captcha_img"]').send_keys(:tab)
|
1353
|
+
el = @driver.find_element(:xpath, '//*[@id="captcha_img"]')
|
1354
|
+
@driver.action.move_to(el).perform
|
1343
1355
|
puts '-[√] 캡챠 발견!! 캡차 해제를 위한 환경설정 약 10초 소요.......'.red
|
1344
1356
|
puts '-[√] 챕챠 해제 중~ 해제 완료까지 마우스 움직이지 마세요.......'.red
|
1357
|
+
puts '-[√] 챕챠 코드 code 3.......'.red
|
1358
|
+
sleep(1)
|
1359
|
+
begin
|
1360
|
+
#요소 자체 제거 하기 기능
|
1361
|
+
chat_box = @driver.find_element(:xpath, '//*[@for="captcha_key"]')
|
1362
|
+
@driver.execute_script("arguments[0].remove();", chat_box)
|
1345
1363
|
sleep(1)
|
1364
|
+
rescue
|
1365
|
+
end
|
1346
1366
|
mouse_move_percentage(0.3,0.02)
|
1347
1367
|
sleep(0.5)
|
1348
1368
|
left_click
|
1349
1369
|
sleep(1)
|
1350
1370
|
@driver.find_element(:xpath, '//*[@id="captcha_img"]').click
|
1351
1371
|
sleep(1)
|
1352
|
-
|
1353
|
-
|
1354
|
-
#@driver.manage.window.maximize
|
1372
|
+
|
1373
|
+
|
1355
1374
|
|
1356
1375
|
|
1357
1376
|
el1 = @driver.find_element(:xpath, '//*[@id="captcha_img"]')
|
@@ -1366,9 +1385,12 @@ rescue
|
|
1366
1385
|
rescue
|
1367
1386
|
begin
|
1368
1387
|
@driver.switch_to.default_content()
|
1369
|
-
|
1388
|
+
#@driver.find_element(:xpath, '//*[@id="kcaptcha"]')
|
1389
|
+
el = @driver.find_element(:xpath, '//*[@id="kcaptcha"]')
|
1390
|
+
@driver.action.move_to(el).perform
|
1370
1391
|
puts '-[√] 캡챠 발견!! 캡차 해제를 위한 환경설정 약 10초 소요.......'.red
|
1371
1392
|
puts '-[√] 챕챠 해제 중~ 해제 완료까지 마우스 움직이지 마세요.......'.red
|
1393
|
+
puts '-[√] 챕챠 코드 code 4.......'.red
|
1372
1394
|
sleep(1)
|
1373
1395
|
mouse_move_percentage(0.3,0.02)
|
1374
1396
|
sleep(0.5)
|
@@ -1393,9 +1415,12 @@ rescue
|
|
1393
1415
|
rescue
|
1394
1416
|
begin
|
1395
1417
|
@driver.switch_to.default_content()
|
1396
|
-
|
1418
|
+
#@driver.find_element(:xpath, '//*[@for="kboard-input-captcha"]')
|
1419
|
+
el = @driver.find_element(:xpath, '//*[@for="kboard-input-captcha"]')
|
1420
|
+
@driver.action.move_to(el).perform
|
1397
1421
|
puts '-[√] 캡챠 발견!! 캡차 해제를 위한 환경설정 약 10초 소요.......'.red
|
1398
1422
|
puts '-[√] 챕챠 해제 중~ 해제 완료까지 마우스 움직이지 마세요.......'.red
|
1423
|
+
puts '-[√] 챕챠 코드 code 5.......'.red
|
1399
1424
|
sleep(1)
|
1400
1425
|
mouse_move_percentage(0.3,0.02)
|
1401
1426
|
sleep(0.5)
|
@@ -1420,9 +1445,12 @@ rescue
|
|
1420
1445
|
begin
|
1421
1446
|
@driver.switch_to.default_content()
|
1422
1447
|
sleep(1)
|
1423
|
-
|
1448
|
+
#@driver.find_element(:xpath, '//*[@id="captcha_Write"]')
|
1449
|
+
el = @driver.find_element(:xpath, '//*[@id="captcha_Write"]')
|
1450
|
+
@driver.action.move_to(el).perform
|
1424
1451
|
puts '-[√] 캡챠 발견!! 캡차 해제를 위한 환경설정 약 10초 소요.......'.red
|
1425
1452
|
puts '-[√] 챕챠 해제 중~ 해제 완료까지 마우스 움직이지 마세요.......'.red
|
1453
|
+
puts '-[√] 챕챠 코드 code 6.......'.red
|
1426
1454
|
sleep(1)
|
1427
1455
|
mouse_move_percentage(0.3,0.02)
|
1428
1456
|
sleep(0.5)
|
@@ -1447,9 +1475,12 @@ rescue
|
|
1447
1475
|
rescue
|
1448
1476
|
begin
|
1449
1477
|
@driver.switch_to.default_content()
|
1450
|
-
|
1478
|
+
#@driver.find_element(:xpath, '//*[@image-reader="in-progress"]')
|
1479
|
+
el = @driver.find_element(:xpath, '//*[@image-reader="in-progress"]')
|
1480
|
+
@driver.action.move_to(el).perform
|
1451
1481
|
puts '-[√] 캡챠 발견!! 캡차 해제를 위한 환경설정 약 10초 소요.......'.red
|
1452
1482
|
puts '-[√] 챕챠 해제 중~ 해제 완료까지 마우스 움직이지 마세요.......'.red
|
1483
|
+
puts '-[√] 챕챠 코드 code 7.......'.red
|
1453
1484
|
sleep(1)
|
1454
1485
|
mouse_move_percentage(0.3,0.02)
|
1455
1486
|
sleep(0.5)
|
@@ -1474,9 +1505,12 @@ rescue
|
|
1474
1505
|
rescue
|
1475
1506
|
begin
|
1476
1507
|
@driver.switch_to.default_content()
|
1477
|
-
|
1508
|
+
#@driver.find_element(:xpath, '//*[@id="spamauth"]')
|
1509
|
+
el = @driver.find_element(:xpath, '//*[@id="spamauth"]')
|
1510
|
+
@driver.action.move_to(el).perform
|
1478
1511
|
puts '-[√] 캡챠 발견!! 캡차 해제를 위한 환경설정 약 10초 소요.......'.red
|
1479
1512
|
puts '-[√] 챕챠 해제 중~ 해제 완료까지 마우스 움직이지 마세요.......'.red
|
1513
|
+
puts '-[√] 챕챠 코드 code 8.......'.red
|
1480
1514
|
sleep(1)
|
1481
1515
|
mouse_move_percentage(0.3,0.02)
|
1482
1516
|
sleep(0.5)
|
@@ -1501,9 +1535,12 @@ rescue
|
|
1501
1535
|
rescue
|
1502
1536
|
begin
|
1503
1537
|
@driver.switch_to.default_content()
|
1504
|
-
|
1538
|
+
#@driver.find_element(:xpath, '//*[@id="norobot_img"]')
|
1539
|
+
el = @driver.find_element(:xpath, '//*[@id="norobot_img"]')
|
1540
|
+
@driver.action.move_to(el).perform
|
1505
1541
|
puts '-[√] 캡챠 발견!! 캡차 해제를 위한 환경설정 약 10초 소요.......'.red
|
1506
1542
|
puts '-[√] 챕챠 해제 중~ 해제 완료까지 마우스 움직이지 마세요.......'.red
|
1543
|
+
puts '-[√] 챕챠 코드 code 9.......'.red
|
1507
1544
|
sleep(1)
|
1508
1545
|
mouse_move_percentage(0.3,0.02)
|
1509
1546
|
sleep(0.5)
|
@@ -1526,7 +1563,69 @@ rescue
|
|
1526
1563
|
sleep(1)
|
1527
1564
|
puts '-[√] 캡챠 코드 타겟 완료1.......'.blue
|
1528
1565
|
rescue
|
1529
|
-
|
1566
|
+
begin
|
1567
|
+
@driver.switch_to.default_content()
|
1568
|
+
#@driver.find_element(:xpath, '//*[@class="CodeImage"]')
|
1569
|
+
el = @driver.find_element(:xpath, '//*[@class="CodeImage"]')
|
1570
|
+
@driver.action.move_to(el).perform
|
1571
|
+
puts '-[√] 캡챠 발견!! 캡차 해제를 위한 환경설정 약 10초 소요.......'.red
|
1572
|
+
puts '-[√] 챕챠 해제 중~ 해제 완료까지 마우스 움직이지 마세요.......'.red
|
1573
|
+
puts '-[√] 챕챠 코드 code 10.......'.red
|
1574
|
+
sleep(1)
|
1575
|
+
mouse_move_percentage(0.3,0.02)
|
1576
|
+
sleep(0.5)
|
1577
|
+
left_click
|
1578
|
+
sleep(1)
|
1579
|
+
@driver.find_element(:xpath, '//*[@class="CodeImage"]').click
|
1580
|
+
sleep(1)
|
1581
|
+
#@driver.manage.window.position = Selenium::WebDriver::Point.new(0, 0)
|
1582
|
+
#sleep(2)
|
1583
|
+
#@driver.manage.window.maximize
|
1584
|
+
|
1585
|
+
|
1586
|
+
el1 = @driver.find_element(:xpath, '//*[@class="CodeImage"]')
|
1587
|
+
@driver.action.context_click(el1).perform
|
1588
|
+
sleep(1)
|
1589
|
+
@driver.action.key_down(:shift).key_stroke('m').key_up(:shift).perform #컨트롤+a
|
1590
|
+
#key_down('shift')
|
1591
|
+
#key_stroke('m')
|
1592
|
+
#key_up('shift')
|
1593
|
+
sleep(1)
|
1594
|
+
puts '-[√] 캡챠 코드 타겟 완료1.......'.blue
|
1595
|
+
rescue
|
1596
|
+
begin
|
1597
|
+
@driver.switch_to.default_content()
|
1598
|
+
#@driver.find_element(:xpath, '//*[@class="CodeImage"]')
|
1599
|
+
el = @driver.find_element(:xpath, '//*[@id="kcaptcha_image"]')
|
1600
|
+
@driver.action.move_to(el).perform
|
1601
|
+
puts '-[√] 캡챠 발견!! 캡차 해제를 위한 환경설정 약 10초 소요.......'.red
|
1602
|
+
puts '-[√] 챕챠 해제 중~ 해제 완료까지 마우스 움직이지 마세요.......'.red
|
1603
|
+
puts '-[√] 챕챠 코드 code 11.......'.red
|
1604
|
+
sleep(1)
|
1605
|
+
mouse_move_percentage(0.3,0.02)
|
1606
|
+
sleep(0.5)
|
1607
|
+
left_click
|
1608
|
+
sleep(1)
|
1609
|
+
@driver.find_element(:xpath, '//*[@id="kcaptcha_image"]').click
|
1610
|
+
sleep(1)
|
1611
|
+
#@driver.manage.window.position = Selenium::WebDriver::Point.new(0, 0)
|
1612
|
+
#sleep(2)
|
1613
|
+
#@driver.manage.window.maximize
|
1614
|
+
|
1615
|
+
|
1616
|
+
el1 = @driver.find_element(:xpath, '//*[@id="kcaptcha_image"]')
|
1617
|
+
@driver.action.context_click(el1).perform
|
1618
|
+
sleep(1)
|
1619
|
+
@driver.action.key_down(:shift).key_stroke('m').key_up(:shift).perform #컨트롤+a
|
1620
|
+
#key_down('shift')
|
1621
|
+
#key_stroke('m')
|
1622
|
+
#key_up('shift')
|
1623
|
+
sleep(1)
|
1624
|
+
puts '-[√] 캡챠 코드 타겟 완료1.......'.blue
|
1625
|
+
rescue
|
1626
|
+
|
1627
|
+
end
|
1628
|
+
end
|
1530
1629
|
end
|
1531
1630
|
end
|
1532
1631
|
end
|
@@ -1867,7 +1966,163 @@ rescue
|
|
1867
1966
|
puts '-[√] 캡챠 코드 타겟 완료2.......'.blue
|
1868
1967
|
sleep(1)
|
1869
1968
|
rescue
|
1969
|
+
begin
|
1970
|
+
@driver.switch_to.default_content()
|
1971
|
+
sleep(1)
|
1972
|
+
@driver.find_element(:xpath, '//*[@title="자동글쓰기방지"]').click
|
1973
|
+
|
1974
|
+
sleep(1)
|
1975
|
+
|
1976
|
+
el2 = @driver.find_element(:xpath, '//*[@title="자동글쓰기방지"]')
|
1977
|
+
@driver.action.context_click(el2).perform
|
1978
|
+
|
1979
|
+
sleep(1)
|
1980
|
+
@driver.action.key_stroke('up')
|
1981
|
+
sleep(1)
|
1982
|
+
@driver.action.key_stroke('up')
|
1983
|
+
sleep(1)
|
1984
|
+
@driver.action.key_stroke('enter')
|
1985
|
+
sleep(1)
|
1986
|
+
begin
|
1987
|
+
# 요소 찾기 타임아웃을 7초로 설정
|
1988
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 7)
|
1989
|
+
#요소가 나타날 때까지 7초 동안 기다립니다.
|
1990
|
+
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
1991
|
+
rescue
|
1992
|
+
sleep(1)
|
1993
|
+
@driver.action.key_stroke('left')
|
1994
|
+
sleep(1)
|
1995
|
+
@driver.action.key_stroke('up')
|
1996
|
+
sleep(1)
|
1997
|
+
@driver.action.key_stroke('enter')
|
1998
|
+
sleep(1)
|
1999
|
+
# 요소 찾기 타임아웃을 7초로 설정
|
2000
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 7)
|
2001
|
+
#요소가 나타날 때까지 7초 동안 기다립니다.
|
2002
|
+
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
2003
|
+
end
|
2004
|
+
puts '-[√] 캡챠 코드 타겟 완료2.......'.blue
|
2005
|
+
sleep(1)
|
2006
|
+
rescue
|
2007
|
+
begin
|
2008
|
+
@driver.switch_to.default_content()
|
2009
|
+
sleep(1)
|
2010
|
+
@driver.find_element(:xpath, '//*[@id="user_captcha"]').click
|
2011
|
+
|
2012
|
+
sleep(1)
|
2013
|
+
|
2014
|
+
el2 = @driver.find_element(:xpath, '//*[@id="user_captcha"]')
|
2015
|
+
@driver.action.context_click(el2).perform
|
2016
|
+
|
2017
|
+
sleep(1)
|
2018
|
+
@driver.action.key_stroke('up')
|
2019
|
+
sleep(1)
|
2020
|
+
@driver.action.key_stroke('up')
|
2021
|
+
sleep(1)
|
2022
|
+
@driver.action.key_stroke('enter')
|
2023
|
+
sleep(1)
|
2024
|
+
begin
|
2025
|
+
# 요소 찾기 타임아웃을 7초로 설정
|
2026
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 7)
|
2027
|
+
#요소가 나타날 때까지 7초 동안 기다립니다.
|
2028
|
+
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
2029
|
+
rescue
|
2030
|
+
sleep(1)
|
2031
|
+
@driver.action.key_stroke('left')
|
2032
|
+
sleep(1)
|
2033
|
+
@driver.action.key_stroke('up')
|
2034
|
+
sleep(1)
|
2035
|
+
@driver.action.key_stroke('enter')
|
2036
|
+
sleep(1)
|
2037
|
+
# 요소 찾기 타임아웃을 7초로 설정
|
2038
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 7)
|
2039
|
+
#요소가 나타날 때까지 7초 동안 기다립니다.
|
2040
|
+
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
2041
|
+
end
|
2042
|
+
puts '-[√] 캡챠 코드 타겟 완료2.......'.blue
|
2043
|
+
sleep(1)
|
2044
|
+
rescue
|
2045
|
+
begin
|
2046
|
+
@driver.switch_to.default_content()
|
2047
|
+
sleep(1)
|
2048
|
+
@driver.find_element(:xpath, '//*[@itemname="자동등록방지"]').click
|
2049
|
+
|
2050
|
+
sleep(1)
|
1870
2051
|
|
2052
|
+
el2 = @driver.find_element(:xpath, '//*[@itemname="자동등록방지"]')
|
2053
|
+
@driver.action.context_click(el2).perform
|
2054
|
+
|
2055
|
+
sleep(1)
|
2056
|
+
@driver.action.key_stroke('up')
|
2057
|
+
sleep(1)
|
2058
|
+
@driver.action.key_stroke('up')
|
2059
|
+
sleep(1)
|
2060
|
+
@driver.action.key_stroke('enter')
|
2061
|
+
sleep(1)
|
2062
|
+
begin
|
2063
|
+
# 요소 찾기 타임아웃을 7초로 설정
|
2064
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 7)
|
2065
|
+
#요소가 나타날 때까지 7초 동안 기다립니다.
|
2066
|
+
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
2067
|
+
rescue
|
2068
|
+
sleep(1)
|
2069
|
+
@driver.action.key_stroke('left')
|
2070
|
+
sleep(1)
|
2071
|
+
@driver.action.key_stroke('up')
|
2072
|
+
sleep(1)
|
2073
|
+
@driver.action.key_stroke('enter')
|
2074
|
+
sleep(1)
|
2075
|
+
# 요소 찾기 타임아웃을 7초로 설정
|
2076
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 7)
|
2077
|
+
#요소가 나타날 때까지 7초 동안 기다립니다.
|
2078
|
+
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
2079
|
+
end
|
2080
|
+
puts '-[√] 캡챠 코드 타겟 완료2.......'.blue
|
2081
|
+
sleep(1)
|
2082
|
+
rescue
|
2083
|
+
begin
|
2084
|
+
@driver.switch_to.default_content()
|
2085
|
+
sleep(1)
|
2086
|
+
@driver.find_element(:xpath, '//*[@name="wr_key"]').click
|
2087
|
+
|
2088
|
+
sleep(1)
|
2089
|
+
|
2090
|
+
el2 = @driver.find_element(:xpath, '//*[@name="wr_key"]')
|
2091
|
+
@driver.action.context_click(el2).perform
|
2092
|
+
|
2093
|
+
sleep(1)
|
2094
|
+
@driver.action.key_stroke('up')
|
2095
|
+
sleep(1)
|
2096
|
+
@driver.action.key_stroke('up')
|
2097
|
+
sleep(1)
|
2098
|
+
@driver.action.key_stroke('enter')
|
2099
|
+
sleep(1)
|
2100
|
+
begin
|
2101
|
+
# 요소 찾기 타임아웃을 7초로 설정
|
2102
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 7)
|
2103
|
+
#요소가 나타날 때까지 7초 동안 기다립니다.
|
2104
|
+
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
2105
|
+
rescue
|
2106
|
+
sleep(1)
|
2107
|
+
@driver.action.key_stroke('left')
|
2108
|
+
sleep(1)
|
2109
|
+
@driver.action.key_stroke('up')
|
2110
|
+
sleep(1)
|
2111
|
+
@driver.action.key_stroke('enter')
|
2112
|
+
sleep(1)
|
2113
|
+
# 요소 찾기 타임아웃을 7초로 설정
|
2114
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 7)
|
2115
|
+
#요소가 나타날 때까지 7초 동안 기다립니다.
|
2116
|
+
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
2117
|
+
end
|
2118
|
+
puts '-[√] 캡챠 코드 타겟 완료2.......'.blue
|
2119
|
+
sleep(1)
|
2120
|
+
rescue
|
2121
|
+
|
2122
|
+
end
|
2123
|
+
end
|
2124
|
+
end
|
2125
|
+
end
|
1871
2126
|
end
|
1872
2127
|
end
|
1873
2128
|
end
|
@@ -1881,6 +2136,7 @@ end
|
|
1881
2136
|
|
1882
2137
|
|
1883
2138
|
|
2139
|
+
|
1884
2140
|
sleep(1)
|
1885
2141
|
##캡챠 해제 입력 코드 부분─────────────────────────────────────────────────────────────────────>
|
1886
2142
|
begin
|
@@ -1889,9 +2145,36 @@ sleep(2)
|
|
1889
2145
|
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
1890
2146
|
sleep(2)
|
1891
2147
|
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
1892
|
-
sleep(
|
1893
|
-
|
2148
|
+
sleep(1)
|
2149
|
+
# 타임아웃을 3초로 설정
|
2150
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 3)
|
2151
|
+
# 요소가 나타날 때까지 30초 동안 기다립니다.
|
2152
|
+
wait.until { @driver.find_element(:xpath, '//*[@data-state="ready"]') }
|
2153
|
+
sleep(1)
|
2154
|
+
|
2155
|
+
el_ready = @driver.find_element(:xpath, '//*[@data-state="ready"]')
|
2156
|
+
@driver.action.move_to(el_ready).perform
|
2157
|
+
sleep(1)
|
2158
|
+
|
1894
2159
|
puts '-[√] 캡챠 해제 진행 중 (약 30~60 초 소요됩니다).......'.green
|
2160
|
+
begin
|
2161
|
+
@driver.find_element(:xpath, '//*[@data-state="ready"]').click #캡챠우회버튼
|
2162
|
+
rescue
|
2163
|
+
begin
|
2164
|
+
@driver.find_element(:xpath, '//*[@class="captcha-solver-image"]').click #캡챠우회버튼
|
2165
|
+
rescue
|
2166
|
+
begin
|
2167
|
+
@driver.find_element(:xpath, '//*[@class="captcha-solver-info"]').click #캡챠우회버튼
|
2168
|
+
rescue
|
2169
|
+
begin
|
2170
|
+
@driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]').click #캡챠우회버튼
|
2171
|
+
rescue
|
2172
|
+
end
|
2173
|
+
end
|
2174
|
+
end
|
2175
|
+
end
|
2176
|
+
|
2177
|
+
|
1895
2178
|
sleep(10)
|
1896
2179
|
begin
|
1897
2180
|
@driver.find_element(:xpath, '//*[@data-state="error"]').click
|
@@ -1906,13 +2189,32 @@ sleep(10)
|
|
1906
2189
|
sleep(1)
|
1907
2190
|
@driver.find_element(:xpath, '//*[@data-state="solved"]').click
|
1908
2191
|
puts '-[√] 캡챠 해제 완료 → 이어서 진행 합니다.......'.green
|
1909
|
-
|
1910
2192
|
sleep(3)
|
2193
|
+
begin
|
2194
|
+
@driver.find_element(:xpath, '//*[@name="user_captcha"]').click
|
2195
|
+
sleep(1)
|
2196
|
+
@driver.action.key_down(:right).key_up(:right).perform
|
2197
|
+
rescue
|
2198
|
+
begin
|
2199
|
+
@driver.find_element(:xpath, '//*[@id="user_captcha"]').click
|
2200
|
+
sleep(1)
|
2201
|
+
@driver.action.key_down(:right).key_up(:right).perform
|
2202
|
+
rescue
|
2203
|
+
begin
|
2204
|
+
@driver.find_element(:xpath, '//*[@title="자동글쓰기방지"]').click
|
2205
|
+
sleep(1)
|
2206
|
+
@driver.action.key_down(:right).key_up(:right).perform
|
2207
|
+
rescue
|
2208
|
+
end
|
2209
|
+
end
|
2210
|
+
end
|
2211
|
+
sleep(1)
|
1911
2212
|
end
|
1912
2213
|
rescue
|
1913
2214
|
puts '-[√] 캡챠 발생 없음.......'.green
|
1914
2215
|
end
|
1915
2216
|
##<─────────────────────────────────────────────────────────────────────캡챠 해제 입력 코드 부분
|
2217
|
+
|
1916
2218
|
##<─────────────────────────────────────────────────────────────────────캡챠 해제 입력 코드 부분
|
1917
2219
|
##<─────────────────────────────────────────────────────────────────────캡챠 입력
|
1918
2220
|
##<─────────────────────────────────────────────────────────────────────캡챠 입력
|
@@ -5423,14 +5725,22 @@ rescue
|
|
5423
5725
|
begin
|
5424
5726
|
@driver.find_element(:xpath, '//*[@id="div_text"]').click
|
5425
5727
|
sleep(1)
|
5426
|
-
puts '내용 항목 코드 타겟
|
5728
|
+
puts '내용 항목 코드 타겟 33.......'.red
|
5427
5729
|
rescue
|
5428
5730
|
begin
|
5429
|
-
@driver.find_element(:xpath, '//*[@
|
5731
|
+
@driver.switch_to.frame(@driver.find_element(:xpath, '//*[@frameborder="0"]'))
|
5732
|
+
sleep(1)
|
5733
|
+
@driver.find_element(:xpath, '/html/body').click
|
5430
5734
|
sleep(1)
|
5431
|
-
puts '내용 항목 코드 타겟
|
5735
|
+
puts '내용 항목 코드 타겟 34.......'.red
|
5432
5736
|
rescue
|
5433
|
-
|
5737
|
+
begin
|
5738
|
+
@driver.find_element(:xpath, '//*[@align="center"]').click
|
5739
|
+
sleep(1)
|
5740
|
+
puts '내용 항목 코드 타겟 35.......'.red
|
5741
|
+
rescue
|
5742
|
+
|
5743
|
+
end
|
5434
5744
|
end
|
5435
5745
|
end
|
5436
5746
|
end
|
@@ -6537,15 +6847,19 @@ rescue
|
|
6537
6847
|
puts '-[√] 챕챠 해제 중~ 해제 완료까지 마우스 움직이지 마세요.......'.red
|
6538
6848
|
puts '-[√] 챕챠 코드 code 3.......'.red
|
6539
6849
|
sleep(1)
|
6850
|
+
#요소 자체 제거 하기 기능
|
6851
|
+
chat_box = @driver.find_element(:xpath, '//*[@for="captcha_key"]')
|
6852
|
+
@driver.execute_script("arguments[0].remove();", chat_box)
|
6853
|
+
sleep(1)
|
6854
|
+
|
6540
6855
|
mouse_move_percentage(0.3,0.02)
|
6541
6856
|
sleep(0.5)
|
6542
6857
|
left_click
|
6543
6858
|
sleep(1)
|
6544
6859
|
@driver.find_element(:xpath, '//*[@id="captcha_img"]').click
|
6545
6860
|
sleep(1)
|
6546
|
-
|
6547
|
-
|
6548
|
-
#@driver.manage.window.maximize
|
6861
|
+
|
6862
|
+
|
6549
6863
|
|
6550
6864
|
|
6551
6865
|
el1 = @driver.find_element(:xpath, '//*[@id="captcha_img"]')
|
@@ -6745,7 +7059,7 @@ rescue
|
|
6745
7059
|
@driver.action.move_to(el).perform
|
6746
7060
|
puts '-[√] 캡챠 발견!! 캡차 해제를 위한 환경설정 약 10초 소요.......'.red
|
6747
7061
|
puts '-[√] 챕챠 해제 중~ 해제 완료까지 마우스 움직이지 마세요.......'.red
|
6748
|
-
puts '-[√] 챕챠 코드 code
|
7062
|
+
puts '-[√] 챕챠 코드 code 10.......'.red
|
6749
7063
|
sleep(1)
|
6750
7064
|
mouse_move_percentage(0.3,0.02)
|
6751
7065
|
sleep(0.5)
|
@@ -6768,7 +7082,38 @@ rescue
|
|
6768
7082
|
sleep(1)
|
6769
7083
|
puts '-[√] 캡챠 코드 타겟 완료1.......'.blue
|
6770
7084
|
rescue
|
6771
|
-
|
7085
|
+
begin
|
7086
|
+
@driver.switch_to.default_content()
|
7087
|
+
#@driver.find_element(:xpath, '//*[@class="CodeImage"]')
|
7088
|
+
el = @driver.find_element(:xpath, '//*[@id="kcaptcha_image"]')
|
7089
|
+
@driver.action.move_to(el).perform
|
7090
|
+
puts '-[√] 캡챠 발견!! 캡차 해제를 위한 환경설정 약 10초 소요.......'.red
|
7091
|
+
puts '-[√] 챕챠 해제 중~ 해제 완료까지 마우스 움직이지 마세요.......'.red
|
7092
|
+
puts '-[√] 챕챠 코드 code 11.......'.red
|
7093
|
+
sleep(1)
|
7094
|
+
mouse_move_percentage(0.3,0.02)
|
7095
|
+
sleep(0.5)
|
7096
|
+
left_click
|
7097
|
+
sleep(1)
|
7098
|
+
@driver.find_element(:xpath, '//*[@id="kcaptcha_image"]').click
|
7099
|
+
sleep(1)
|
7100
|
+
#@driver.manage.window.position = Selenium::WebDriver::Point.new(0, 0)
|
7101
|
+
#sleep(2)
|
7102
|
+
#@driver.manage.window.maximize
|
7103
|
+
|
7104
|
+
|
7105
|
+
el1 = @driver.find_element(:xpath, '//*[@id="kcaptcha_image"]')
|
7106
|
+
@driver.action.context_click(el1).perform
|
7107
|
+
sleep(1)
|
7108
|
+
@driver.action.key_down(:shift).key_stroke('m').key_up(:shift).perform #컨트롤+a
|
7109
|
+
#key_down('shift')
|
7110
|
+
#key_stroke('m')
|
7111
|
+
#key_up('shift')
|
7112
|
+
sleep(1)
|
7113
|
+
puts '-[√] 캡챠 코드 타겟 완료1.......'.blue
|
7114
|
+
rescue
|
7115
|
+
|
7116
|
+
end
|
6772
7117
|
end
|
6773
7118
|
end
|
6774
7119
|
end
|
@@ -7186,7 +7531,85 @@ rescue
|
|
7186
7531
|
puts '-[√] 캡챠 코드 타겟 완료2.......'.blue
|
7187
7532
|
sleep(1)
|
7188
7533
|
rescue
|
7189
|
-
|
7534
|
+
begin
|
7535
|
+
@driver.switch_to.default_content()
|
7536
|
+
sleep(1)
|
7537
|
+
@driver.find_element(:xpath, '//*[@itemname="자동등록방지"]').click
|
7538
|
+
|
7539
|
+
sleep(1)
|
7540
|
+
|
7541
|
+
el2 = @driver.find_element(:xpath, '//*[@itemname="자동등록방지"]')
|
7542
|
+
@driver.action.context_click(el2).perform
|
7543
|
+
|
7544
|
+
sleep(1)
|
7545
|
+
@driver.action.key_stroke('up')
|
7546
|
+
sleep(1)
|
7547
|
+
@driver.action.key_stroke('up')
|
7548
|
+
sleep(1)
|
7549
|
+
@driver.action.key_stroke('enter')
|
7550
|
+
sleep(1)
|
7551
|
+
begin
|
7552
|
+
# 요소 찾기 타임아웃을 7초로 설정
|
7553
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 7)
|
7554
|
+
#요소가 나타날 때까지 7초 동안 기다립니다.
|
7555
|
+
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
7556
|
+
rescue
|
7557
|
+
sleep(1)
|
7558
|
+
@driver.action.key_stroke('left')
|
7559
|
+
sleep(1)
|
7560
|
+
@driver.action.key_stroke('up')
|
7561
|
+
sleep(1)
|
7562
|
+
@driver.action.key_stroke('enter')
|
7563
|
+
sleep(1)
|
7564
|
+
# 요소 찾기 타임아웃을 7초로 설정
|
7565
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 7)
|
7566
|
+
#요소가 나타날 때까지 7초 동안 기다립니다.
|
7567
|
+
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
7568
|
+
end
|
7569
|
+
puts '-[√] 캡챠 코드 타겟 완료2.......'.blue
|
7570
|
+
sleep(1)
|
7571
|
+
rescue
|
7572
|
+
begin
|
7573
|
+
@driver.switch_to.default_content()
|
7574
|
+
sleep(1)
|
7575
|
+
@driver.find_element(:xpath, '//*[@name="wr_key"]').click
|
7576
|
+
|
7577
|
+
sleep(1)
|
7578
|
+
|
7579
|
+
el2 = @driver.find_element(:xpath, '//*[@name="wr_key"]')
|
7580
|
+
@driver.action.context_click(el2).perform
|
7581
|
+
|
7582
|
+
sleep(1)
|
7583
|
+
@driver.action.key_stroke('up')
|
7584
|
+
sleep(1)
|
7585
|
+
@driver.action.key_stroke('up')
|
7586
|
+
sleep(1)
|
7587
|
+
@driver.action.key_stroke('enter')
|
7588
|
+
sleep(1)
|
7589
|
+
begin
|
7590
|
+
# 요소 찾기 타임아웃을 7초로 설정
|
7591
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 7)
|
7592
|
+
#요소가 나타날 때까지 7초 동안 기다립니다.
|
7593
|
+
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
7594
|
+
rescue
|
7595
|
+
sleep(1)
|
7596
|
+
@driver.action.key_stroke('left')
|
7597
|
+
sleep(1)
|
7598
|
+
@driver.action.key_stroke('up')
|
7599
|
+
sleep(1)
|
7600
|
+
@driver.action.key_stroke('enter')
|
7601
|
+
sleep(1)
|
7602
|
+
# 요소 찾기 타임아웃을 7초로 설정
|
7603
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 7)
|
7604
|
+
#요소가 나타날 때까지 7초 동안 기다립니다.
|
7605
|
+
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
7606
|
+
end
|
7607
|
+
puts '-[√] 캡챠 코드 타겟 완료2.......'.blue
|
7608
|
+
sleep(1)
|
7609
|
+
rescue
|
7610
|
+
|
7611
|
+
end
|
7612
|
+
end
|
7190
7613
|
end
|
7191
7614
|
end
|
7192
7615
|
end
|
@@ -7816,9 +8239,9 @@ class Wordpress
|
|
7816
8239
|
json['url'] = '%2Fbbs%2FbuyListManager7.php'
|
7817
8240
|
json['mb_id'] = user_id.to_s
|
7818
8241
|
json['mb_password'] = user_pw.to_s
|
7819
|
-
http = HTTP.post('
|
8242
|
+
http = HTTP.post('https://marketingduo.co.kr/bbs/login_check.php', :form => json)
|
7820
8243
|
if http.to_s.length == 0
|
7821
|
-
http = HTTP.get('
|
8244
|
+
http = HTTP.get('https://marketingduo.co.kr/bbs/buyListManager7.php')
|
7822
8245
|
noko = Nokogiri::HTML(http.to_s)
|
7823
8246
|
c = noko.xpath('//*[@id="at-main"]/div/table/tbody').to_s.split('<tr>').length-1
|
7824
8247
|
for n in 1..c
|
@@ -7845,13 +8268,13 @@ class Wordpress
|
|
7845
8268
|
json['mb_id'] = 'marketingduo'
|
7846
8269
|
json['mb_password'] = 'mhhs0201'
|
7847
8270
|
|
7848
|
-
http = HTTP.post('
|
8271
|
+
http = HTTP.post('https://marketingduo.co.kr/bbs/login_check.php', :form => json)
|
7849
8272
|
cookie = Hash.new
|
7850
8273
|
http.cookies.each do |i|
|
7851
8274
|
cookie[i.to_s.split('=')[0]] = i.to_s.split('=')[1]
|
7852
8275
|
end
|
7853
8276
|
|
7854
|
-
http = HTTP.cookies(cookie).get('
|
8277
|
+
http = HTTP.cookies(cookie).get('https://marketingduo.co.kr/bbs/board.php?bo_table=product&sca=&sfl=wr_subject&sop=and&stx='+userid+'--그누보드 게시판 자동 글 등록기')
|
7855
8278
|
noko = Nokogiri::HTML(http.to_s)
|
7856
8279
|
mac_history = Array.new
|
7857
8280
|
mac_url = Array.new
|
@@ -7891,14 +8314,14 @@ class Wordpress
|
|
7891
8314
|
return 1
|
7892
8315
|
else
|
7893
8316
|
puts '신규 기기 등록'
|
7894
|
-
http = HTTP.cookies(cookie).post('
|
8317
|
+
http = HTTP.cookies(cookie).post('https://marketingduo.co.kr/bbs/write_token.php', :form => {'bo_table' => 'product'})
|
7895
8318
|
token = http.to_s.split('token":"')[1].split('"')[0]
|
7896
8319
|
year = Time.now.to_s.split(' ')[0].split('-').join('')
|
7897
8320
|
year2 = Time.now.to_s.split(' ')[1].split(':').join('')
|
7898
8321
|
uid = year+year2
|
7899
8322
|
puts uid
|
7900
8323
|
json = {'token' => token, 'uid' => uid, 'bo_table' => 'product', 'wr_id' => '0', 'wr_subject' => userid+'--그누보드 게시판 자동 글 등록기', 'wr_content' => mac_address}
|
7901
|
-
http = HTTP.cookies(cookie).post('
|
8324
|
+
http = HTTP.cookies(cookie).post('https://marketingduo.co.kr/bbs/write_update.php', :form => json)
|
7902
8325
|
return 1
|
7903
8326
|
end
|
7904
8327
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: board_posting_duo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.70
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- soonje
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: File to Clipboard gem
|
14
14
|
email: rnjstnswp123@naver.com
|