摘要:
我的想法是做个web应用,然后调用perl去执行,最后返回结果.现在越来越近了.package perlexec;import java.io.BufferedReader;import java.io.IOException;import java.io.InputStream;import java.io.InputStreamReader;public class PerlExecDemo { public static void main(String[] args){ System.out.print(execPerl("1.pl")); } priv... 阅读全文
摘要:
function get_code(code_length){ //验证码设置 var rand_aa=""; //最终的结果 var code=new Array("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E&quo 阅读全文
摘要:
我就直接贴代码了。没做什么注释,因为还在修改,目前还有点不太理解,跑去看了下云舒的代码,感觉那个应该有点启发。回头好好修改下。这些多线程模块还有点不太熟悉,主要跟进程弄乱了。得好好琢磨下,如果可以改成别的就更爽了。不过他们都说perl多线程不靠谱。。汗。。#!/usr/bin/perluse Net::Ping;use threads;use threads::shared;system('clear');print "please set the IP(C):";chomp($ip=<STDIN>);print "StartIP:&q 阅读全文
摘要:
该脚本我总觉得有问题,但是一直都没想到好的办法解决。例如扫描结束以后,端口链接还在。#!/usr/bin/perl#data:2012/11/19#port scan demouse Socket;system('clear'); print "Enter IP: ";my $x;my $servip = <STDIN>;chop $servip;for($a=0;$a<=65000;$a++) { $ip_addr = sockaddr_in($a, inet_aton($servip)); ... 阅读全文
摘要:
当作偶尔练习,同时做个记录。小案例还是比较有用的。#!/usr/bin/perluse DBI;#connect my $dbh=DBI->connect("DBI:mysql:database=db;host=localhost","root","password",{'RaiseError'=>1});#select my $sth =$dbh->prepare("select * from people");$sth->execute();#clean up$dbh-& 阅读全文