Last active
June 3, 2020 03:15
-
-
Save overtrue/1b4c839c429c586fe3a4a504851e03dc to your computer and use it in GitHub Desktop.
KillWeiboDogs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. 使用 chrome 打开 weibo.com (确保你登录了微博) | |
// 2. 打开调试窗口,在 console 中贴下面的代码后回车 | |
// 数据来自:https://github.com/yu961549745/WeiboBlackList | |
let dogs = [ 5471246591, 5209943797, 1709070650, 1887921907, 1824515351, 6031549751, 3477430640, 5303365027, 2397004535, 5014141958, 2357033797, 2253196910, 1282371413, 5433169859, 5577097996, 2477460747, 5791757379, 3973075219, 5480191060, 5064046310, 1794010902, 5241254653, 1775613335, 1749775825, 2898929101, 1766122373, 5330205046, 5836217079, 2143736030, 5088125436, 2122838230, 2379528185, 5768433920, 1588830357, 2734746975, 1702267517, 3305446403, 1922854483, 2240459775, 1713064495, 3141318761, 3049734521, 1297708027, 1670201221, 1113091931, 2682353630, 1889031894, 5736617825, 5573535479, 1787098822, 5474940961, 2647495542, 1978558182, 5675487085, 2066669447, 1410124131, 3318338712, 5117947348, 5984813988, 1935760780, 2106405744, 1658278557, 3123751063, 2418980745, 5612086708, 2822792580, 2728966594, 5651704821, 3174983660, 2884830430, 1409910532, 5289026864, 5460203843, 3040936547, 1800337273, 2018658895, 2405534261, 1723514521, 2885255711, 3182406654, 1903526513, 5293944806, 5666501360, 5608396703, 1913954770, 2278235085, 2372605411, 3029972167, 1692539731, 1651941013, 1840691947, 1642272495, 5897838856, 1674071682, 5091407789, 2806325147, 1748068057, 1906882191, 1998946093, 1912093364, 1484598381, 1997378897, 5638719581, 3975089454, 1657591691, 2697385482, 2284453344, 3732639263, 3951103736, 3173184517, 2612327705, 3087942931, 5785115772, 1570016173, 3271453730, 5671059533, 2102856290, 5623348537, 1762706205, 3653593281, 3840668734, 3688212085, 5700197684, 2928485055, 1945405223, 1926551181, 2162805902, 3212011227, 2640428811, 1918951193, 5623807609, 2112270821, 2313693972, 5284893156, 5527313256, 1703425261, 3209603200, 5532217137, 1900227754, 1723829324, 5865752737, 5935347929, 1666599012, 2314537334, 5603635635, 1851473734, 3116637797, 1344227894, 1909976992, 5020561830, 2042399737, 2504697545, 2335060081, 1696020927, 2265908004, 5344857001, 5174465539, 1839857351, 2722174021, 1348513711, 5532760509, 3496397221, 5379446771, 3626867120, 2348122654, 3974845528, 5801787915, 5100461906, 5464167149, 2950667711, 2238168285, 2645791712, 1743339141, 5623141879, 2546098600, 1823809197, 3848022748, 1649399345, 5697134119, 1693311335, 3190150355, 3050240134, 5580658563, 2369809515, 2639227461, 5623426877, 2945247480, 5253184819, 1690768907, 1694432737, 2345546897, 2667538945, 3621477511, 5131325967, 2334239593, 1777066395, 5219639005, 3189759282, 5760170376, 1377355290, 2520087880, 2626927361, 2455841223, 1889134740, 5059660551, 2611833450, 3590871057, 2633113967, 2714032523, 2930803125, 5063137160, 1405603123, 1739901115, 1789012593, 1280076535, 1391753093, 2531539783, 3607995250, 2308673977, 5158649359, 3261813374, 1852654103, 1885151102, 1725382803, 2766875143, 2614001562, 2826064925, 3184382850, 3159428572, 3979935493, 2720249823, 5146736086, 1926049617, 5031178946, 1234596492, 1283164021, 2205748423, 5571318748, 2661497287, 1997430313, 1954784600, 1613374674, 2681947182, 2195788654, 1790761961, 3715209581, 2622596227, 3932807856, 5580805844, 1653282974, 3358412904, 2346920665, 2369379394, 2095876615, 2119241041, 1525088397, 5675315465, 5868076583, 2330760312, 1765697405, 2708646527, 3280723341, 2400240411, 2850809427, 2614021785, 3078648857, 1111681197, 2715025067, 5743923782, 1265924373, 2528679641, 2033027873, 3230430014, 1751984912, 5450391911, 5926708754, 3440572154, 3157925462, 2932864527, 1893935004, 5613090845, 5108266451, 5426142115, 5248677108, 5674309904, 3481223447, 1954898722, 2731660797, 1403386141, 3226484780, 1680200411, 3786906784, 5364715873, 1889196427, 2875970310, 1732644913, 3170766712, 5038577367, 5235386046, 2274697173, 1736263965, 5116356922, 2934233095, 2219194830, 3240801333, 2992328377, 2694782097, 2803232204, 5381670096, 3685778045, 3206497323, 3545020587, 1041574032, 1282270102, 1775137910, 2610418693, 5976260575, 2045592021, 2847093540, 1682814920, 5012841321, 2360180761, 5343922833, 2963677843, 5243453050, 2571150711, 1859851754, 1782621495, 5682654049, 5640104831, 5651760514, 5226057797, 1737647831, 3065984831, 5898198360, 2468501370, 1937256124, 1305476450, 5088735141, 2849310171, 1943922885, 2170039871, 1505700263, 2407242912, 3235318832, 2709630325, 3051758861, 1920072325, 2922879225, 5158202693, 1749915415, 2401943477, 2518478637, 5338487311, 2829636631, 1632909860, 2202943573, 1774274405, 5515844015, 2401393393, 3168778251, 5589635076, 5380177988, 5657339966, 3738206370, 3703933374, 5092428322, 5752569967, 1790670015, 1495485357, 1985427375, 1759547087, 3831030697, 3397040152, 3209288190, 5669707661, 1851422170, 5634119774, 1781422637, 3030609907, 5150952118, 5207740184, 1824581023, 1745662665, 3592365365, 2561438355, 5454695683, 5422224270, 2299029823, 5078081210, 5942111104, 2970479921, 5686037085, 1755296263, 5973491890, 2301685773, 2877375185, 5488212817, 5816398532, 1884323354, 2650419291, 3786523043, 2669651422, 2355873243, 5142938036, 1429791521, 5106709983, 5398364817, 5895880265, 1736279014, 5444593531, 1892841767, 1891031660, 1579272310, 3287527637, 1719198895, 3948881580, 1374321134, 5182575519, 2509792793, 3756087501, 2515684791, 1781387491, 1934183965, 2286908003, 2810373291,] | |
let http = new XMLHttpRequest() | |
let i = 0 | |
let timer = null | |
function kill() { | |
if (i >= dogs.length) { | |
return clearInterval(timer) | |
} | |
let dogId = dogs[i] | |
let url = 'http://weibo.com/aj/filter/block?ajwvr=6' | |
http.open('POST', url, true) | |
http.setRequestHeader('Content-type', 'application/x-www-form-urlencoded') | |
http.send('uid='+dogId+'&filter_type=1&status=1&interact=1&follow=1') | |
http.onreadystatechange = function() { | |
if (http.readyState != 4 || http.status != 200) { | |
return; | |
} | |
let data = { | |
msg: '解析失败' | |
} | |
try { | |
data = JSON.parse(http.responseText) | |
} catch (err) { | |
} | |
if (data.code == 100000) { | |
console.log(i + '[' + dogId + '] => 成功:' + data.msg + ' - ' + http.status + ' - ' + http.responseText) | |
} else { | |
console.error(i + '[' + dogId + '] => 失败:' + data.msg + ' - ' + http.status + ' - ' + http.responseText) | |
} | |
} | |
i++ | |
} | |
timer = setInterval(kill, 1000) |
打开https版的新浪微博请把第17行的 http://weibo.com/aj/filter/block?ajwvr=6 换成 https://weibo.com/aj/filter/block?ajwvr=6 然后再运行
打开http版的新浪微博直接复制进console里运行就行
@nic444 你在这个页面已经运行过一次了。刷新一下再重新运行吧
是要改成这个 let url = 'https://weibo.com/aj/filter/block?ajwvr=6' 然后F12 选择console 粘贴 按回国键 OK。
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
显示这个,是为什么?
VM1724:1 Uncaught SyntaxError: Identifier 'dogs' has already been declared
at :1:1
(anonymous) @ VM1724:1
7VM1685:16 Refused to connect to 'http://weibo.com/aj/filter/block?ajwvr=6' because it violates the following Content Security Policy directive: "connect-src 'self' uploads.github.com status.github.com collector.githubapp.com api.github.com www.google-analytics.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com wss://live.github.com".
kill @ VM1685:16
setInterval (async)
(anonymous) @ VM1685:39