|
@@ -1,6 +1,5 @@
|
|
|
import {
|
|
|
forEachAsync,
|
|
|
- generate2CaptchaProxyAgent,
|
|
|
generateRandomString,
|
|
|
getAxiosClient,
|
|
|
getProxyAgent,
|
|
@@ -74,10 +73,66 @@ function getAndroidModel() {
|
|
|
'NX629J',
|
|
|
'M973Q',
|
|
|
'PCLM10',
|
|
|
+ 'SM-N9810',
|
|
|
+ 'SM-N9860',
|
|
|
+ 'SM-F9160',
|
|
|
+ 'SM-A7009',
|
|
|
+ 'SM-A6060',
|
|
|
+ 'SM-W2018',
|
|
|
+ 'SM-P610',
|
|
|
+ 'VTR-L29',
|
|
|
+ 'M1903F2G',
|
|
|
+ 'XQ-BE72',
|
|
|
+ 'RMX3709',
|
|
|
+ 'SM-E5260',
|
|
|
+ 'SM-W2020',
|
|
|
+ 'SHARK KSR-A0',
|
|
|
+ 'G8HNN',
|
|
|
+ 'SM-G973U',
|
|
|
+ 'SM-G973U1',
|
|
|
+ 'SM-G9738',
|
|
|
+ 'SM-G981B',
|
|
|
+ 'SM-G988U',
|
|
|
+ 'SM-G9880',
|
|
|
+ 'M2012K11G',
|
|
|
+ 'M2006C3LG',
|
|
|
+ '21061119BI',
|
|
|
+ '22127RK46C',
|
|
|
+ 'M2102J20SI',
|
|
|
+ 'MCE91',
|
|
|
+ 'L16',
|
|
|
+ 'L10',
|
|
|
+ 'L12',
|
|
|
+ 'L13',
|
|
|
+ 'M11A',
|
|
|
+ 'N11',
|
|
|
+ 'N12',
|
|
|
]
|
|
|
return models[Math.floor(Math.random() * models.length)]
|
|
|
}
|
|
|
|
|
|
+function getAndroidOS() {
|
|
|
+ const oses = ['9', '10', '11', '12', '12.1', '13']
|
|
|
+ return `Android ${oses[Math.floor(Math.random() * oses.length)]}`
|
|
|
+}
|
|
|
+
|
|
|
+function getIOS() {
|
|
|
+ const iOSes = [
|
|
|
+ '14',
|
|
|
+ '16.7.8',
|
|
|
+ '17.5',
|
|
|
+ '17.4.1',
|
|
|
+ '16.7.7',
|
|
|
+ '15.8.2',
|
|
|
+ '17.3.1',
|
|
|
+ '15.0.2',
|
|
|
+ '15.1.1',
|
|
|
+ '16.0.3',
|
|
|
+ '16.4.1',
|
|
|
+ ]
|
|
|
+ return `iOS ${iOSes[Math.floor(Math.random() * iOSes.length)]}`
|
|
|
+}
|
|
|
+
|
|
|
function formatDateTime(date) {
|
|
|
function pad(number, length) {
|
|
|
return number.toString().padStart(length, '0')
|
|
@@ -158,9 +213,12 @@ async function faucetLunch(concurrency: number = 8) {
|
|
|
await forEachAsync(accounts, concurrency, async (account, index) => {
|
|
|
console.log(`${index}/${accounts.length}: processing ${account.address}`)
|
|
|
try {
|
|
|
- if (!account.gmail) account.gmail = `${generateRandomString(8)}@gmail.com`
|
|
|
- if (!account.xrpPrivateKey)
|
|
|
+ if (!account.gmail) {
|
|
|
+ account.gmail = `${generateRandomString(8)}@gmail.com`
|
|
|
+ }
|
|
|
+ if (!account.xrpPrivateKey) {
|
|
|
account.xrpPrivateKey = xrpl.Wallet.generate().seed
|
|
|
+ }
|
|
|
|
|
|
const key = new MnemonicKey({ mnemonic: account.mnemonic })
|
|
|
const evmWallet = new ethers.Wallet(key.privateKey.toString('hex'))
|
|
@@ -168,30 +226,52 @@ async function faucetLunch(concurrency: number = 8) {
|
|
|
signedAt: formatDateTime(new Date()),
|
|
|
})
|
|
|
const evmSignedMessage = await evmWallet.signMessage(message)
|
|
|
- const deviceModel = getAndroidModel()
|
|
|
const proxyAgent = getProxyAgent()
|
|
|
- if (!account.duid || account.duid.includes('-'))
|
|
|
- account.duid = await getDeviceId(deviceModel, proxyAgent)
|
|
|
+ let isAndroid = Math.random() > 0.5
|
|
|
+ if (account.duid) {
|
|
|
+ isAndroid = !account.duid.includes('-')
|
|
|
+ }
|
|
|
+ if (isAndroid && !account.deviceModel) {
|
|
|
+ account.deviceModel = getAndroidModel()
|
|
|
+ }
|
|
|
+ if (!account.duid) {
|
|
|
+ account.duid = isAndroid
|
|
|
+ ? await getDeviceId(account.deviceModel, proxyAgent)
|
|
|
+ : uuidv4().toUpperCase()
|
|
|
+ }
|
|
|
+ if (!account.deviceOS) {
|
|
|
+ account.deviceOS = isAndroid ? getAndroidOS() : getIOS()
|
|
|
+ }
|
|
|
const rawMessage = await getRawMessage(
|
|
|
evmWallet.address,
|
|
|
message,
|
|
|
account.duid,
|
|
|
)
|
|
|
- const deviceOS = 'Android 9'
|
|
|
- const client = axios.create({
|
|
|
- headers: {
|
|
|
- 'Lunch-Language': 'EN',
|
|
|
- 'lunch-fiat-currency': 'USD',
|
|
|
- 'lunch-app-duid': account.duid,
|
|
|
- 'lunch-app-version': '0.17.3',
|
|
|
- 'lun-app-build': 46,
|
|
|
- 'Lunch-Device-Model': deviceModel,
|
|
|
- 'Lunch-Device-OS': deviceOS,
|
|
|
- 'Lunch-Platform': 'Android',
|
|
|
- 'user-agent': `lunch/0.17.3(46) (Linux; ${deviceOS}; ${deviceModel} Build/PQ3B.190801.05281822)`,
|
|
|
- },
|
|
|
- httpsAgent: proxyAgent,
|
|
|
- })
|
|
|
+ const client = isAndroid
|
|
|
+ ? axios.create({
|
|
|
+ headers: {
|
|
|
+ 'Lunch-Language': 'EN',
|
|
|
+ 'lunch-fiat-currency': 'USD',
|
|
|
+ 'lunch-app-duid': account.duid,
|
|
|
+ 'lunch-app-version': '0.17.3',
|
|
|
+ 'lun-app-build': 46,
|
|
|
+ 'Lunch-Device-Model': account.deviceModel,
|
|
|
+ 'Lunch-Device-OS': account.deviceOS,
|
|
|
+ 'Lunch-Platform': 'Android',
|
|
|
+ 'user-agent': `lunch/0.17.3(46) (Linux; ${account.deviceOS}; ${account.deviceModel} Build/PQ3B.190801.05281822)`,
|
|
|
+ },
|
|
|
+ httpsAgent: proxyAgent,
|
|
|
+ })
|
|
|
+ : axios.create({
|
|
|
+ headers: {
|
|
|
+ 'lunch-language': 'en',
|
|
|
+ 'lunch-app-platform': 'iOS',
|
|
|
+ 'lunch-app-version': '44',
|
|
|
+ 'lunch-fiat-currency': 'USD',
|
|
|
+ 'lunch-app-duid': account.duid,
|
|
|
+ 'user-agent': `Lunch/1.0 (xyz.lunchlunch.app; build:44; ${account.deviceOS}) Alamofire/5.8.0`,
|
|
|
+ },
|
|
|
+ })
|
|
|
|
|
|
const resp = await client.post(
|
|
|
'https://api.lunchlunch.xyz/v1/auth/sign-in',
|
|
@@ -271,7 +351,7 @@ async function faucetLunch(concurrency: number = 8) {
|
|
|
}
|
|
|
|
|
|
await faucetLunch(8)
|
|
|
-//
|
|
|
+
|
|
|
// const phase =
|
|
|
// 'leave bone supply chair brain thunder giant fatigue winter shrimp father stairs'
|
|
|
// const wallet = ethers.Wallet.fromPhrase(phase)
|