Skip to content

Commit

Permalink
add scan 2024 ctf quals
Browse files Browse the repository at this point in the history
  • Loading branch information
minaminao committed Nov 3, 2024
1 parent a0f9259 commit f1680c4
Show file tree
Hide file tree
Showing 43 changed files with 18,303 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/Scan2024CTF/Bridge/bridge4_solver.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import subprocess
from bridge4_txlist import txlist
from tqdm import tqdm

registered_operators = [
"0x0725EdCF85A4A4eB9820cE1caE2C3E1D380C6555",
"0x2B217F0205a52A6B9E02B92a98EafB8234EbA4A4",
"0x4FfA987E473FDB6852844a8A567611c93be8814c",
"0x78c3F80436dF8b55c462F3d3651e411F90069691",
"0x7F84691a6d962EC493fd4a2b36156d8BDEC7AbAC",
"0x8bbdb96633064Dc564760b404866e768283573b1",
"0x95Eb34fFD1Ff53430d3ac353E876428c5B88C5Ec",
"0xa8c37372480e04A5D6b0403871b177146F91f065",
"0xE6B1B6e65dF8CbaA7fD25200504325cC5B394ff2",
"0xFcC7b4F4fe4A40ebC8948fC9005D2788E4c7919F",
]

for txhash in tqdm(txlist):
cmd = f"cast run {txhash} --quick"
result = subprocess.check_output(cmd, shell=True).decode("utf-8")
for line in result.split("\n"):
if "[Return]" not in line:
continue
if any(
operator.lower() in line.lower().replace("0x000000000000000000000000", "0x")
for operator in registered_operators
):
break
print(txhash)
exit(0)
5 changes: 5 additions & 0 deletions src/Scan2024CTF/Bridge/bridge4_txlist.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
txlist = [
"0x0bb90cd69411538f99bdcd79f7498d3b305552f3e15f32525044d66260c86726","0x2fd871672218009a3e8c8c9fcbd2316da3407d33e9c9f4f7df18c95de2dd8297","0xd3ff58e0aae2656604358831ecd0b67ef7476438240cc87dcc18908dca4721db","0x4d6903ccf486f56a72b08ac1bc0467944e5263f9c9ba1cb8e2dd623b46d86baf","0x6de1f3d52d59d497ad83251b4d2ae1326408e55205ec8f0459a8b1ea6dcfa391","0x0088cb33389028d21112a06faf2481524cf4bbddb0b58c411af6bbd91c790850","0x73ea60816341ee6b7597b35c8d7540f040ed644fcd00e2e13a25a2b1538dd9b0","0x329ccd0109b4a2664efb3bfc772bada5854270aed406579618176d3398ab023f","0xce0ac8eae873c7f262af16a451960fae535d2bf2d7fbf60a79e1a4568809e93d","0x70642f7c1477c66cc26fe79b0a535a18a3477eced2cccc3aa9e5f6446640be42","0xcdd798b4f9dd7e1db4080e01084a0e3ac2f2d3ea078430d31db9f0903ba45e13","0xe1e35dd4c8c0e31eeac0bfb47bc4d86238fd40cd2577ec9cd71c18985e902cda","0x678632f1e38aa20fed2f1e25f98a533acd7b71f3f2dd7a319c5fdf3bf322fe78","0x799bc0562db76852deccb921edb5f6cd60fce5c88b40bc7296d090a4fc9c083c","0xa687cab0dea97853f9135d9ec4d3a7875527a9686058929ebdbcb9ba938329de","0x1d51a90b405aaa38ad5f264e56aebd0659765884e527540f4d6707c128be9c30","0xadf93d136c43b60e9ddb88a017ebff63438aa4c05d37a1a3e7359f1b2fa7a932","0xd2bb98ed93a9148ced1bd02a64399785017491352df65b49f2f06e2638642ba3","0x4cff2a5ce4816508ee836cfed9e84fd197fd9c18e340146e75ece58d58bd6cd8","0x0f80a5353f8c4fee4c26cb9e4a2a76274345ae6858a6c76650dbdec05ed8d671","0x0a84bf98fd0a287dd8457031af77d3cce8990a0c1d5b89ca342aef822f5f7f08","0x984c58a019c315cfc2e04b97b72e3fab2635a88a1374015035ed5547c2e129bb","0x27ec15bacb597aea2da152925a5743bf111763f8b50b9c9e1652e8a49ece6309","0xbfffc782744d7f78b0c0f82a24bd61215b6f787929e302237ddaea46c90dd2be","0xf5ede60fe5f454aff3bd1c7015a52d8a75e28ffba6b030f1f0207904d3759dba","0x4b4644c4f7faabb4b8c06d6152acca7e07ca4ce0df44eeaf4b955229c83a421a","0xc924dbce4e067df3b48f53c08b45ee6ef86504cea90fee1567e973a655fbf72e","0x72812333b795d27524dd1422decff578ddac85d4b7607af43b5f868d1a3a6338","0x38962716ac206307603bf7d4b667ea6fe2b8071bc13e88c6576a319c7ce779ad",
"0x7573e4bc49c61c39797fc154ec537c9e770690ec3100db203cb26893b7bce4bc","0xf6fa6efb6919a2a03dcd5b2f7d28e5c834ec2548b1d725dbe69dcaed627df5c7","0xa9c059807e27d9eefdf8a7a10238efc446a93b9020650e20727e6d2ce029ae8f","0x29da7ec03e5de6e90f76b72aea4d47a725daf8d956cf024b07028471539f0a2c","0x8bec27a055260e95c4923e96de1f586b0cd459bfee3b41c227a03cfcdd3ba768","0x90fb775b0cef4c1b60418150014c2bb1b61555884d0fa2977319724f9924e1c1","0xb48a1d726f08117fc12db7c616f8058640c6c193846e0ba74a6df38e6e5287a9","0x798ea5ca3f59706a0a574ccdec21b8403e6c14cfe5576ccb9ccb76dd7df97983","0x0cc9bed1ec5a6ccbdd8e4e46321412f4ddb63241e98c424637664ef076b3f6ad","0x3740691a5d5ca61b7e81fa50913476e55d765139729699dc247555d9e0d390ff","0x1be10bd8696c127b55eb72d017782d2284201a46070498848450afdf6e7eadf0","0x7ba71ab86103c158bb5649f9e7fdf8c723665a297b20559472c8c7170c4c2b21","0xfe522367ee862798cf35d7d6053a0c17c68964c856530794023e1a4b543f6281","0x91e287e586683778edcb79f02d508e3535dde1d2bfc3b8da586faced86b612c5","0xe7b641bb54c3c5ca2622bb9cd67fda9dc44f6f6e1d745f7e248567b82f700df4","0xb5c9ae140bed3a5c3b3043498a23ab7e6f946843a3f5d8f301e4fc177bfcc13b","0xfd35c100c555941232c5e306e4e5c3cc66705a3eff3f5e1c9654681dd50c2c8a","0xe30b0345b6d4ae198e4fbb540c4c6f6ac709b042065c5997582d0d8936ad6e12","0x589b0eb6c989079ed51c76db491b880e01064e4804a6c885df6fbe943904cb7a","0xe52187991a2e8500f7fafb30bd1a3677d04a5f72532c01cb96b01c243a27ad3a","0x890a5f8c6087bbb22c8f6db67f1c4bd7ddaebe235a6a3d87f43338f0a022a8f8","0x627e3e64a6ee0b18c87a272618931c862b71a98bd4acb375662fd042a2a8d272","0x52cd30597a4590467dd1994a7af8951360fe602fa3a728ee67aa4c312c13686d","0xdb87de61cbbec33d344e46751b4daf40e756f8a402457541460427f32c8a76fe","0xe5fd4562b7539d66687e553a3033ed2a6b04866c4dc93bc212dd4e89d65d4730","0x23db205b718523efe2d03ba5888de83543feb48bd6ffceed354c2abda1383f94","0x9fac56f0ab97223a16f38fe9657e4d6ac10daed5fcc235a4d4a7eb3fa2092360","0xbb1ea757ba64f358b289c006c12208c05d41c483c2801d4fdd983efc9643906d","0xd52b34a58abe588145595539b02d9449a326e89e0dd185fa461d0f8b845e203c","0x003f96de16d0a48dd021d4548bff9bf387ba8b51eed87874504d43711b6e3cb5","0x19c6ba46d176f0c2e09c9abbc9e25f5f4185350735f9a0c48df2c6d27b68dad2","0xf4937746ed0214b9247825e2cf6ec6543883779886fc01e80d9d73e83c45c6cc","0xe6851a4138f630bc711685fffd7d256a76a3949bb96eea0b3baaf41ba8c2ca6b","0x03de220829ed09725d4dd6d50fff6456b0bf1918667e7795d1be658a1cb547f3","0x6534de61f29c936b1560fe390a2a59196cbafde6a277102f8ec121fdcd5f2097","0x816248b15ab574fc85f9e3c1f3c16a05011b7c0fa00e6efea5c4259034ebadae","0xc248117663ec45c84bda3caf7c7e136395f657651bde6888b94a01e8281a7221","0x7c9c59e7429535a4e8452d33abedff2da6ff6ff3603084f4dce360377a57c74f","0x97ade864c1fd48775634ea8269f655f1cca3f0aaf855a1f07339fd673dac2d97","0x481adebe98401430957da7334289b1fce29e7aa7f8868d3e851bfe0e73bc4396","0xc32f0334a75b8160be7a143fe012ed97c3a787efe29d5fd77136e6b42315ca57","0x65756405926ced5ffd525b02902702ade733c5a4370a3e7e16a7d315f2949721","0x03ac29a023851513fd5da8afb63b82d744d2d62f381df16e4b2b774f69a5a7e5","0x83e3bc8d5c9c53a295cdc2203817801fe5424cde7034661c9fd0a61e221a6703","0x93081a79ebf2445f8bb5cb66a6301f3536ef412c0c73823f565e6716b92320f3","0x86de2353475948c437ecc0525ad71c353f10f06725d6cc5b946ab12400872b4e","0x1aefb0e3240dc8d777a8f9919ce4d0c76f0191cd1d2c3cd0ee6a42a06348abb8","0x08ef7c716d25a7c1adea67496d497f963ef0eb7cf94e77d611cf3236d2b27a5e","0x84d82aad25ff4b5e29603b8e42e69b1aff26d63b42ba3c87a41106652af547fe","0xe023cf94c6b66591a88ecb043273403ec9a798ae5e1493338ea5122916af5cf9","0x75e12d2980155def7f7e15a92504d20ccdbd20d14e0c247a109131d42246ff8e","0x1fa335677cdd48782772f22fb1a16575e69709a0f7a1168bef755e4421cf9aa4","0xc1f1fbb175059b0ecb88e66775153217dda00069634f2c9144b071cd074c229a","0x77b5f44623d585e9c220f4ed9e90ce32ff70a436c7ad46cc6496dfb9f534c12f","0x145089420b58a571387d99019342e9de00070dd9c5e295dc77fa2e7d863da5cb","0xfa03f0b2e8721236af2f6c18875531fecf66cf5def53c0cb292e9d88c7e6a8c6","0xe3d0ba59826267f1d4dddb223148c6f940cf49fb3aeccbd95d53980a8eac3014","0x8282a3a8d651b8f8497a47257939dc85239c48af43b2fe05d8bd094723e85a71","0xfb1b7162ec615459f49a6caf81dacbb7797c0196612dfd9f18b1bb356efce2fd","0x230f0ec895fc5eec743b0a08a6ee5234eb7e882263d8acee4e516c468718c7e2","0x245832b182b57aac0dfebb2f0e8b26e0fe53c887a72d118a1ef292bd7d16812b","0xbe18005fd835902304ddb05ccadf1fdfc85bf01f34f6448f9a7a7c25709643b4","0x74cbbf4b60574c67f0bacb21614a82cc30da2992d477dcd09e6156b49b82d86f","0x1f14810a6ce92cbf38957a9bf7dc0b3e75b219582706cd728f7749ada8c29adf","0xf812840416f414023dc6ea844382358db1eede408b8a30c901ae4a56550d1444","0x118f7034f1a140b1f56ee37dbdf8e658dda060bc8e0708f76ad9ad541442a4d0","0x8abbfc99625b4c91074f6b9a3f96177ff6db1b1a8c9eb296e45a02a8d2afd89b","0x3603d4bd3cb2efc2f61d5cff99c717efab02056e4b06f16a9dbde5f7d2a0703f","0x06fed04399ffd71330e0766e553fe95a293af9cd9058329b7c3dba0f318eb51a","0x8acce71ff7d5af82dd12d7e50f7f1263d60ebb8314b1c4049132ef21cc7ed0f6","0x0e119c44839b3ac876c540d77bc44fef754caff1f4abf469a141af96c9124c6c","0xe8993d48e4bc7c46d9aa77e34af7e6dbd6a9b88ebb7c416bf10d4b0cd8f5ace4","0x84996b4ffb3258bee5aa0c4a8c4144c56f69fb075cdb5e4fe234a3713e194ec2","0x6eafbaddfac9bfcff01a2d26fe58a4121705bd101933abf0fcffd639921f2087","0xf7d58662802f3bb4cf642be972e90369da904e0544db5b6317288f6565a59474","0xce2b8a5cce3f499bc53a6d667b7f6003fab2166abb5ccb4c0b4e3050c480ed75","0x0d3a1b34560bf4f059815868bf012d42ddf99a5ed66b3e9cdbf01c0663a4d1d6","0x611ef0b8794cbc09b165c859dad1456ecdc0e2ce0996ad80f587febab2ac98b7","0x58171ab6f5464c695cb4444e08f6642489dc3aecb184449dbd75bccfe0219d64","0x44df38ea41f4a5eaaa91debb870d891807c5d80a1e0a4405729a734aa51cf800","0x089c7858a72f9e6774ccbb989ecb86a31b8aa45c3dbf7a545833c6b114cecaed","0x900252ca7cedab4f0155e4f9efda9a014972df361dfc2fb2b43da0a9c2ad0eae","0x8c099125be54056a699f79698207788cc8904457ca3b97349ef3a056ea3c6816","0xd14a0137605634afc2513646e78ebc0edfa32c4bc395bd6b6a7b06cf6c3a9c31","0x6e98096a65286d835728953c2f8e405175ccbaa96adf4439704cef91427a2956","0x0b3b9a8a824f783d9fdf47fcf28290d3b75cb155826e0b0b3267c3f85f9db123","0x076edf970287e6da99590bbc06147cd7426f54883e544354911a1927ff8a625e","0xe55f6a674a478522fce7f94e212fac7cb58013780068f445c59c705c5f1ebb9d","0x6bb48dfba37ec8312647a0ea97ce98de62fa135944e06f2bdc9de363d77d20c6","0x2bbfa73104de8bc27af5378d187ca3933ed775dce39566e2f6927e4ad162aa26","0x7365a1468953b43a47f70dda46b02edeb73aeecc6bcc23dad7ee1f3ec1628e93","0x0ee12b84d1cc966bcb76bb7922a93b50362efce2dbe5ad119909cdd28f772e76","0x7a18eb2192948fda00d0f5aa0cc11eda1e542b05e710e8118476e475c4345b4d","0x463f686e7b480092a30882e3674be5a1db73fbe09420e7e5d4b9cab297e86aa9","0x01112538645736f7b5602e82a4327d2d53adcb8ce63f063c80bd4de8118e7b06","0x8ab945d29cd6967097e9ac6c9834ab3b5996fa8064d4f42560d97170f2da6405","0x7dee2d742aaff7ca4f14a6b397d2c5e581d008d21e738a26715f800cae32532b","0x07bb7250bc4d24d4b54d34746f0a23e59eaea2012e350ed0675855579614d289","0xb51c0cfacd536d6212eb61dfc28af14cf5f2c99c1df919f5b18016d9bf7e1903","0x6d19c9d3b7693606a55d597e432a54386753b0611a015b0bc427ae65500d65b7",
"0x1459977757926f46831d378db587ac38b697396ae81fa651eb441e82c0086b5b","0x97f265d645beaa79f076ecced23b23084f2b571ddbc1d9628e7e49e83adcc6da","0x5cbe96a26dd7129439904de97bb834c0a091199ca0bd156c32975d0ec5df176a","0x106d48b916f1286191a093a105cb90b2a882f3adff5ff2fae6685dfd854828d1","0xda312e893f4fa8e5662cb87160cbfb6337d3bb688fa0617ef33a13ed93a19f82","0xb88a2554df200399ddd034cc0086336c11baee36c787cb7be98b0c257a660f15","0xaf4bc4f1b1ee04d05ee178034edd63cfa9aa3b4d28170b86c6feaa52f6006609","0x5bca3ffa39b716515fe136971e476c533c3c6937f46a0de58a947816b23ca9b0","0x8c134360a022821a8b52231c2b427bca0e61222814b09eec6831499d5967fdfa","0x8f20c36a6ffa3f3ee8a3c3f1dd4b33805ff5aa0e4b8e7454580eb89702e928e1","0x12fa619bfab1ba4e46e3071355c8e37e770ff5eb7db10233472ea5b86dafcddc","0x816075d5b483cd35b4f746c12071a0a80a0e89e6dc777c9cbf75e98200c85cfc","0x1845a356a5e712a0aef22c93d09648e00ca3c8c527b928664fd9476a19ac4fd9","0x16fa8865b2ea46ac1ae93d46fe028fb53d2af7b5c5291adf62b66305c753dfc0","0xdc475ef6282841001b874b2d1cbc8675611bf93ee2e7168e7fb9a299f60d6617","0xb0e37052bd72a4e9d1db378052da72443c2a65c9354c023320537c0e64dc6ef3","0x92734872568e2c576436d5b1a3c1c279313fcf4c347f60dae241f5c467c3bb70","0x99ff504699f68f666d2e5be322e835e2b135cf2afbafb891718fb319dd548b33","0x24f9cc86a0ce440adefd5ec8972cf6934049f2803f1fbac04a3ab37ba6fd5279","0xdef81f287c4332f0c724785bf78b0906f56ae5cd2dccf1e19f924374a0e799bb","0x4ea201858d7fec781c0ec9ed1b0929ac181fb0a243dd09a7cbf8a042d3afca2d","0x4d1ef9a36b1d3840174b24b7e2d00ac594ef752667578aa16c4c482ccbeeea73","0xc5bcd78872192bd88e04e5c616eac9fa6656a2875bcf64c0b231dde773386878","0x9bc4e6ecef0f1c06d9b0317683b0b1bb963467fbf592d7c527f1d2b7d58cc5fe","0x9c04b62fed865e1230aa130e07b2e5b97f4bf29c9d167419941292850f3a6872","0x66044cbe0c2d57835ed8fd627073978daa52f36c1ac632f9bb2ace77c90838ff","0x5f958de38084a9c57ee8707ac6bbbc1804e38c7de2e693a8d3cc1f22ded598df","0x00d1951f767daf3c0694657450fa6f6f2fd2e1b3eb8b42d433714d090d4f7583","0x56a2e378c51b0299996c59cc0106e5012c947fa752d79cf69768731589f7adb8","0x774d34adc55d59351c5ca9758271a36ee029a5ebc3f0ffc7ad060d3b49ceb8a6","0xbdf696a1249c8464e2042eb1b9458ed623044d4b9b0feb4025e12806c2c6406f","0xc4835905df7120a058fb934ed797e6ea91b3d04b73267ee489eaa39c396c9ed1","0xe232f858bd1dffdfc419f6462c86d8ec8c96a8037debdb99806f2a1d8f4261b7","0xf49e76caacbd4b7fd2b8093643fd0d7b71ada6ea0bac1ee747d5f5ed66ebc083","0xd0f0938ac7bc27b1249dfd8dd6e61c75f648391d5c3316ee4a93d621fbb49868","0xd3bca2cd3fdc8b8e7d6bcc5b4b16934d95de2fd711a21240448cc01e739d56fe","0x8f1a648d7cf9133d4ae9c93435083c582e03ee8261fb76c521e7049faa814e7f","0x121eef1316d74ef0afdabdc5144510efbeae9327741e7c14c6819472c27e76f0","0x206b0ef4f855bbf5998b5a5b83dc9d45a20fa962a2c78dd328e5d0051fb54378","0x22bb3b51afc54d0332b2ff1609764b08af6a2b0f9e39e8faccca84df583d7997","0x3d3e3004b3b10bc23ef847a14e66c3a1e2c0d5f1711e100f4328f1e0c32b9aeb","0x2dc6e06b96194f5459d83a56a93be8b1cd4a8ce519d41a140659d47c82ea47f7","0x2eeed7af73355268f568e25360e34e98c7da01360f03420515ecc21d7dac5276","0xd5bf1f33885f2d56c1c51a4cc02059f5fba59c543705fff5656992a2a4c267c6","0x8a389ac08e3271a41a80eb86353e1d565ec01cda140a5158d004f92d81664ed2","0xaf72e646f62cb76c021d09bb1fee047a2991fa7dd679d8359bea280d3d4311a5","0x5d758c20c01b8b130b19ae73e3157c7a575669fd603c9f95136ff6868d950ca6","0xd959c1bf131f1d0b85fcc10b8f8c1ffaef7cdbb1159a993b3c3096eae67c963a","0x637e96bd4a33508145e28a10028b80fbfb7e09376a28cfdcc9b445679820d2e5","0xf004c95f17dc3e44cbf12e000b5de1c995c646609243411a7bf0b95c0460e2db","0xe306453cf06ba1bf481694bb41bb3f0d150e27e2bf1480c19803eb3bac918ace","0x8f5574fef207d8af7f97f91bd4e436a4725b7aa63dd470ecc94b50a14ee244a6","0x70c0c14b4a962cdb5daedf01801711c7c500a96beb9a98c719f00a4e2c9e560f","0x33a5b5475f84d9a898fa73ea89d5b578451a5d9f1cc60745dcf4e47ed22d5de0","0x5e89298439f67fa272358144f687e021c303e3d903c99ce282b710cc227493cc","0x5dde479adc9b4b8402032bbb3a508606ceec1203d14d79cfbd34dcd426103540","0x2d2ea263ec80b7a26a5dce1106411b99437323f17db2f949ed3848c24c76f0b9","0xea16dccdd78ab3911d5611af2b31893eaed6147f7288ef61722c3034b38386cb","0x7c618bf12ebd2bf593476318927bd00ed6f89198acfb8761523a6e515574a964","0x94dbeccdcd1defba3272445b9e29fe6888a23ee4977f1a39233e27774bc008f1","0x6d2eb434dde6383a8df399105ddd2b008ad4ff9c8d72bdfc0332fe4669a97e1e","0x1ed8af3ae7c19bfc1d0023ec33f34b47a1cf6759fb3d718b378c8b8a1d7ee114","0xe1b20d8048bc3f49bfe58950b2320c807e8a5a5a926978cfa6ff8e61449f427b","0x7361d1c2f1ab62021bf8cf9c916f57acf9cdb558eb7d93e32027cbc8f11b92a9","0x2d7daaa98cc0b3854fd97cde91da9f885cbe923247b91d5613f1c7f8245480fc","0xd048a8595ab4a81fd7c388ea28f23f90a2239d3d15afbf504aa75ea6485716e6","0x66ac1adb0b68b4f92f49d4b45b8c5f1b8bc4e38b78d4883267af85b1ad717685","0xb89df17fd9dce1ac9b525f2b85f772a97a5f8310952cd233216ac6619269a0e4","0xde99eaa390012570433a7e260d7a238bcc9ff26f2a58b1c7c08ca92bed00f2e1","0xd53af0a81ad2778a29f72e5018f0f2bd2e03eff9be3c944ad67a38c323b7a0fe","0xb614503b98046a2144d3762d9c76895166d00fd01438a1387a6afa7cc7b0c50f","0xd24fe2034a2ed44352dec71a871a712637a13a51b17eb5259862328600c33869","0x4aac6d24ed3628c8b5f9ff6d9b942252c823e2bad7ddebf3d8606ed8710a9a06","0x62b6ebb1ff8414a0b4fba5e60439692f072661f3759f46b0df2a8af84a6f7587","0xb84655adbce4eb8eb11dd1da9ee5847a2135da869952b0d1178d35fcb91bf955","0xb26d541434c3ef362bc397c6ce9452d6da9933d0158efe13414f141b37e26be9","0x854ec374ea2fc9a07d5cc590260edc49da9ee35532d094be6d62af513b7f172c","0x9e5c7c471632425059e50563425b675d5fdc7906f960dc8c25093ace4df818fa","0xb9eb0df2ac01d32384c05fca53f6900fa1e2a0efdb10b5ca00caf1b21ee6a1ea","0x30450add1bcbf41cd0adb8f3dd46e077b9d5b91b7c3cd656193f253935f30899","0x530eeb70cc5b062a196d1307960d0ed10eba9933b14684d0d1101102525ac166","0x8e5738b254156ffb863c35375783f41b7d4727b70c37ad9f3983922b80dd12ef","0x40eeb4f0036226ba877dab8e107d796146e8558a7bce4c4a8ab467d1634c1915","0xdf9f74a3d4b265cfd76b1e980e3f0d2404a9a4df23165e777438742d39ebe97b","0x68d486a5f53e65877b30a2edb70773c85451cb50962720b07255996d1a37f1a3","0xbde85a6b4f43b211cf15003f233491baf38c05d6174474c00815f91c484bc098","0xb64e29983b1f1059a0e63935bb14745dd9e180498c7100aa795576aada744561","0x5237e90a372fb50adeef1ea8f7e6838d0820b9d78e96a811de01823ac78a68e3","0x9523679ee76b1f6d4d25e989cbf50be071f5c323821c0252866b55b65291cce7","0x8432140077aad298de081bf1776d798f124f96f37da488658230b608c6c83040","0xaa66ec14ac1171269a550a4a68b81ac8e63776aba45b2f87cacfa0a271907489","0xb0e72dbaf67bbfe9b873009d747a0422b696a4958ccd998c10cfa265fd86838e","0x92f21c1d79dadecd13b8f1bc7b0a85fa9809d343da968976eeb6227d9f357ada","0x364187e747eed673ee15a5cf082574470c0290d4c85c5e651b7a3bed1bec8022","0x3f941ab7e867f0005dc13eaad88a4502e4a1e6263fd637194ee3be3808b3a749","0x62bdce8f43b613d7ea87bd39b9691e678eabf19c99c0deaef0a1f742fcd235fc","0x28e34b2fc5476e959690fe537abfa5d1bf07bf28ed435437a54f3809777791d3","0xac001e14a48324495a83ed04adce0e48c6a73c04522ecc408c49df03778d619a","0x0a9899adf83dd9ce7398efe25c2bf3bc0282dfe6346e1441a7b2d1652606c944","0x1d43b0498012f7ddf77c940a2b3804f8e36ef052b366bf6ffff5c36cabdae057",
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import subprocess
import re
from bridge5_txlist import handleops_txlist as txlist

registered_operators = [
"0x0725EdCF85A4A4eB9820cE1caE2C3E1D380C6555",
"0x2B217F0205a52A6B9E02B92a98EafB8234EbA4A4",
"0x4FfA987E473FDB6852844a8A567611c93be8814c",
"0x78c3F80436dF8b55c462F3d3651e411F90069691",
"0x7F84691a6d962EC493fd4a2b36156d8BDEC7AbAC",
"0x8bbdb96633064Dc564760b404866e768283573b1",
"0x95Eb34fFD1Ff53430d3ac353E876428c5B88C5Ec",
"0xa8c37372480e04A5D6b0403871b177146F91f065",
"0xE6B1B6e65dF8CbaA7fD25200504325cC5B394ff2",
"0xFcC7b4F4fe4A40ebC8948fC9005D2788E4c7919F",
]

pattern = re.compile(r"submitWithdrawal\(\((.+)\), \[(.+)\]\)")
v = set()

for txhash in txlist:
cmd = f"cast run {txhash} --quick"
result = subprocess.check_output(cmd, shell=True).decode("utf-8")
print(txhash)
for line in result.split("\n"):
if "submitWithdrawal" in line:
match = pattern.search(line)
receipt, signature = match.groups()
amount = int(receipt.split(",")[-1].strip().split(" ")[0])
v.add((txhash, amount))
print(sorted(list(v), key=lambda x: x[1]))
39 changes: 39 additions & 0 deletions src/Scan2024CTF/Bridge/bridge5_extract_invalid_withdrawal_args.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import subprocess
from bridge4_txlist import txlist
from tqdm import tqdm

registered_operators = [
"0x0725EdCF85A4A4eB9820cE1caE2C3E1D380C6555",
"0x2B217F0205a52A6B9E02B92a98EafB8234EbA4A4",
"0x4FfA987E473FDB6852844a8A567611c93be8814c",
"0x78c3F80436dF8b55c462F3d3651e411F90069691",
"0x7F84691a6d962EC493fd4a2b36156d8BDEC7AbAC",
"0x8bbdb96633064Dc564760b404866e768283573b1",
"0x95Eb34fFD1Ff53430d3ac353E876428c5B88C5Ec",
"0xa8c37372480e04A5D6b0403871b177146F91f065",
"0xE6B1B6e65dF8CbaA7fD25200504325cC5B394ff2",
"0xFcC7b4F4fe4A40ebC8948fC9005D2788E4c7919F",
]

for txhash in tqdm(txlist[72:]):
cmd = f"cast run {txhash} --quick"
result = subprocess.check_output(cmd, shell=True).decode("utf-8")
mev = False
for line in result.split("\n"):
if "[Return]" not in line:
continue
if any(
operator.lower() in line.lower().replace("0x000000000000000000000000", "0x")
for operator in registered_operators
):
break
mev = True
break

if not mev:
continue

print(txhash)
line = result.split("\n")[1]
args = line[line.find("submitWithdrawal("):]
print(args)
Loading

0 comments on commit f1680c4

Please sign in to comment.