Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

Looking into the tech of programming


ghost's Avatar
0 0

This is going to sound really stupid. But im honestly not a programmer at all. I dont know anything about App programming just web programming.

I looked into Perl for a while and out of all the languages i thought that it was a pretty cool language. I did all the beginner tutorials on perlmonks, and my questions are.

After doing the tutorials i realized i learned almost nothing. If anyone could answer, How do you look at loops, strings, control statements and arrays, take those and make a port scanner?


ghost's Avatar
0 0

see like what i was sayin, i dont understand how

print "Error: min port is higher then max port\n";
exit 1;
}
for($i = $ARGV[0]; $i <= $ARGV[1]; ++$i){
$host = IO::Socket::INET->new(PeerAddr=>$ARGV[2],PeerPort=>$i,proto=>'tcp',Timeout=>1) and print "Port $i is open\n";```

scans your computer. im gonna be honest and say i dont know what 
```markupif($ARGV[0] > $ARGV[1]){```
that is, im guessing its a string or array. but what my problem is is i have learned this stuff already, and after doing the tutorials i dont know how to make tools like these. i just know how to make to make a program print your name. X(

ghost's Avatar
0 0

Well I've just started learning Perl as well and the best way that I've heard so far is simply run the code and see what it does. Try and figure out what each piece does, same way most people find out how a computer works. Take it apart and see what makes it tick. Google is your friend (as always). Try this site: http://darkc0de.com/