This forum is in archive mode. You will not be able to post new content.

Author Topic: [Source] text2Ascii.py  (Read 810 times)

0 Members and 1 Guest are viewing this topic.

Offline daxda

  • Peasant
  • *
  • Posts: 114
  • Cookies: 112
  • Not the guy you're looking for
    • View Profile
    • Daxda on Github
[Source] text2Ascii.py
« on: October 23, 2013, 04:28:40 PM »
I had nothing better to do and was looking for an easy project to realise, idea from Deque, thanks!
As always, take from it what you want, use it how you like.

[gist]Daapii/7119814[/gist]
« Last Edit: October 23, 2013, 04:45:07 PM by daxda »

Offline vezzy

  • Royal Highness
  • ****
  • Posts: 771
  • Cookies: 172
    • View Profile
Re: [Source] text2Ascii.py
« Reply #1 on: October 23, 2013, 05:21:49 PM »
What an ugly bowl of spaghetti. The font looks pretty similar to Figlet, too.
Quote from: Dippy hippy
Just brushing though. I will be semi active mainly came to find a HQ botnet, like THOR or just any p2p botnet

Offline vezzy

  • Royal Highness
  • ****
  • Posts: 771
  • Cookies: 172
    • View Profile
Re: [Source] text2Ascii.py
« Reply #2 on: October 23, 2013, 06:12:45 PM »
Try to think of a more elegant and structured way to achieve this than sloppy brute-force substitution, as it is now.
Quote from: Dippy hippy
Just brushing though. I will be semi active mainly came to find a HQ botnet, like THOR or just any p2p botnet

Offline Deque

  • P.I.N.N.
  • Global Moderator
  • Overlord
  • *
  • Posts: 1203
  • Cookies: 518
  • Programmer, Malware Analyst
    • View Profile
Re: [Source] text2Ascii.py
« Reply #3 on: October 23, 2013, 07:19:48 PM »
Whenever you catch yourself writing repetitive code all over the place your allarm bells should ring.
There is this rule (I don't know who invented it) that says: If you repeat something three times or more, refactor it.
You are repeating - well - much more.
As I told you on HC you may look at some similar codes there to get ideas.

Offline daxda

  • Peasant
  • *
  • Posts: 114
  • Cookies: 112
  • Not the guy you're looking for
    • View Profile
    • Daxda on Github
Re: [Source] text2Ascii.py
« Reply #4 on: October 23, 2013, 07:23:38 PM »
Thanks for your feedback aswell Deque!
I'm aware that this way is very repetetive, I didn't know of a better way to do it.
I'll give the other people's code a read.
« Last Edit: October 23, 2013, 07:27:43 PM by daxda »

 



Want to be here? Contact Ande, Factionwars or Kulverstukas on the forum or at IRC.