Search the Community
Showing results for tags 'txt'.
-
I'm trying to load some data into a database. But I really don't use MySQL so much. It's been been long enough that I pretty much forgot what to do. What I want to do is load an at text or XML document into a database. But when I load the document into the database. I get a bunch of null entries which really doesn't do me any good. What I really need is a cheat sheet. Any good MySQL short documentation on this?
-
I don't know, maybe somebody will find this useful in their pentesting arsenal. #!/usr/local/bin/python # HTMLgetter v1.0 by Forgiven # This is a handy bit of python that will reap the HTML code of any page # and output it to a txt file of your choice. import urllib2 urlStr = raw_input('Input the full URL of the webpage whose HTML code you which to reap:') fileName = raw_input("Input the *.txt filename for the output:") fileName = fileName + ".txt" fileOut = open(fileName, "w") try: fileHandle = urllib2.urlopen(urlStr) str1 = fileHandle.read() fileHandle.close() print '-'*50 print 'HTML code of URL =', urlStr print '-'*50 except IOError: print 'Cannot open URL %s for reading' % urlStr str1 = 'error!' fileOut.writelines(str1) print str1 fileOut.close() I thought it was cool, creates a nice txt file of the HTML from a web page...I guess I don't have permission to upload the .py for this above. But the code is small and simple enough to cp. You can find it on github at the link.