dev version
This commit is contained in:
commit
ca909895eb
54
nimscan/IPgen.nim
Normal file
54
nimscan/IPgen.nim
Normal file
@ -0,0 +1,54 @@
|
||||
import std/[random, strutils, os, net, locks, httpclient, json]
|
||||
|
||||
proc status(targetIP: string): bool {.gcsafe.}=
|
||||
var client = newSocket()
|
||||
try:
|
||||
client.connect(targetIP, Port(25565), 1500)
|
||||
client.send($((char)0xFE))
|
||||
if (client.recv(256, 1000)[0] == (char)0xFF):
|
||||
return true
|
||||
except Exception:
|
||||
return false
|
||||
finally:
|
||||
client.close()
|
||||
|
||||
proc GenerateIP(): string {.gcsafe.} =
|
||||
randomize()
|
||||
var
|
||||
ip0 = rand(255)
|
||||
ip1 = rand(255)
|
||||
ip2 = rand(255)
|
||||
ip3 = rand(255)
|
||||
return (join([$ip0, $ip1, $ip2, $ip3], "."))
|
||||
|
||||
proc hit(host: string) {.gcsafe.} =
|
||||
echo "[+] Hit on ", host
|
||||
var client = newHttpClient()
|
||||
try:
|
||||
client.headers = newHttpHeaders({"Content-Type": "application/json"})
|
||||
let body = %*{
|
||||
"server": host
|
||||
}
|
||||
let res = client.request("http://localhost:9000/server", HttpPost, $body)
|
||||
discard res
|
||||
except Exception as e:
|
||||
echo e.msg
|
||||
discard
|
||||
|
||||
proc main(): void {.thread.} =
|
||||
while true:
|
||||
var ip = GenerateIP()
|
||||
var ping = status(ip)
|
||||
if ping:
|
||||
hit(ip)
|
||||
discard
|
||||
|
||||
var cmd = os.execShellCmd("clear")
|
||||
var cLock: Lock
|
||||
initLock(cLock)
|
||||
var thread: Thread[void]
|
||||
|
||||
for i in 0..300:
|
||||
createThread[void](thread, main)
|
||||
|
||||
joinThreads(thread)
|
1
nimscan/config.nims
Normal file
1
nimscan/config.nims
Normal file
@ -0,0 +1 @@
|
||||
--threads:on
|
5
server/config.json
Normal file
5
server/config.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"main": "https://discord.com/api/webhooks/999381041041129573/5vmF56GsDdg8D3HJWnu-pRsBmxqPqnzHBTQAu1yLcZQ93xhR36V2UUUVNhRrAHZQyKzA",
|
||||
"neit": "https://discord.com/api/webhooks/1000916905600761887/yeC4nbJYeS38JlNdI42dh8cfcmeX0SZeFSvqmeCIdCZJtJewkq6DjIMXAjwmBhF65XtA",
|
||||
"fronce": "https://discord.com/api/webhooks/1000903130222952518/cRK-SXahsWl8OT_N4HLnt7I0JebGnQh0gN3p3iOvCW_QIVC7hq2oWlmt6txC7NSXtv55"
|
||||
}
|
252
server/countrycode.json
Normal file
252
server/countrycode.json
Normal file
@ -0,0 +1,252 @@
|
||||
{
|
||||
"BD": "Bangladesh",
|
||||
"BE": "Belgium",
|
||||
"BF": "Burkina Faso",
|
||||
"BG": "Bulgaria",
|
||||
"BA": "Bosnia and Herzegovina",
|
||||
"BB": "Barbados",
|
||||
"WF": "Wallis and Futuna",
|
||||
"BL": "Saint Barthelemy",
|
||||
"BM": "Bermuda",
|
||||
"BN": "Brunei",
|
||||
"BO": "Bolivia",
|
||||
"BH": "Bahrain",
|
||||
"BI": "Burundi",
|
||||
"BJ": "Benin",
|
||||
"BT": "Bhutan",
|
||||
"JM": "Jamaica",
|
||||
"BV": "Bouvet Island",
|
||||
"BW": "Botswana",
|
||||
"WS": "Samoa",
|
||||
"BQ": "Bonaire, Saint Eustatius and Saba ",
|
||||
"BR": "Brazil",
|
||||
"BS": "Bahamas",
|
||||
"JE": "Jersey",
|
||||
"BY": "Belarus",
|
||||
"BZ": "Belize",
|
||||
"RU": "Russia",
|
||||
"RW": "Rwanda",
|
||||
"RS": "Serbia",
|
||||
"TL": "East Timor",
|
||||
"RE": "Reunion",
|
||||
"TM": "Turkmenistan",
|
||||
"TJ": "Tajikistan",
|
||||
"RO": "Romania",
|
||||
"TK": "Tokelau",
|
||||
"GW": "Guinea-Bissau",
|
||||
"GU": "Guam",
|
||||
"GT": "Guatemala",
|
||||
"GS": "South Georgia and the South Sandwich Islands",
|
||||
"GR": "Greece",
|
||||
"GQ": "Equatorial Guinea",
|
||||
"GP": "Guadeloupe",
|
||||
"JP": "Japan",
|
||||
"GY": "Guyana",
|
||||
"GG": "Guernsey",
|
||||
"GF": "French Guiana",
|
||||
"GE": "Georgia",
|
||||
"GD": "Grenada",
|
||||
"GB": "United Kingdom",
|
||||
"GA": "Gabon",
|
||||
"SV": "El Salvador",
|
||||
"GN": "Guinea",
|
||||
"GM": "Gambia",
|
||||
"GL": "Greenland",
|
||||
"GI": "Gibraltar",
|
||||
"GH": "Ghana",
|
||||
"OM": "Oman",
|
||||
"TN": "Tunisia",
|
||||
"JO": "Jordan",
|
||||
"HR": "Croatia",
|
||||
"HT": "Haiti",
|
||||
"HU": "Hungary",
|
||||
"HK": "Hong Kong",
|
||||
"HN": "Honduras",
|
||||
"HM": "Heard Island and McDonald Islands",
|
||||
"VE": "Venezuela",
|
||||
"PR": "Puerto Rico",
|
||||
"PS": "Palestinian Territory",
|
||||
"PW": "Palau",
|
||||
"PT": "Portugal",
|
||||
"SJ": "Svalbard and Jan Mayen",
|
||||
"PY": "Paraguay",
|
||||
"IQ": "Iraq",
|
||||
"PA": "Panama",
|
||||
"PF": "French Polynesia",
|
||||
"PG": "Papua New Guinea",
|
||||
"PE": "Peru",
|
||||
"PK": "Pakistan",
|
||||
"PH": "Philippines",
|
||||
"PN": "Pitcairn",
|
||||
"PL": "Poland",
|
||||
"PM": "Saint Pierre and Miquelon",
|
||||
"ZM": "Zambia",
|
||||
"EH": "Western Sahara",
|
||||
"EE": "Estonia",
|
||||
"EG": "Egypt",
|
||||
"ZA": "South Africa",
|
||||
"EC": "Ecuador",
|
||||
"IT": "Italy",
|
||||
"VN": "Vietnam",
|
||||
"SB": "Solomon Islands",
|
||||
"ET": "Ethiopia",
|
||||
"SO": "Somalia",
|
||||
"ZW": "Zimbabwe",
|
||||
"SA": "Saudi Arabia",
|
||||
"ES": "Spain",
|
||||
"ER": "Eritrea",
|
||||
"ME": "Montenegro",
|
||||
"MD": "Moldova",
|
||||
"MG": "Madagascar",
|
||||
"MF": "Saint Martin",
|
||||
"MA": "Morocco",
|
||||
"MC": "Monaco",
|
||||
"UZ": "Uzbekistan",
|
||||
"MM": "Myanmar",
|
||||
"ML": "Mali",
|
||||
"MO": "Macao",
|
||||
"MN": "Mongolia",
|
||||
"MH": "Marshall Islands",
|
||||
"MK": "Macedonia",
|
||||
"MU": "Mauritius",
|
||||
"MT": "Malta",
|
||||
"MW": "Malawi",
|
||||
"MV": "Maldives",
|
||||
"MQ": "Martinique",
|
||||
"MP": "Northern Mariana Islands",
|
||||
"MS": "Montserrat",
|
||||
"MR": "Mauritania",
|
||||
"IM": "Isle of Man",
|
||||
"UG": "Uganda",
|
||||
"TZ": "Tanzania",
|
||||
"MY": "Malaysia",
|
||||
"MX": "Mexico",
|
||||
"IL": "Israel",
|
||||
"FR": "France",
|
||||
"IO": "British Indian Ocean Territory",
|
||||
"SH": "Saint Helena",
|
||||
"FI": "Finland",
|
||||
"FJ": "Fiji",
|
||||
"FK": "Falkland Islands",
|
||||
"FM": "Micronesia",
|
||||
"FO": "Faroe Islands",
|
||||
"NI": "Nicaragua",
|
||||
"NL": "Netherlands",
|
||||
"NO": "Norway",
|
||||
"NA": "Namibia",
|
||||
"VU": "Vanuatu",
|
||||
"NC": "New Caledonia",
|
||||
"NE": "Niger",
|
||||
"NF": "Norfolk Island",
|
||||
"NG": "Nigeria",
|
||||
"NZ": "New Zealand",
|
||||
"NP": "Nepal",
|
||||
"NR": "Nauru",
|
||||
"NU": "Niue",
|
||||
"CK": "Cook Islands",
|
||||
"XK": "Kosovo",
|
||||
"CI": "Ivory Coast",
|
||||
"CH": "Switzerland",
|
||||
"CO": "Colombia",
|
||||
"CN": "China",
|
||||
"CM": "Cameroon",
|
||||
"CL": "Chile",
|
||||
"CC": "Cocos Islands",
|
||||
"CA": "Canada",
|
||||
"CG": "Republic of the Congo",
|
||||
"CF": "Central African Republic",
|
||||
"CD": "Democratic Republic of the Congo",
|
||||
"CZ": "Czech Republic",
|
||||
"CY": "Cyprus",
|
||||
"CX": "Christmas Island",
|
||||
"CR": "Costa Rica",
|
||||
"CW": "Curacao",
|
||||
"CV": "Cape Verde",
|
||||
"CU": "Cuba",
|
||||
"SZ": "Swaziland",
|
||||
"SY": "Syria",
|
||||
"SX": "Sint Maarten",
|
||||
"KG": "Kyrgyzstan",
|
||||
"KE": "Kenya",
|
||||
"SS": "South Sudan",
|
||||
"SR": "Suriname",
|
||||
"KI": "Kiribati",
|
||||
"KH": "Cambodia",
|
||||
"KN": "Saint Kitts and Nevis",
|
||||
"KM": "Comoros",
|
||||
"ST": "Sao Tome and Principe",
|
||||
"SK": "Slovakia",
|
||||
"KR": "South Korea",
|
||||
"SI": "Slovenia",
|
||||
"KP": "North Korea",
|
||||
"KW": "Kuwait",
|
||||
"SN": "Senegal",
|
||||
"SM": "San Marino",
|
||||
"SL": "Sierra Leone",
|
||||
"SC": "Seychelles",
|
||||
"KZ": "Kazakhstan",
|
||||
"KY": "Cayman Islands",
|
||||
"SG": "Singapore",
|
||||
"SE": "Sweden",
|
||||
"SD": "Sudan",
|
||||
"DO": "Dominican Republic",
|
||||
"DM": "Dominica",
|
||||
"DJ": "Djibouti",
|
||||
"DK": "Denmark",
|
||||
"VG": "British Virgin Islands",
|
||||
"DE": "Germany",
|
||||
"YE": "Yemen",
|
||||
"DZ": "Algeria",
|
||||
"US": "United States",
|
||||
"UY": "Uruguay",
|
||||
"YT": "Mayotte",
|
||||
"UM": "United States Minor Outlying Islands",
|
||||
"LB": "Lebanon",
|
||||
"LC": "Saint Lucia",
|
||||
"LA": "Laos",
|
||||
"TV": "Tuvalu",
|
||||
"TW": "Taiwan",
|
||||
"TT": "Trinidad and Tobago",
|
||||
"TR": "Turkey",
|
||||
"LK": "Sri Lanka",
|
||||
"LI": "Liechtenstein",
|
||||
"LV": "Latvia",
|
||||
"TO": "Tonga",
|
||||
"LT": "Lithuania",
|
||||
"LU": "Luxembourg",
|
||||
"LR": "Liberia",
|
||||
"LS": "Lesotho",
|
||||
"TH": "Thailand",
|
||||
"TF": "French Southern Territories",
|
||||
"TG": "Togo",
|
||||
"TD": "Chad",
|
||||
"TC": "Turks and Caicos Islands",
|
||||
"LY": "Libya",
|
||||
"VA": "Vatican",
|
||||
"VC": "Saint Vincent and the Grenadines",
|
||||
"AE": "United Arab Emirates",
|
||||
"AD": "Andorra",
|
||||
"AG": "Antigua and Barbuda",
|
||||
"AF": "Afghanistan",
|
||||
"AI": "Anguilla",
|
||||
"VI": "U.S. Virgin Islands",
|
||||
"IS": "Iceland",
|
||||
"IR": "Iran",
|
||||
"AM": "Armenia",
|
||||
"AL": "Albania",
|
||||
"AO": "Angola",
|
||||
"AQ": "Antarctica",
|
||||
"AS": "American Samoa",
|
||||
"AR": "Argentina",
|
||||
"AU": "Australia",
|
||||
"AT": "Austria",
|
||||
"AW": "Aruba",
|
||||
"IN": "India",
|
||||
"AX": "Aland Islands",
|
||||
"AZ": "Azerbaijan",
|
||||
"IE": "Ireland",
|
||||
"ID": "Indonesia",
|
||||
"UA": "Ukraine",
|
||||
"QA": "Qatar",
|
||||
"MZ": "Mozambique"
|
||||
}
|
114
server/index.js
Normal file
114
server/index.js
Normal file
@ -0,0 +1,114 @@
|
||||
const express = require('express'),
|
||||
sqlite3 = require('sqlite3'),
|
||||
bodyParser = require('body-parser'),
|
||||
app = express(),
|
||||
mc = require('minecraft-server-util'),
|
||||
discord = require('discord-webhook-node'),
|
||||
geoip = require('geoip-lite'),
|
||||
fs = require('fs'),
|
||||
config = require('./config.json')
|
||||
var webhook = new discord.Webhook(config.main)
|
||||
.setUsername("TaxenHeimer")
|
||||
.setAvatar("https://cdn.discordapp.com/attachments/999167321631363126/999495738943868928/nn.png")
|
||||
var webhookfronce = new discord.Webhook(config.fronce)
|
||||
.setAvatar("https://cdn.discordapp.com/attachments/999167321631363126/999495738943868928/nn.png")
|
||||
.setUsername("TaxenHeimer")
|
||||
var neithook = new discord.Webhook(config.neit)
|
||||
.setAvatar("https://cdn.discordapp.com/attachments/999167321631363126/999495738943868928/nn.png")
|
||||
.setUsername("TaxenHeimer")
|
||||
app.use(bodyParser.json())
|
||||
app.use(bodyParser.urlencoded({extended: true}))
|
||||
db = new sqlite3.Database('./servers.db')
|
||||
db.exec(`CREATE TABLE IF NOT EXISTS servers (
|
||||
host text not null,
|
||||
version text not null,
|
||||
players text not null,
|
||||
playerlist text not null,
|
||||
ping text not null,
|
||||
motd text not null,
|
||||
timestamp text not null
|
||||
)`)
|
||||
function countrify(code) {
|
||||
var config = require('./countrycode.json')
|
||||
return config[code]
|
||||
}
|
||||
app.post('/server', async(req, res) => {
|
||||
var server = req.body.server
|
||||
if (!server) return res.send("specify a server")
|
||||
var ipfile = fs.readFileSync(`${__dirname}/ip.txt`, 'utf8')
|
||||
if (ipfile.includes(server)) return;
|
||||
res.send("allah")
|
||||
mc.status(server, 25565, {enableSRV: true}).then(res => {
|
||||
var playerlist = ""
|
||||
if (res.players.sample != null) {
|
||||
res.players.sample.forEach(e => playerlist += `${e.name}::${e.id}\n`)
|
||||
} else {
|
||||
playerlist += "No players"
|
||||
}
|
||||
var ip = geoip.lookup(server)
|
||||
if (res.motd.clean.includes("'")) var cleanmotd = res.motd.clean.replace(/'/g, "\\'")
|
||||
else cleanmotd = res.motd.clean
|
||||
if (res.motd.clean.includes('-')) var cleanmotd = res.motd.clean.replace(/-/g, '\\-')
|
||||
else cleanmotd = res.motd.clean
|
||||
db.exec(`INSERT INTO servers VALUES (
|
||||
'${server}:25565',
|
||||
'${res.version.name}',
|
||||
'${res.players.online}/${res.players.max}',
|
||||
'${playerlist}',
|
||||
'${res.roundTripLatency}ms',
|
||||
'${cleanmotd}',
|
||||
'${(new Date()).toLocaleDateString('en-US')}'
|
||||
)`)
|
||||
if (ip.country === "FR") {
|
||||
const embed = new discord.MessageBuilder()
|
||||
.setTitle("TaxenHeimer")
|
||||
.setColor("#00ff00")
|
||||
.addField("**Host**", `\`${server}:25565\``, true)
|
||||
.addField("**Country**", `\`${countrify(ip.country)}\``)
|
||||
.addField("**Version**", `\`${res.version.name} (${res.version.protocol})\``, true)
|
||||
.addField("**Players**", `\`${res.players.online}/${res.players.max}\``, true)
|
||||
.addField("**Ping**", `\`${res.roundTripLatency}ms\``, true)
|
||||
.addField("**Motd**", "```\n"+res.motd.clean+"\n```")
|
||||
.addField("**Playerlist Sample**", "```\n"+playerlist+"\n```")
|
||||
.addField("**IP Range**", "```\n" + geoip.pretty(ip.range[0]) + " - " + geoip.pretty(ip.range[1]) + "```")
|
||||
.setTimestamp()
|
||||
webhookfronce.send(embed)
|
||||
}
|
||||
if (res.version.name.includes("1.17")) {
|
||||
const embed = new discord.MessageBuilder()
|
||||
.setText("<@390491795655622657>")
|
||||
.setTitle("TaxenHeimer")
|
||||
.setColor("#00ff00")
|
||||
.addField("**Host**", `\`${server}:25565\``, true)
|
||||
.addField("**Country**", `\`${countrify(ip.country)}\``)
|
||||
.addField("**Version**", `\`${res.version.name} (${res.version.protocol})\``, true)
|
||||
.addField("**Players**", `\`${res.players.online}/${res.players.max}\``, true)
|
||||
.addField("**Ping**", `\`${res.roundTripLatency}ms\``, true)
|
||||
.addField("**Motd**", "```\n"+res.motd.clean+"\n```")
|
||||
.addField("**Playerlist Sample**", "```\n"+playerlist+"\n```")
|
||||
.addField("**IP Range**", "```\n" + geoip.pretty(ip.range[0]) + " - " + geoip.pretty(ip.range[1]) + "```")
|
||||
.setTimestamp()
|
||||
neithook.send(embed)
|
||||
}
|
||||
const embed = new discord.MessageBuilder()
|
||||
.setTitle("TaxenHeimer")
|
||||
.setColor("#00ff00")
|
||||
.addField("**Host**", `\`${server}:25565\``, true)
|
||||
.addField("**Country**", `\`${countrify(ip.country)}\``)
|
||||
.addField("**Version**", `\`${res.version.name} (${res.version.protocol})\``, true)
|
||||
.addField("**Players**", `\`${res.players.online}/${res.players.max}\``, true)
|
||||
.addField("**Ping**", `\`${res.roundTripLatency}ms\``, true)
|
||||
.addField("**Motd**", "```\n"+res.motd.clean+"\n```")
|
||||
.addField("**Playerlist Sample**", "```\n"+playerlist+"\n```")
|
||||
.addField("**IP Range**", "```\n" + geoip.pretty(ip.range[0]) + " - " + geoip.pretty(ip.range[1]) + "```")
|
||||
.setTimestamp()
|
||||
webhook.send(embed)
|
||||
fs.appendFileSync(`${server}\n`)
|
||||
}).catch(e => {})
|
||||
})
|
||||
app.listen(9000, () => {
|
||||
console.clear()
|
||||
console.log("server ready")
|
||||
})
|
||||
process.on("unhandledRejection", callback => {})
|
||||
process.on("uncaughtException", callback => {})
|
BIN
server/nn.png
Normal file
BIN
server/nn.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
3456
server/package-lock.json
generated
Normal file
3456
server/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
21
server/package.json
Normal file
21
server/package.json
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "taxenheimer",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "nodemon index",
|
||||
"compile": "bytenode --compile index.js",
|
||||
"runc": "bytenode index.js"
|
||||
},
|
||||
"author": "TaxMachine",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"body-parser": "^1.20.0",
|
||||
"bytenode": "^1.3.6",
|
||||
"discord-webhook-node": "^1.1.8",
|
||||
"express": "^4.18.1",
|
||||
"geoip-lite": "^1.4.5",
|
||||
"sqlite3": "^5.0.10"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user