-
Notifications
You must be signed in to change notification settings - Fork 2
/
search.js
30 lines (26 loc) · 19 KB
/
search.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
bytecode = "0x606060405236156101d75760e060020a6000350463013cf08b81146101f5578063095ea7b3146103b35780630e7082031461042757806313d4bc2414610439578063149acf9a1461049d57806318160ddd146104af5780631f2dc5ef146104b857806321b5b8dd146104d8578063237e9492146104ea57806323b872dd14610547578063341458081461057a5780633fc6bc94146105835780634b6753bc146105965780634df6d6cc1461059f5780634e10c3ee146105ba578063590e1ae3146105cd578063612e45a3146105de5780636837ff1e1461067d57806370a08231146106c757806378524b2e146106ed5780637c6543031461071a57806381788e2b1461072657806381f03fcb1461073c57806382661dc4146107545780638b15a605146107735780638d69e95e1461077c5780638d7af4731461078e578063963e63c71461079d5780639ec5a894146107a6578063a3912ec8146107af578063a9059cbb146107b9578063ba1f879f146107e9578063c9d27afe14610800578063cc9ae3f614610816578063cdef91d01461082a578063dbde198814610842578063dd62ed3e14610869578063e33734fd1461089d578063e5962195146108b1578063eceb2945146108c9578063fbac395114610928575b610956600d546000906234bc00014210156109685761097033610440565b61097660043560008054829081101561000257508052600e027f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5678101547f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5668201547f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5648301546000805160206124828339815191528401547f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56d8501547f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56c8601547f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56a8701547f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5688801547f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5698901547f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5708a0154600160a060020a039687169a97997f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56598909801989760ff8181169861010090920481169794969395169391168c565b610956600435602435600160a060020a03338116600081815260136020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b610a6d600854600160a060020a031681565b6109566004355b60006000600d60005054421080156104585750600034115b80156104905750600f546101009004600160a060020a0316600014806104905750600f54600160a060020a0333811661010090920416145b15611c6357611de76104bc565b610a6d600c54600160a060020a031681565b61095660145481565b6109565b60004262127500600d600050540311156120e957506014610973565b610a6d601054600160a060020a031681565b60408051602060248035600481810135601f81018590048502860185019096528585526109569581359591946044949293909201918190840183828082843750949650505050505050600060006000600034111561130a57610002565b6109566004356024356044355b600f5460009060ff16801561056a5750600d5442115b8015611c865750611c848461092f565b61095660075481565b6109565b60038054340190556001610973565b610956600d5481565b61095660043560056020526000908152604090205460ff1681565b6109566004356024356000611c6861081a565b610a8a6000341115611ee757610002565b604080516020604435600481810135601f8101849004840285018401909552848452610956948135946024803595939460649492939101918190840183828082843750506040805160209735808a0135601f81018a90048a0283018a01909352828252969897608497919650602491909101945090925082915084018382808284375094965050933593505060a43591505060006000610a8c336106ce565b610a8a60043530600160a060020a031633600160a060020a03161415806106bd5750600160a060020a03811660009081526005602052604090205460ff16155b15611bbc57611c11565b6109566004355b600160a060020a0381166000908152601260205260409020545b919050565b61095660006301dfe20042036002600050541015611d675750426002908155600180549091028155610973565b610956600f5460ff1681565b61095660043560006000341115611d1e57610002565b61095660043560096020526000908152604090205481565b6109566004356024356000600060006000600034111561161557610002565b610956600b5481565b610a6d600454600160a060020a031681565b61095660005460001901610973565b610956600e5481565b61095660035481565b6109566001610973565b6109566004356024355b600f5460009060ff1680156107d95750600d5442115b8015611c1f5750611c1d3361092f565b610a6d600f546101009004600160a060020a031681565b6109566004356024356000600061109f336106ce565b6109565b60006000341115611c1457610002565b61095660043560066020526000908152604090205481565b6109566004356024356044356000611ccc845b600060006000600034111561211f57610002565b610956600435602435600160a060020a03828116600090815260136020908152604080832093851683529290522054610421565b610a8a6004356000341115611ce257610002565b610956600435600a6020526000908152604090205481565b604080516020606435600481810135601f81018490048402850184019095528484526109569481359460248035956044359560849492019190819084018382808284375094965050505050505060006000600034111561101057610002565b6109566004355b600160a060020a0381166000908152600a60205260408120548190811415611d6f57611de1565b60408051918252519081900360200190f35b610970610587565b90505b90565b604051808d600160a060020a031681526020018c8152602001806020018b81526020018a815260200189815260200188815260200187815260200186815260200185815260200184815260200183600160a060020a0316815260200182810382528c818154600181600116156101000203166002900481526020019150805460018160011615610100020316600290048015610a535780601f10610a2857610100808354040283529160200191610a53565b820191906000526020600020905b815481529060010190602001808311610a3657829003601f168201915b50509d505050505050505050505050505060405180910390f35b60408051600160a060020a03929092168252519081900360200190f35b005b60001415610a9957610002565b828015610ae35750866000141580610ab357508451600014155b80610acb5750600454600160a060020a038981169116145b80610ad65750600034115b80610ae357506201518084105b15610aed57610002565b82158015610baa5750610b9c88600160a060020a03811660009081526005602052604081205460ff1680610b8f5750601054600160a060020a03908116908316148015610b8f5750601060009054906101000a9004600160a060020a0316600160a060020a031663d2cc718f6040518160e060020a0281526004018090506020604051808303816000876161da5a03f115610002575050604051516007541190505b156122e9575060016106e8565b1580610baa57506202a30084105b15610bb457610002565b600f5460ff161580610bc75750600d5442105b80610bdc5750600b5434108015610bdc575082155b15610be657610002565b600854600160a060020a03908116908916148015610c05575060035487115b15610c0f57610002565b428442011015610c1e57610002565b6000805460018101808355909190828015829011610c5557600e0281600e028360005260206000209182019101610c559190610d1a565b505060008054929450918491508110156100025750808052600e83026000805160206124828339815191520190508054600160a060020a031916891781556001818101899055875160028084018054600082815260209081902096975091959481161561010002600019011691909104601f908101829004840193918b0190839010610e1257805160ff19168380011785555b50610e42929150610dfa565b5050600060098201819055600a820155600d81018054600160a060020a03191690556001015b80821115610e0e578054600160a060020a03191681556000600182810182905560028084018054848255909281161561010002600019011604601f819010610de057505b506000600383018190556004808401805461ffff19169055600584018290556006840182905560078401805460ff191690556008840180548382559083526020909220610cf4929091028101905b80821115610e0e57600080825560018201818155600283019190915560039091018054600160a060020a0319169055610dac565b601f016020900490600052602060002090810190610d5e91905b80821115610e0e5760008155600101610dfa565b5090565b82800160010185558215610ce8579182015b82811115610ce8578251826000505591602001919060010190610e24565b50508787866040518084600160a060020a0316606060020a0281526014018381526020018280519060200190808383829060006004602084601f0104600f02600301f150905001935050505060405180910390208160050160005081905550834201816003016000508190555060018160040160006101000a81548160ff02191690830217905550828160070160006101000a81548160ff021916908302179055508215610f285760088101805460018101808355909190828015829011610f2357600402816004028360005260206000209182019101610f239190610dac565b505050505b3381600d0160006101000a815481600160a060020a0302191690830217905550348160060160005081905550817f5790de2c279e58269b93b12828f56fd5f2bc8ad15e61ce08572585c81a38756f8989868a6040518085600160a060020a03168152602001848152602001838152602001806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f168015610ff55780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a2509695505050505050565b6000805487908110156100025750808052600e870260008051602061248283398151915201905090508484846040518084600160a060020a0316606060020a0281526014018381526020018280519060200190808383829060006004602084601f0104600f02600301f15090500193505050506040518091039020816005016000505414915050949350505050565b600014156110ac57610002565b60003411156110ba57610002565b6000805485908110156100025750600160a060020a0333168152600e85027f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56e810160205260409091205460008051602061248283398151915291909101915060ff16806111335750600c810160205260406000205460ff165b80611142575060038101544210155b1561114c57610002565b821561119257600160a060020a0333166000908152601260209081526040808320546009850180549091019055600b84019091529020805460ff191660011790556111ce565b600160a060020a033316600090815260126020908152604080832054600a850180549091019055600c84019091529020805460ff191660011790555b600160a060020a0333166000908152600a602052604081205414156111fa57604060002084905561126f565b600160a060020a0333166000908152600a60205260408120548154811015610002579080527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e566600e9190910201546003820154111561126f57600160a060020a0333166000908152600a602052604090208490555b604080518481529051600160a060020a0333169186917f86abfce99b7dd908bec0169288797f85049ec73cbe046ed9de818fab3a497ae09181900360200190a35092915050565b426002555b60048201805460ff191690556040805184815260208101839052815187927fdfc78bdca8e3e0b18c16c5c99323c6cb9eb5e00afde190b4e7273f5158702b07928290030190a25b505092915050565b60008054869081101561000257508052600e85027f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5668101546000805160206124828339815191529190910192504210806113695750600482015460ff16155b806113ea57508160000160009054906101000a9004600160a060020a03168260010160005054856040518084600160a060020a0316606060020a0281526014018381526020018280519060200190808383829060006004602084601f0104600f02600301f15090500193505050506040518091039020826005016000505414155b156113f457610002565b600782015460ff16156114125760048201805460ff19169055611302565b506001810154600a82015460098301540190611450905b60075460145460015430600160a060020a03163190920160030281840204919004016106e8565b811015801561146757506009820154600a83015490115b1561149f576040516006830154600d840154600160a060020a0316916000919082818181858883f1935050505015156114ad57610002565b60018201546115c690611429565b604051600183015483548651600160a060020a03919091169287918190602084810191908190849082908590600090600490601f850104600f02600301f150905090810190601f1680156115155780820380516001836020036101000a031916815260200191505b5091505060006040518083038185876185025a03f192505050151561153957610002565b60048201805461ff00191661010017905542600255600854825460019450600160a060020a039081169116141561157c578183015460035410156115b257610002565b60018201805430600160a060020a031660009081526006602052604090208054919091019055546007805490910190555b6112bb565b6001820154600380549190910390556115ad565b81101580156115dd57506009820154600a83015410155b156112bb576040516006830154600d840154600160a060020a0316916000919082818181858883f1935050505015156112b657610002565b61161e336106ce565b6000141561162b57610002565b6000805487908110156100025750808052600e8702600080516020612482833981519152019050600381015490935042108061166f5750600383015462360d800142115b8061168857508254600160a060020a0390811690861614155b806116985750600783015460ff16155b806116be5750600160a060020a0333166000908152600b8401602052604090205460ff16155b806116e15750600160a060020a0333166000908152600a60205260409020548614155b156116eb57610002565b600883018054600090811015610002579081526020812060030154600160a060020a031614156118635761194d85604051600090600160a060020a038316907feaa602bff84cc95bf1b06084485d789e35140c4931eeca8a3b6eb0ed87d74917908390a260408051600c547f0b6d8d52000000000000000000000000000000000000000000000000000000008252600160a060020a0385811660048401526024830185905262375f00420160448401529251921691630b6d8d5291606480820192602092909190829003018187876161da5a03f1156100025750506040515191506106e89050565b600883018054600685015430600160a060020a0316310391906000908110156100025781815260208082209390935530600160a060020a031681526006909252604082205481549092908110156100025790815260208120905060020155601454600884018054600090811015610002579081526020812090506001015560048301805461ff0019166101001790555b60088301805460009081101561000257815482825260208220600101549291908110156100025790815260208120905054600160a060020a033316600090815260126020526040812054600887018054939091029390930494509081101561000257908152602081209050604080516003909201547f13d4bc24000000000000000000000000000000000000000000000000000000008352600160a060020a03338116600485015291519116916313d4bc24918591602481810192602092909190829003018185886185025a03f115610002575050604051516000141591506119c3905057610002565b60088401805460009081101561000257818152602081206003018054600160a060020a03191690931790925580549091908110156100025790815260208120905060030154600160a060020a0316600014156119a857610002565b600683015430600160a060020a03163110156117d357610002565b60088301805460009081101561000257815482825260208220600101549291908110156100025790815260208120905060020154600160a060020a0333166000908152601260205260408120546008870180549390910293909304935083926006928290811015610002575260208120815060030154600160a060020a03908116825260208281019390935260409182016000908120805490950190945530168352600690915290205481901015611a7a57610002565b30600160a060020a039081166000908152600660209081526040808320805486900390553393909316808352601282528383205484519081529351929390927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a36012600050600033600160a060020a0316815260200190815260200160002060005054601460008282825054039250508190555060006012600050600033600160a060020a03168152602001908152602001600020600050819055506009600050600033600160a060020a0316815260200190815260200160002060005054600960005060008560080160005060008154811015610002575060408083209183526020832060030154600160a060020a0390811684529083208054909501909455339390931681529091555060019695505050505050565b604051600160a060020a0382811691309091163190600081818185876185025a03f150505030600160a060020a0316600081815260066020526040808220805494835290822080549490940190935590815290555b50565b61097033610855565b155b8015611c3a5750611c3a3384845b60006000612282856106ce565b8015611c565750611c568383600060003411156122f157610002565b15611c6357506001610421565b610002565b1515611c7357610002565b611c7d83836107c3565b9050610421565b155b8015611c985750611c98848484611c2d565b8015611cb55750611cb58484846000600034111561239657610002565b15611c6357506001611cc5565b90505b9392505050565b1515611cd757610002565b611cc2848484610554565b30600160a060020a031633600160a060020a0316141580611d0f5750600a30600160a060020a0316310481115b15611d1957610002565b600b55565b600454600160a060020a03908116339190911614611d3b57610002565b50600160a060020a0381166000908152600560205260409020805460ff191660019081179091556106e8565b506000610973565b600160a060020a0383166000908152600a6020526040812054815481101561000257818052600e02600080516020612482833981519152019050600481015490915060ff161515611ddc57600160a060020a0383166000908152600a602052604081208190559150611de1565b600191505b50919050565b604051601054601434908102939093049350600160a060020a03169183900390600081818185876185025a03f150505050600160a060020a038316600081815260126020908152604080832080548601905560148054860190556011825291829020805434019055815184815291517f8338662358e4188b6716fe38d845443fe23e7dc9dcb10134fd37212b629d14299281900390910190a2600e5460145410801590611e975750600f5460ff16155b15611ddc57600f805460ff1916600117905560145460408051918252517f1cd7dc2099d68adfb48eff32e7ecb17e2718d79a60bec1742103cb6f68c07c939181900360200190a160019150611de1565b600d5442118015611efb5750600f5460ff16155b156120e757601054604080517fd2cc718f0000000000000000000000000000000000000000000000000000000081529051600160a060020a039290921691630221038a913091849163d2cc718f91600482810192602092919082900301816000876161da5a03f1156100025750506040805180517f0221038a000000000000000000000000000000000000000000000000000000008252600160a060020a039490941660048201526024810193909352516044808401936020935082900301816000876161da5a03f11561000257505060408051600160a060020a03331660008181526011602052928320549093509181818185876185025a03f192505050156120e75733600160a060020a03167fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d6011600050600033600160a060020a03168152602001908152602001600020600050546040518082815260200191505060405180910390a26012600050600033600160a060020a0316815260200190815260200160002060005054601460008282825054039250508190555060006012600050600033600160a060020a031681526020019081526020016000206000508190555060006011600050600033600160a060020a03168152602001908152602001600020600050819055505b565b4262054600600d60005054031115612117576201518062127500600d60005054034203046014019050610973565b50601e610973565b600160a060020a0384811660009081526006602052604080822054601454309094168352912054909190612152876106ce565b02040191506009600050600085600160a060020a0316815260200190815260200160002060005054600760005054600860009054906101000a9004600160a060020a0316600160a060020a031663d2cc718f6040518160e060020a0281526004018090506020604051808303816000876161da5a03f1156100025750505060405180519060200150840204039050600860009054906101000a9004600160a060020a0316600160a060020a0316630221038a85836040518360e060020a0281526004018083600160a060020a03168152602001828152602001925050506020604051808303816000876161da5a03f115610002575050604051511515905061225957610002565b600160a060020a0384166000908152600960205260409020805482019055600192505050919050565b600160a060020a0386166000908152600960205260409020548085029190910491508111156122b057610002565b600160a060020a038581166000908152600960205260408082208054859003905591861681522080548201905560019150509392505050565b5060006106e8565b600160a060020a03331660009081526012602052604090205482901080159061231a5750600082115b1561238e57600160a060020a03338116600081815260126020908152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a3506001610421565b506000610421565b600160a060020a0384166000908152601260205260409020548290108015906123df57506013602090815260406000818120600160a060020a0333168252909252902054829010155b80156123eb5750600082115b1561247a57600160a060020a0383811660008181526012602090815260408083208054880190558885168084528184208054899003905560138352818420339690961684529482529182902080548790039055815186815291519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a3506001611cc5565b506000611cc556290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563";
start_block = 834006;
stop_block = 834907;
function searchForBlock() {
while(start_block < stop_block){
i = 0;
trans = eth.getBlock(start_block).transactions;
while(trans[i] != undefined) {
address = eth.getTransactionReceipt(trans[i]).contractAddress;
if (address == null){
i++;
continue;
}
code = eth.getCode(address);
if(code == bytecode){
console.log("succcess");
console.log(address);
return;
}
i++;
}
start_block++;
}
}
// execute
searchForBlock();