Skip to content
This repository was archived by the owner on Feb 24, 2026. It is now read-only.

Commit 2c9fa78

Browse files
authored
Merge pull request #2 from Agalar-Development/dev
Push dev to main for release
2 parents 2b71ff8 + b140883 commit 2c9fa78

File tree

12 files changed

+2418
-393
lines changed

12 files changed

+2418
-393
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
.idea
44
build/
55
node_modules/
6-
scan.json
6+
scan.json
7+
logs/

copenJSParser/src/main/kotlin/io/crawleyyou/Main.kt

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,20 @@ var hashMaps = mutableListOf(protocolVersionHashMap, maxPlayerHashMap, protocolH
2020

2121
fun main(args: Array<String>) {
2222
try {
23-
println("Trying mode ${args[1]} with file ${args[0]}")
24-
copenJSParser(args[0], args[1].toInt())
23+
println("Starting mode ${args[1]} with file ${args[0]}")
24+
copenJSParser(args[0], args[1].toInt(), args[2])
2525
} catch (e: Exception) {
2626
println("No input file/mode specified using sample file and starting scanner mode: copenJS")
2727
copenJSParser(Paths.get("").toAbsolutePath().parent.toString() + "/scan.json", 0)
2828
}
2929
}
3030

3131
@Suppress("ClassName")
32-
class copenJSParser (fileLocation: String, mode: Int) {
32+
class copenJSParser (fileLocation: String, mode: Int, extra: String? = "null") {
3333
init {
3434
when (mode) {
3535
0 -> {
36-
ServerReader(fileLocation)
36+
ServerReader(fileLocation, extra)
3737
}
3838
1 -> {
3939
GraphReader(fileLocation)
@@ -44,8 +44,9 @@ class copenJSParser (fileLocation: String, mode: Int) {
4444
}
4545
}
4646
@Suppress("FunctionName")
47-
private fun ServerReader(args: String) {
47+
private fun ServerReader(args: String, startFrom: String?) {
4848
var count = 0
49+
var startStatus = false
4950
try {
5051
val client = Socket("localhost", 9532)
5152
println("Reading file: $args " + LocalDateTime.now().toString())
@@ -55,9 +56,14 @@ class copenJSParser (fileLocation: String, mode: Int) {
5556
json.forEach { data ->
5657
count++
5758
val ip = data.split('"')[0]
58-
println("Current IP: $ip")
59-
client.outputStream.write(ip.toByteArray())
60-
TimeUnit.MILLISECONDS.sleep(50)
59+
if (startFrom == ip) {
60+
startStatus = true
61+
}
62+
else if (startStatus) {
63+
println("Current IP: $ip")
64+
client.outputStream.write(ip.toByteArray())
65+
TimeUnit.MILLISECONDS.sleep(5)
66+
}
6167
}
6268
println("$count IP's processed. " + LocalDateTime.now().toString())
6369
}

exclude.conf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
# Limited Broadcast
4040
255.255.255.255/32
4141

42-
4342
#Received: from elbmasnwh002.us-ct-eb01.gdeb.com ([153.11.13.41]
4443
# helo=ebsmtp.gdeb.com) by mx1.gd-ms.com with esmtp (Exim 4.76) (envelope-from
4544
# <bmandes@gdeb.com>) id 1VS55c-0004qL-0F for support@erratasec.com; Fri, 04
@@ -68,9 +67,6 @@
6867

6968
153.11.0.0/16
7069

71-
72-
73-
7470
#Date: Mon, 7 Oct 2013 17:25:41 -0700
7571
#Subject: Re: please stop the attack to our router
7672
#From: Di Li <di@egihosting.com>

0 commit comments

Comments
 (0)