Tag: make

C#

How to make a Http Web Request properly using C#

//.. private HttpWebRequest _httpwebrequest; //..//.. private HttpWebRequest _httpwebrequest; //.. private void button1_Click(object sender, EventArgs e) { Thread t = new Thread(new ThreadStart(Test)); t.IsBackground = true; t.Start(); }private void button1_Click(object sender, EventArgs e) { Thread t = new Thread(new ThreadStart(Test)); t.IsBackground = true; t.Start(); } public void Test() { Dictionary<String, String> dict = new Dictionary<String, String>(); …

Java

Create a Java Certificate

keytool.exe -genkey -keyalg algorithm -alias my_alias -keystore myfilename.jks -storepass my_password -validity my_days -keysize my_sizekeytool.exe -genkey -keyalg algorithm -alias my_alias -keystore myfilename.jks -storepass my_password -validity my_days -keysize my_size Options: -alias <alias> alias name of the entry to process -keyalg <keyalg> key algorithm name -keysize <keysize> key bit size -sigalg <sigalg> signature algorithm name -destalias <destalias> destination …

Network, Python

Make whois queries

PyWhois is a python module for retrieving WHOIS information of domains. Script: #!/usr/bin/python   import sys, whois from optparse import OptionParser   def main(): try: parser = OptionParser() parser.add_option("-d", "–domain", dest="domain", help="domain to query") (options, args) = parser.parse_args()   if options.domain==None: parser.print_help() sys.exit(0)   print ‘looking for ‘ + options.domain + ‘..n’ w = whois.whois(options.domain) …

Backtrack, Cracking, Wordlist

How to make a wordlist in BackTrack

Crunch is a wordlist generator where you can specify a standard character set or a character set you specify. crunch can generate all possible combinations and permutations. Features crunch generates wordlists in both combination and permutation ways it can breakup output by number of lines or file size now has resume support pattern now supports …

C#, Microsoft Windows

How to create zip file using C#

To create zip files we are going to use the DotNetZip library. Create zip file 1 2 3 4 5 6 7 8 9 10 11 12 13 14 /// <summary> /// add files into zip and save /// </summary> /// <param name="zipfile"></param> /// <param name="files"></param> public void createArchive(String zipfile, List<String> files) { ZipFile zip …

Javascript & Ajax

Performing GET and POST requests using Ajax

Let’s see a simple javascript method that uses XMLHttpRequest API and ActiveXObject(IE) to make HTTP GET and POST requests. function LoadDataInDiv(page, params, divid, method) { var http_request = false; if (window.XMLHttpRequest) { http_request = new XMLHttpRequest(); if (http_request.overrideMimeType) { http_request.overrideMimeType(’text/html’); } } else if (window.ActiveXObject) { try { http_request = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) …