Chinaunix首页 | 论坛 | 博客
  • 博客访问: 42618
  • 博文数量: 18
  • 博客积分: 934
  • 博客等级: 准尉
  • 技术积分: 210
  • 用 户 组: 普通用户
  • 注册时间: 2010-04-27 22:24
文章分类

全部博文(18)

文章存档

2011年(1)

2010年(17)

我的朋友
最近访客

分类:

2010-12-28 19:36:04

#!/usr/bin/perl -w
use 5.010;
use strict;
use WWW::Mechanize;

die unless -e $ARGV[0];
my $mech = WWW::Mechanize->new();
my %servers =
    (
     "" => {image => $ARGV[0]},
     "" => {userfile1 => $ARGV[0]},
     "http://imagebin.org/index.php?page=add" => {nickname => 'null', image => $ARGV[0], disclaimer_agree => 'Y'},
     "" => {poster => 'null', code2 =>'', screenshot => $ARGV[0]},
    );
my $server = (keys %servers)[rand keys %servers];
$mech->get($server);
$mech->submit_form(with_fields => $servers{$server});
if ($mech->success()) {
    my $url = $mech->uri();
    system("echo $url | xsel -i");
    say $url;
}

阅读(604) | 评论(0) | 转发(0) |
0

上一篇:.urxvt配置

下一篇:.Xdefault

给主人留下些什么吧!~~