Perl // Python General discussions about Perl and Python.

InterN0T Affiliates:
EvilZonepy1337

SirCapsAlot.NET

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 16th November 2008, 02:52
hestas's Avatar
InterN0T Crew
 
Join Date: Jun 2008
Posts: 650
Blog Entries: 2
Rep Power: 13
Reputation: 159
hestas has made his way up the systemhestas has made his way up the system
Question:

Ive been searching around and can't to seem to find what the point of a "list" would be.

For example:
Code:
li = ['a', 'b', 'c']
li.extend(['d', 'e', 'f'])
print li [:6]
li.append ("new")
print li
Ok so this would create a list of a,b,c then extend the list to a,b,c,d,e,f then print the entire list of 'a', 'b', 'c', 'd', 'e', 'f'. After printing it would add the new item to the list in this case "new" and finally print out a final list including new to the end of the list.

Now i think i understand this but i don't understand what the point of doing this. What could it be used for? (Not just my example)
__________________
"Intern0t, fight crime with crime, preventing internet security risks since 2009!"
Reply With Quote
  #2  
Old 16th November 2008, 14:32
Dragon[Sky]'s Avatar
Anti-Social Engineer
 
Join Date: Jun 2008
Location: Psychedelic Skies
Posts: 286
Rep Power: 11
Reputation: 77
Dragon[Sky] will become a Token soon
Re: Question:

Logging?
Logs should be appended below each other, not overwritten.
I'm not sure what your point is though.
__________________

Reply With Quote
  #3  
Old 17th November 2008, 02:23
hestas's Avatar
InterN0T Crew
 
Join Date: Jun 2008
Posts: 650
Blog Entries: 2
Rep Power: 13
Reputation: 159
hestas has made his way up the systemhestas has made his way up the system
Re: Question:

i was dead tired, but now i get it :D ty dsky
__________________
"Intern0t, fight crime with crime, preventing internet security risks since 2009!"
Reply With Quote
  #4  
Old 17th November 2008, 16:44
Drathnar's Avatar
 
Join Date: Jul 2008
Posts: 406
Blog Entries: 1
Rep Power: 12
Reputation: 172
Drathnar has made his way up the systemDrathnar has made his way up the system
Re: Question:

Not always just logging.. but yes DSKY is right it is used to append data so you are not overwriting a file and losing old data.
__________________
Drathnar
Director of Information Systems Security -- TSC Corp.
Owner Black Panther Consulting -- ISS Consulting

Reply With Quote
  #5  
Old 17th November 2008, 20:55
hestas's Avatar
InterN0T Crew
 
Join Date: Jun 2008
Posts: 650
Blog Entries: 2
Rep Power: 13
Reputation: 159
hestas has made his way up the systemhestas has made his way up the system
Re: Question:

could you give some other examples Drath??
__________________
"Intern0t, fight crime with crime, preventing internet security risks since 2009!"
Reply With Quote
  #6  
Old 17th November 2008, 22:20
Drathnar's Avatar
 
Join Date: Jul 2008
Posts: 406
Blog Entries: 1
Rep Power: 12
Reputation: 172
Drathnar has made his way up the systemDrathnar has made his way up the system
Re: Question:

well lets say you are running a script on a database backbone like sql or oracle or something of the like... you would use a script such as that (not exactly but similar) in order to append records to the database vice overwriting the table each time the script is ran..


or in dealing with a file you could use it the same way lets say you have a mainframe that stores data.. you would then export the data and use that script to append the data to the file rather than overwriting the file.. so you have the data for historical purposes..

or you write a program that needs to keep track of things that were done in the past it would need to append rather than overwrite

So it is like logging but not logging in its default terminology rather historical data retention.

probably didn't help much lol but basically what i was trying to say is associating the word logging and solely logging with the process is not entirely correct as it is used for other things as well..

any time you would have the need to add rather than replace this would be a viable solution.
__________________
Drathnar
Director of Information Systems Security -- TSC Corp.
Owner Black Panther Consulting -- ISS Consulting

Reply With Quote
  #7  
Old 18th November 2008, 01:13
hestas's Avatar
InterN0T Crew
 
Join Date: Jun 2008
Posts: 650
Blog Entries: 2
Rep Power: 13
Reputation: 159
hestas has made his way up the systemhestas has made his way up the system
Re: Question:

Ty Drath it helped
__________________
"Intern0t, fight crime with crime, preventing internet security risks since 2009!"
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Xss hacking question. VipVince General Hacking Discussions 2 22nd March 2010 13:06
Mac Battery Question Tsukasa The Offtopic Section 3 18th November 2009 23:32
C++ Keylogger Question nemesis C // C++ 17 5th November 2009 10:53
Question About XOR usage ccoder General Security Discussions 5 1st November 2009 17:37
Question macd3v Java // Ruby 2 22nd December 2008 13:07


All times are GMT +2. The time now is 17:46.
Copyright ©2007 - Forever, InterN0T & Teh Unkwon

Hosted by 1and1