Author

Topic: 遇到个很奇怪的以太坊合约,求助大佬们看看是干什么的 (Read 188 times)

newbie
Activity: 46
Merit: 0
这难度也太高了吧
newbie
Activity: 4
Merit: 0
后来在dappradar也没发现,但是日活很高
newbie
Activity: 4
Merit: 0
后来发现合约备注有个字样 small
newbie
Activity: 4
Merit: 0
https://cn.etherscan.com/address/0x0635e7362e13215d6dcc0e63a0007eebecc408e4

#
#  Panoramix v4 Oct 2019
#  Decompiled source of 0x0635E7362e13215D6Dcc0e63a0007EebEcc408E4
#
#  Let's make the world open source
#
#
#  I failed with these:
#  - unknown0ca5c504(?)
#  - getBalance()
#  - unknown63a84c7a(?)
#  - unknownb30f0c56(?)
#  All the rest is below.
#

def storage:
  owner is addr at storage 0
  stor1 is addr at storage 1
  stor2 is addr at storage 2

def owner(): # not payable
  return owner

#
#  Regular functions
#

def _fallback() payable: # default function
  revert

def unknownec8451da(uint256 _param1): # not payable
  require calldata.size - 4 >= 32
  require _param1
  return (sha3(block.timestamp, block.difficulty, sha3(block.coinbase) / _param1, block.gas_limit, sha3(caller) / _param1, block.number) % 100000)

def unknown1ed12f1f(): # not payable
  require ext_code.size(stor1)
  static call stor1.0xe66f5ab0 with:
          gas gas_remaining wei
         args caller
  if not ext_call.success:
      revert with ext_call.return_data[0 len return_data.size]
  require return_data.size >= 32
  return ext_call.return_data[0]

def setOwner(address _new): # not payable
  require calldata.size - 4 >= 32
  if owner != caller:
      revert with 0, 'Caller is not owner'
  if not _new:
      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000,
                  32,
                  38,
                  0xfe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573,
                  mem[202 len 26]
  owner = _new

def unknowna05d0de3(addr _param1): # not payable
  require calldata.size - 4 >= 32
  if owner != caller:
      revert with 0, 'Caller is not owner'
  if not _param1:
      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000,
                  32,
                  38,
                  0xfe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573,
                  mem[202 len 26]
  stor2 = _param1

def unknowne86cd59f(addr _param1, uint256 _param2, uint256 _param3): # not payable
  require calldata.size - 4 >= 96
  if owner != caller:
      revert with 0, 'Caller is not owner'
  require ext_code.size(stor1)
  call stor1.0xe86cd59f with:
       gas gas_remaining wei
      args addr(_param1), _param2, _param3
  if not ext_call.success:
      revert with ext_call.return_data[0 len return_data.size]

def unknown6f761662(addr _param1, uint256 _param2): # not payable
  require calldata.size - 4 >= 64
  if owner != caller:
      revert with 0, 'Caller is not owner'
  require ext_code.size(stor1)
  static call stor1.0xe66f5ab0 with:
          gas gas_remaining wei
         args _param1
  if not ext_call.success:
      revert with ext_call.return_data[0 len return_data.size]
  require return_data.size >= 32
  require ext_code.size(stor1)
  call stor1.0x6f761662 with:
       gas gas_remaining wei
      args addr(_param1), ext_call.return_data_param2
  if not ext_call.success:
      revert with ext_call.return_data[0 len return_data.size]
  log 0xdf97be6a: addr(_param1), _param2

def unknownc082891d(addr _param1, array _param2, uint256 _param3, uint256 _param4): # not payable
  require calldata.size - 4 >= 128
  require _param2 <= 4294967296
  require _param2 + 36 <= calldata.size
  require _param2.length <= 4294967296 and _param2 + _param2.length + 36 <= calldata.size
  if owner != caller:
      revert with 0, 'Caller is not owner'
  require ext_code.size(stor1)
  call stor1 with:
       gas gas_remaining wei
      args addr(_param1), Array(len=_param2.length, data=_param2[all]), _param3, _param4
  if not ext_call.success:
      revert with ext_call.return_data[0 len return_data.size]

def unknowne62dfb38(uint256 _param1): # not payable
  require calldata.size - 4 >= 32
  require ext_code.size(stor1)
  call stor1.0x49bb1215 with:
       gas gas_remaining wei
      args caller, _param1
  if not ext_call.success:
      revert with ext_call.return_data[0 len return_data.size]
  require ext_code.size(stor1)
  static call stor1.0xe66f5ab0 with:
          gas gas_remaining wei
         args caller
  if not ext_call.success:
      revert with ext_call.return_data[0 len return_data.size]
  require return_data.size >= 32
  require ext_code.size(stor1)
  call stor1.0x6f761662 with:
       gas gas_remaining wei
      args caller, ext_call.return_data_param1
  if not ext_call.success:
      revert with ext_call.return_data[0 len return_data.size]
  log 0xb4b37799: caller, _param1, Array(len=18, data='obtainDynamicGains')

def unknown5d60de6e(uint256 _param1, array _param2): # not payable
  require calldata.size - 4 >= 64
  require _param2 <= 4294967296
  require _param2 + 36 <= calldata.size
  require _param2.length <= 4294967296 and _param2 + _param2.length + 36 <= calldata.size
  mem[96] = _param2.length
  mem[128 len _param2.length] = _param2[all]
  mem[_param2.length + 128] = 0
  require ext_code.size(stor1)
  static call stor1.0x840d4577 with:
          gas gas_remaining wei
         args caller
  if not ext_call.success:
      revert with ext_call.return_data[0 len return_data.size]
  require return_data.size >= 32
  if bool(ext_call.return_data[0]) != 1:
      revert with 0, 'You don not have a miner yet'
  mem[ceil32(_param2.length) + 128] = 0x8aec06e200000000000000000000000000000000000000000000000000000000
  mem[ceil32(_param2.length) + 132] = caller
  mem[ceil32(_param2.length) + 164] = _param1
  require ext_code.size(stor1)
  static call stor1.0x8aec06e2 with:
          gas gas_remaining wei
         args caller, _param1
  if not ext_call.success:
      revert with ext_call.return_data[0 len return_data.size]
  mem[ceil32(_param2.length) + 128 len return_data.size] = ext_call.return_data[0 len return_data.size]
  mem[64] = ceil32(_param2.length) + ceil32(return_data.size) + 128
  require return_data.size >= 160
  require uint32(caller), Mask(224, 32, _param1) >> 32 <= 4294967296
  require uint32(caller), Mask(224, 32, _param1) >> 32 + 32 <= return_data.size
  require mem[uint32(caller), Mask(224, 32, _param1) >> 32 + ceil32(_param2.length) + 128] <= 4294967296 and uint32(caller), Mask(224, 32, _param1) >> 32 + mem[uint32(caller), Mask(224, 32, _param1) >> 32 + ceil32(_param2.length) + 128] + 32 <= return_data.size
  mem[ceil32(_param2.length) + ceil32(return_data.size) + 128] = mem[uint32(caller), Mask(224, 32, _param1) >> 32 + ceil32(_param2.length) + 128]
  _15 = mem[uint32(caller), Mask(224, 32, _param1) >> 32 + ceil32(_param2.length) + 128]
  mem[ceil32(_param2.length) + ceil32(return_data.size) + 160 len ceil32(mem[uint32(caller), Mask(224, 32, _param1) >> 32 + ceil32(_param2.length) + 128])] = mem[uint32(caller), Mask(224, 32, _param1) >> 32 + ceil32(_param2.length) + 160 len ceil32(mem[uint32(caller), Mask(224, 32, _param1) >> 32 + ceil32(_param2.length) + 128])]
  if not _15 % 32:
      _87 = mem[ceil32(_param2.length) + 256]
      require ext_code.size(stor1)
      static call stor1.0xdff0f744 with:
              gas gas_remaining wei
             args Array(len=_param2.length, data=_param2[all])
      if not ext_call.success:
          revert with ext_call.return_data[0 len return_data.size]
      require return_data.size >= 32
      if block.timestamp - uint32(_param1), mem[ceil32(_param2.length) + 196 len 28] / 24 * 3600 > 365:
          return (365 * ext_call.return_data_87,
                 block.timestamp - uint32(_param1), mem[ceil32(_param2.length) + 196 len 28] / 24 * 3600
      return (ext_call.return_data * block.timestamp - uint32(_param1), mem[ceil32(_param2.length) + 196 len 28] / 24 * 3600) - _87,
             block.timestamp - uint32(_param1), mem[ceil32(_param2.length) + 196 len 28] / 24 * 3600
  mem[floor32(_15) + ceil32(_param2.length) + ceil32(return_data.size) + 160] = mem[floor32(_15) + ceil32(_param2.length) + ceil32(return_data.size) + -(_15 % 32) + 192 len _15 % 32]
  _91 = mem[ceil32(_param2.length) + 256]
  require ext_code.size(stor1)
  static call stor1.0xdff0f744 with:
          gas gas_remaining wei
         args Array(len=_param2.length, data=_param2[all])
  if not ext_call.success:
      revert with ext_call.return_data[0 len return_data.size]
  require return_data.size >= 32
  if block.timestamp - uint32(_param1), mem[ceil32(_param2.length) + 196 len 28] / 24 * 3600 > 365:
      return (365 * ext_call.return_data_91,
             block.timestamp - uint32(_param1), mem[ceil32(_param2.length) + 196 len 28] / 24 * 3600
  return (ext_call.return_data * block.timestamp - uint32(_param1), mem[ceil32(_param2.length) + 196 len 28] / 24 * 3600) - _91,
         block.timestamp - uint32(_param1), mem[ceil32(_param2.length) + 196 len 28] / 24 * 3600

def unknownb89c3ec1(addr _param1, uint256 _param2): # not payable
  require calldata.size - 4 >= 64
  require ext_code.size(stor1)
  static call stor1.0x840d4577 with:
          gas gas_remaining wei
         args _param1
  if not ext_call.success:
      revert with ext_call.return_data[0 len return_data.size]
  require return_data.size >= 32
  if bool(ext_call.return_data[0]) != 1:
      revert with 0, 'You don not have a miner yet'
  mem[96] = 0x8aec06e200000000000000000000000000000000000000000000000000000000
  mem[100] = _param1
  mem[132] = _param2
  require ext_code.size(stor1)
  static call stor1.0x8aec06e2 with:
          gas gas_remaining wei
         args addr(_param1), _param2
  if not ext_call.success:
      revert with ext_call.return_data[0 len return_data.size]
  mem[96 len return_data.size] = ext_call.return_data[0 len return_data.size]
  mem[64] = ceil32(return_data.size) + 96
  require return_data.size >= 160
  _10 = mem[96 len 4], addr(_param1) << 64
  require 0, Mask(224, 32, _param2) >> 32 <= 4294967296
  require 0, Mask(224, 32, _param2) >> 32 + 32 <= return_data.size
  require mem[0, Mask(224, 32, _param2) >> 32 + 96] <= 4294967296 and 0, Mask(224, 32, _param2) >> 32 + mem[0, Mask(224, 32, _param2) >> 32 + 96] + 32 <= return_data.size
  mem[ceil32(return_data.size) + 96] = mem[0, Mask(224, 32, _param2) >> 32 + 96]
  _14 = mem[0, Mask(224, 32, _param2) >> 32 + 96]
  mem[ceil32(return_data.size) + 128 len ceil32(mem[0, Mask(224, 32, _param2) >> 32 + 96])] = mem[0, Mask(224, 32, _param2) >> 32 + 128 len ceil32(mem[0, Mask(224, 32, _param2) >> 32 + 96])]
  if not _14 % 32:
      _38 = uint32(_param2), mem[164 len 28]
      _39 = mem[192]
      _40 = mem[224]
      mem[_14 + ceil32(return_data.size) + 128] = addr(_10)
      mem[_14 + ceil32(return_data.size) + 192] = _38
      mem[_14 + ceil32(return_data.size) + 224] = _39
      mem[_14 + ceil32(return_data.size) + 256] = _40
      mem[_14 + ceil32(return_data.size) + 160] = 160
      mem[_14 + ceil32(return_data.size) + 288] = mem[ceil32(return_data.size) + 96]
      mem[_14 + ceil32(return_data.size) + 320 len ceil32(mem[ceil32(return_data.size) + 96])] = mem[ceil32(return_data.size) + 128 len ceil32(mem[ceil32(return_data.size) + 96])]
      if not mem[ceil32(return_data.size) + 96] % 32:
          return addr(_10), 160, _38, _39, _40, mem[_14 + ceil32(return_data.size) + 288 len mem[ceil32(return_data.size) + 96] + 32]
      mem[floor32(mem[ceil32(return_data.size) + 96]) + _14 + ceil32(return_data.size) + 320] = mem[floor32(mem[ceil32(return_data.size) + 96]) + _14 + ceil32(return_data.size) + -(mem[ceil32(return_data.size) + 96] % 32) + 352 len mem[ceil32(return_data.size) + 96] % 32]
      return addr(_10),
             Array(len=mem[ceil32(return_data.size) + 96], data=mem[_14 + ceil32(return_data.size) + 320 len floor32(mem[ceil32(return_data.size) + 96]) + 32]),
             _38,
             _39,
             _40
  mem[floor32(_14) + ceil32(return_data.size) + 128] = mem[floor32(_14) + ceil32(return_data.size) + -(_14 % 32) + 160 len _14 % 32]
  _45 = uint32(_param2), mem[164 len 28]
  _46 = mem[192]
  _47 = mem[224]
  mem[floor32(_14) + ceil32(return_data.size) + 160] = addr(_10)
  mem[floor32(_14) + ceil32(return_data.size) + 224] = _45
  mem[floor32(_14) + ceil32(return_data.size) + 256] = _46
  mem[floor32(_14) + ceil32(return_data.size) + 288] = _47
  mem[floor32(_14) + ceil32(return_data.size) + 192] = 160
  mem[floor32(_14) + ceil32(return_data.size) + 320] = mem[ceil32(return_data.size) + 96]
  mem[floor32(_14) + ceil32(return_data.size) + 352 len ceil32(mem[ceil32(return_data.size) + 96])] = mem[ceil32(return_data.size) + 128 len ceil32(mem[ceil32(return_data.size) + 96])]
  if not mem[ceil32(return_data.size) + 96] % 32:
      return addr(_10),
             160,
             _45,
             _46,
             _47,
             mem[floor32(_14) + ceil32(return_data.size) + 320 len mem[ceil32(return_data.size) + 96] + 32]
  mem[floor32(mem[ceil32(return_data.size) + 96]) + floor32(_14) + ceil32(return_data.size) + 352] = mem[floor32(mem[ceil32(return_data.size) + 96]) + floor32(_14) + ceil32(return_data.size) + -(mem[ceil32(return_data.size) + 96] % 32) + 384 len mem[ceil32(return_data.size) + 96] % 32]
  return addr(_10),
         Array(len=mem[ceil32(return_data.size) + 96], data=mem[floor32(_14) + ceil32(return_data.size) + 352 len floor32(mem[ceil32(return_data.size) + 96]) + 32]),
         _45,
         _46,
         _47

newbie
Activity: 4
Merit: 0
标题:遇到个很奇怪的以太坊合约,求助大佬们看看是干什么的
最近发现手头几个账户似乎私钥泄露了,在跟一个合约地址交互,而且还每天返0.1ETH,我想知道是什么合约?是否之前我账户里面的ETH动过了?
合约地址是/0x0635e7362e13215d6dcc0e63a0007eebecc408e4


可以在浏览器查看,交易非常频繁,是uniswap的某个?但是我也没收到代币
是质押存利息的?我账户消失的金额会锁仓多久也不清楚。


合约我在浏览器扒了一下,贴2楼
Jump to: