Tag Archives: file
Check file extension in C

Don’t forget to define true and false constants. #define TRUE 1 #define FALSE 0#define TRUE 1 #define FALSE 0 int…

Check if file exists in C

Don’t forget to define true and false constants. #define TRUE 1 #define FALSE 0#define TRUE 1 #define FALSE 0 int…

Add a trailing slash in path if not exists – Java

String path = "/path/to/folder"; if(path.charAt(path.length()-1)!=File.separatorChar){ path += File.separator; }String path = "/path/to/folder"; if(path.charAt(path.length()-1)!=File.separatorChar){ path += File.separator; }

Check if file or directory exists in Java

Check if file exists: File f = new File("/path/to/filename"); if(f.exists()){ .. }File f = new File("/path/to/filename"); if(f.exists()){ .. } Check…

Backtrack wordlists

Backtrack 5 offers you two wordlist files. You can find them in /pentest/passwords/wordlists. darkc0de.lst and rockyou.txt enjoy!

Extract all printable characters from binary files

Strings is a very useful command that can extract all printable characters from binary files. Example: strings /usr/sbin/visudo | morestrings…

Brute force directories and files names on web application

OWASP DirBuster is a multi threaded java application designed to brute force directories and files names on web application servers….

Convert file from Latin or Greek to UTF8 encoding

Convert file from Latin to UTF8 iconv -f ISO-8859-1 -t UTF-8 myfile.txt > mynewfile.txticonv -f ISO-8859-1 -t UTF-8 myfile.txt >…

Download file from url with python

We are going to use urllib. #!/usr/bin/env python   import urllib   url = "http://server.com/files/myfile.jpg" file = urllib.urlopen(url) image =…

Write XML to File with Python

The code #!/usr/bin/env python   from lxml import etree as ET   root = ET.Element(’data’) person = ET.SubElement(root, ‘person’) firstname…

Previous Page · Next Page