I'm VERY new to programming at the moment, just starting out with some python. I have this script here that I'm trying to run :
#!/usr/bin/python
from os import system
def pingz():
system('ping -c 5 %(ab)s' % locals())
return;
def trace_route():
system('traceroute %(cd)s' % locals())
return;
print("Bitch_Ass_Name's Web Utility:")
print("____________________\n")
print(" 1)Ping a website/IP Address.\n")
print(" 2)Trace the route to a website/IP Address.\n")
print(" 3)Whois inforation.\n")
choice = raw_input("What would you like to do? \n")
if choice == 1:
ab = raw_input("Please enter the domain name/IP address:\n")
pingz()
elif choice == 2:
cd = raw_input("Please enter the domain name/IP Adress:\n"
trace_route()
else:
print "Please restart the script...you trickster, you."
When I try running it I get a "File ./test2.py, line 22
trace_route()
^
SyntaxError: invalid syntax"
Why am I getting a syntax error for the trace_route but not pingz()? It's the same fucking syntax :( What am I doing wrong? Besides being a shitty programmer who can't RTFM
Go fuck yourself.
Forgot right parentheses ya dingus
>>54386950
I appreciate the help, great community.
>>54386940
eat shit, fuck off to /dpt/, and learn to use fucking code tags
>>54386965
Which right parenthesis? I can't find any missing parenthesis :( Maybe that's what I get for trying to program without an IDE?
>>54386976
The one literally right before where the error is you dumb nigger
>>54386983
LOL I found out. I really do feel like a dumb nigger now. Thank you for the help though!! Here is a bonus bash script I made to parse Shodan for an IP's open ports and more. For my oh so friendly ne/g/ros :
#!/bin/bash
echo -n "Enter IP ADDRESS : "
read SHADOW
curl https://www.shodan.io/host/$SHADOW | egrep -wi -A1 --color 'Ports\open|Coun try|City|Organization|ISP|Hostnames|service-details|service-main'
>>54386966
who said this was a community?
this is a board about technology not about homework or how to google stuff
go to r.eddit and paste yourBitch_Ass_Nameshit there
>>54386940
>ab = raw_input("Please enter the domain name/IP Adress:\n")
>cd = raw_input("Please enter the domain name/IP Adress:\n"
what's the difference?
the variable.. and the )
>>54387528
Yeah, lol I figured it out. The script still doesn't run because I'm a retarded negro, but I'm working it out <3