#!/usr/bin/perl -- #~ .../buginmy.pl #~ 2013-10-16-23:50:42 #~ #~ ## perltidy -olq -csc -csci=10 -cscl="sub : BEGIN END if " -otr -opr -ce -nibc -i=4 -pt=0 "-nsak=*" #!/usr/bin/perl -- use strict; use warnings; #charset below would be 1 and in future 1 for bookmark and 0 for history item my @charset = ( '1', '0' ); my @charset2 = ( '' ); my @charset3 = ( '' ); my @charset4 = ( ( 'A' .. 'Z' ), ( 'a' .. 'z' ) ); my @charset5 = ( ( 'A' .. 'Z' ), ( 'a' .. 'z' ) ); my @charset6 = ( '1' .. '1000' ); my @charset7 = ( 'http://www.', 'https://www.' ); my @charset8 = ( '.com', '.co', '.in', '.info', '.org', '.net', '.biz', '.us', '.me', '.mobi', '.co.in', '.firm.in', '.gen.in', '.ind.in', '.net.in', '.org.in', '.tv', '.ag', '.am', '.asia', '.at', '.be', '.bz', '.ca', '.cc', '.co.nz', '.co.uk', '.com.ag', '.com.au', '.com.br', '.com.bz', '.com.co', '.com.es', '.com.mx', '.com.pe', '.com.so', '.com.tw', '.cz', '.de', '.es', '.eu', '.fm', '.fr', '.gs', '.idv.tw', '.it', '.jobs', '.jp', '.la', '.me.uk', '.ms', '.mx', '.net.ag', '.net.au', '.net.br', '.net.bz', '.net.co', '.net.nz', '.net.pe', '.net.so', '.nl', '.nom.co', '.nom.es', '.nom.pe', '.org.ag', '.org.au', '.org.es', '.org.nz', '.org.pe', '.org.so', '.org.tw', '.org.uk', '.pe', '.se', '.so', '.tk', '.tw', '.ws', '.xxx' ); my @charset9 = ( '":"' ); my @charset40 = ( '"' ); my @charset41 = ( ',' ); my @charset42 = ( '{"browserBookMarksData":[' ); my @charset43 = ( ']}' ); my @charset51 = ( '{' ); my $i = 0; my $prefix; my $suffix; print "Enter the limit : "; chomp( my $lim = ); { $prefix .= $charset42[ rand( @charset42 ) ]; } { $suffix .= $charset43[ rand( @charset43 ) ]; } #~ open( FILE, ">>bookmarkmirror.json" ); *FILE = *STDOUT; print FILE ( "$prefix" ); while( $lim-- ) { my $bookMark; my $created; my $date; my $title; my $url; my $www; my $com; my $visits; my $quotes; my $comma; my $start; my $end; my $curly; my $extra; { $bookMark .= $charset[ rand( @charset ) ]; } { $created .= $charset2[ rand( @charset2 ) ]; } { $date .= $charset3[ rand( @charset3 ) ]; } { $title .= join '', @charset4[ map { int rand @charset4 } ( 1 .. 8 ) ]; } { $url .= join '', @charset5[ map { int rand @charset5 } ( 1 .. 8 ) ]; } { $visits .= $charset6[ rand( @charset6 ) ]; } #if ($EmailType == '0'){ #$m_emailLabel .="test";} #else {$m_emailLabel .="";} { $quotes .= $charset40[ rand( @charset40 ) ]; } { $comma .= $charset41[ rand( @charset41 ) ]; } { $curly .= $charset51[ rand( @charset51 ) ]; } { $www .= $charset7[ rand( @charset7 ) ]; } { $com .= $charset8[ rand( @charset8 ) ]; } { $extra .= $charset9[ rand( @charset9 ) ]; } print FILE ( "$curly" . "\"bookMark\"\:" . "$quotes" . "$bookMark" . "$quotes" . "$comma", "\"created\"\:" . "$quotes" . int( rand( 10000000000000 ) ) . "$quotes" . "$comma", "\"date\"\:" . "$quotes" . int( rand( 10000000000000 ) ) . "$quotes" . "$comma", "\"title" . "\"\:\"$title\"" . "$comma", "\"url" . "$extra" . "$www" . "$url" . "$com\"" . "$comma", "\"visits" . "\"\:\"$visits\"\}\ " . if( $lim != $i ) { "$comma"; } ## end if ); if( $lim == '1' ) { print FILE ( "," ); } $i++; } print FILE ( "$suffix" ); close( FILE );