mirror of
				https://codeberg.org/crimeflare/cloudflare-tor
				synced 2025-11-04 02:17:00 +01:00 
			
		
		
		
	Update 'tool/irssi_cf_alturl.pl'
This commit is contained in:
		
							parent
							
								
									885c3415a4
								
							
						
					
					
						commit
						17679eb510
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
					@ -185,12 +185,12 @@ sub GotUrl {
 | 
				
			||||||
            if ( $cfg_useshort == 1 ) {
 | 
					            if ( $cfg_useshort == 1 ) {
 | 
				
			||||||
                if ( length($myurl) > $cfg_minurllen ) {
 | 
					                if ( length($myurl) > $cfg_minurllen ) {
 | 
				
			||||||
                    deb("$target Creating Short URL for $myurl");
 | 
					                    deb("$target Creating Short URL for $myurl");
 | 
				
			||||||
                    $url = 'https://tinyurl.com/api-create.php?url='.$result;
 | 
					                    $url = 'https://ux.nu/api/short?format=plain&url='.$result;
 | 
				
			||||||
                    $browser = LWP::UserAgent->new;
 | 
					                    $browser = LWP::UserAgent->new;
 | 
				
			||||||
                    $browser->agent("Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Firefox/60.0");
 | 
					                    $browser->agent("cloudflare-tor (Thank you for this service)");
 | 
				
			||||||
                    $response = $browser->get($url);
 | 
					                    $response = $browser->get($url);
 | 
				
			||||||
                    $answer   = $response->content;
 | 
					                    $answer   = $response->content;
 | 
				
			||||||
                    if ( index( $answer, 'http://tinyurl.com/' ) == 0 ) {
 | 
					                    if ( index( $answer, 'https://ux.nu/' ) == 0 ) {
 | 
				
			||||||
                        $myurl = $answer;
 | 
					                        $myurl = $answer;
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue