#programming

1 messages · Page 33 of 1

fleet vortex
#

10/0.85 = x

#

x is the number you want

#

0.85 comes from 1-0.15 (the percentage)

lilac holly
wispy kestrelBOT
#

Gave +1 Rep to @fleet vortex

lilac holly
#

I am new at this of hacking

#

How can i learn ir someone that can explain to me how i can get a password of a account?

lilac holly
#

Like, a password for a account of microsoft

onyx merlin
empty ridge
buoyant pewter
dusk grove
#

well actually

#

I can help

#

you can practice something called password brute forcing

#

where you brute force a password

#

to an account

#

to keep this legal you should install DVWA or daamn vulnerable web applications

#

assuming you have a linux system with docker installed

#

then you can learn the brute force attacks

#

or brute force the ssh login of metasploit

magic falcon
#

@dusk grove That user already admitted that the purpose would be for illegal activity. Do not give suggestions when the activity would be illegal or unethical.

dusk grove
#

Oh

#

Ok sorry

#

Yea in only talking legal and btw if that illegal user is reading you need to learn how to do it with different accounts and services anyways so its harder to fo

#

Hey guys

#

I wanna learn scary for programming in python since it allows you to hack many things easily, but where is a good place to learn it? Since right now in just copy and pasting it form other places

granite agate
#

You don't learn programming by just copy and paste

dusk grove
#

I k

#

That's why I want to learn scapy

#

I know regular python but I need to learn scapy for making hacking scripts

magic falcon
#

You keep adding random stuff in 'because hacking'. Programming and hacking are different activities, they aren't interchangeable.

dusk grove
#

I just want to learn scapy

dusk grove
#

Like I get that I need to learn regular python but scapy too right? That's how we hack the wifi networks

rain rover
#

hello
doing the intro to x86-64 room on thm and i`m having some difficulties in determing the value of var-8h

initially the value is 0x63
then the value is compared to the eax
and then the following happens " andl 0x64, var-8h

any idea how to compute this or maybe u cn redirect me to some resource where i can learn to compute it
Image

#

anyone can help?

true pumice
#

Hey 🙂

I have a simple website created using bootstrap.
I need to implement login and registration, would php be the best and easiest for doing this or is there a better way?

magic falcon
#

i would think django would be better out of the box for that

true pumice
#

Ah, I forgot django existed

magic falcon
#

PHP will have a lot of that functionality as well, but I know django has a lot of prebuilt templates included in the base install

true pumice
#

I'll have to check it out. Thank you juun 🙂

magic falcon
#

touching php always makes me die a little inside if it's not for aggresive security

#

you welcome, jabba. i know you aren't a fan of python, but it really does a lot of things in a well-organized way. Just having that code style and guides out there make it a much easier lift

true pumice
#

Yeah, I was dreading it haha, I don't need anything super complex, as long as they can login then it's fine.

magic falcon
#

unfortunately logging in is one of those things that is always going to have a certain amount of complexity. I think django does a pretty good job of it, and it lets you pick a backing database at the start

true pumice
#

I'm not a fan of Python's format, the language itself isn't too bad 😁
I just love my code to look awesome as well as work

magic falcon
#

just don't try to migrate data to other kinds of databases, the migration script will break horribly

true pumice
#

Ah, I'll keep that in mind. Thank you

sullen venture
#

try nest.js 😅

plucky helm
#

Isn't that for frontend?

sullen venture
#

nope, thats next.js

magic falcon
#

I would strongly recommend going through the django tutorials as well, if you haven't. One of the tasks in the tutorial is setting up registration and local auth

sullen venture
#

is it just login and registration?

rain rover
#

thanks anyways

brazen eagle
#

nest is alright but it's more for APIs in my view

sullen venture
brazen eagle
#

for small things I'd go with flask or something

#

for a microservice then I don't know.

#

Quarkus is nice

dusk grove
#

But I have to agree java and c++ looks cooler

#

Python is easier to code

true pumice
#

Java is pain

brazen eagle
#

you can compile to native with graal

#

Java is fine

#

it was pain in 2002 granted

true pumice
#

Java is the reason why I drink energy drinks

dusk grove
#

Instead of typing  public static void main(String[] args)

You just type print ("hello")

brazen eagle
#

Java 8 made things alright, and Java 17 is better

dusk grove
#

Java is really annoying

#

C is ok

magic falcon
#

I thought consumed red bull to clear the inbox queue?

brazen eagle
#

I still prefer Kotlin though

true pumice
dusk grove
#

C C# and C++ are very similar

#

Tbh

brazen eagle
#

nah, C is pretty basic

magic falcon
#

Java as a language does have some weird corners; the biggest problem with Java is projects that get tied to a specific point version.

brazen eagle
dusk grove
#

In python everything is an object so it's easier to code

brazen eagle
#

every recent version is back compatible

magic falcon
#

dating back to 1.4

true pumice
brazen eagle
#

well, they don't HAVE to be, the big split these days is between Java 8 and 11

#

because they redid the entire module structure

magic falcon
#

python doesn't to OOP very well.

#

encapsulation really isn't a thing that py understands

brazen eagle
#

python doesn't do well past 2 or 3 classes

magic falcon
#

Last time i touched java in any kind of depth, 1.8 was brand new

true pumice
#

Python would be a great language if corners weren't cut to make it "easier" for devs.

brazen eagle
#

1.8 introduced Lambdas

magic falcon
#

full closures or just whatever janky 'we need to keep up with C++11' hack to included?

rocky mica
#

is there a programming language most used?

sullen venture
#

anybody working with swagger-codegen? the ios and android developers i work with generate their code from my api with it and i find it pretty weird. don't know how common that is

true pumice
magic falcon
#

python is very use-case specific. Prototyping? Awesome. Do you need high powered compute? Significantly less awesome. Recursion? Not at all. Async? It's getting much better.

brazen eagle
true pumice
#

You could justify why you think a programming language is the most popular but it is hard to actually know without having numbers to reference.

magic falcon
onyx merlin
#

Python OOP makes me blegh

brazen eagle
#

it's better than nothing

brazen eagle
onyx merlin
#

Python string handling and HTTP requests etc really nice, Requests is a great library

magic falcon
onyx merlin
brazen eagle
#

Groovy and Scala did closures better I think

#

and Clojure

rocky mica
#

im thinking about learn javascript

magic falcon
#

Would that be your first programming language?

faint sparrow
#

nothing is stopping you from doing that

sullen venture
rocky mica
#

i just learn a little bit of C

brazen eagle
#

Javascript annoys me because most framework authors think introducing breaking changes every odd point revision is a good idea

magic falcon
#

A lot of first-time programmers struggle when making the jump from JS to other, more robustly defined languages. I would recommend something like Java or python as a first language.

rocky mica
#

hum...

true pumice
magic falcon
#

I've heard that typescript is more strictly defined and has actual rules that get enforced.... but the entire family of JS-like scripting languages is irritating

rocky mica
#

if that the case i can start with python

#

talking about that its easy to learn how to use github?

true pumice
#

If you want to learn JavaScript, learn the programming fundamentals and then go straight to JavaScript (imo).

Spending too long in one language when planning on moving to another one will build bad habits in the one you're moving to.
Or at least this is what I struggled with from starting out in Python, everyone is different

magic falcon
#

python is good at being 'acceptably bad' in a lot of areas - that is one of the reasons it has spread so far and so deeply.

sullen venture
magic falcon
#

And it's really easy to whip up some scripts to process a small-ish chunk of data or automate some other tasks in a relatively short period of time

true pumice
#

Mhm, if I need something fast, I'll go for Python. Especially as I've spent so long in it that I can easily make scripts from any bit of documentation work reliably enough. Python's "beginner friendly" and simple format makes that 100% easier.

magic falcon
#

Sphinx is one of the most useful python libs, and doesn't get enough use.

#

Want me to break a webapp? Cool. Actually work with that codebase? Not in the slightest.

true pumice
#

That's my mindset with everything bahaha

#

'tis a terrible one

sullen venture
solar hull
empty ridge
#

Hah, nerds!

solar hull
#

Yes.

sullen venture
dusk grove
#

I'd leave the app development but I don't know java and in trying to learn python for hacking

#

So it's a completely different topic

brazen eagle
solar hull
brazen eagle
#

Java is a bit slow in general

solar hull
#

But it has a number of features that would make java a lot less painfuls.

#

pattern matching, record, switch expressions, for example.

brazen eagle
#

They ripped everything from kotlin

#

And kotlin still does it better

solar hull
#

kotlin still builds on jvm, which makes the performance improvements etc come from changes in java.

brazen eagle
#

Well jvm and java are not quite the same thing

solar hull
#

But synced in release cycles 🙂

#

and java still drives pretty much every improvement to jvm.

brazen eagle
#

Yeah well

fickle siren
#

Say a game was built for Windows and Mac but not Linux and you had the source code to it.

#

Would it be too much of a stretch on average to compile it for Linux?

magic falcon
#

It's possible.

#

Even language-standard libraries might can behave differently

lilac holly
# fickle siren Would it be too much of a stretch on average to compile it for Linux?

just like Juun said, it can be done and it depends on the libraries for stuff like display, sound, keyboard/mouse input, etc (https://www.youtube.com/watch?v=F4Dv32-PoU4)

A step by step tutorial on how i ported Chocolate Doom over to the Nintendo Switch in about 45 minutes, complete a walkthrough on all the tools i use on the Nintendo Switch and PC in order to test and debug my code.

► Chocolate Doom Port - https://github.com/lantus/chocolate-doom-nx
► Setting Up a Dev Environment - http://switchbrew.org/index....

▶ Play video
gleaming dome
rare sluice
#

What’s best place for learning oops in python?

rare sluice
wispy kestrelBOT
#

Gave +1 Rep to @heavy rampart

urban cliff
#

Hello there!
Is anyone here maybe good with Java MQRabbit? 🙂

true pumice
#

I have a login function coded in PHP but it is not redirecting/ refreshing after the user logs in successfully.
Here's the code:

```php
[Code Removed]
```

And this is what calls the function:
```php
[Code Removed]
```~~~
brazen eagle
true pumice
#

That's mainly for debugging, they don't actually do anything.
I'm removing them after the login & register pages work and just using client-side validation. (It's not going to be a public site so I'm not too bothered about securing etc.)

brazen eagle
#

would the exit(); be killing the redirect before the client gets to actually do it?

#

Location should be a capital L...

true pumice
#

I have also tried capitals in location..

#

Yup, tried it.

brazen eagle
#

and you'll probably want a 301 no?

true pumice
#

I'm not sure I understand 😅

brazen eagle
#

302 won't redirect

true pumice
#

OH

#

I'm stupid

#

I was thinking of 301 reeee

brazen eagle
#

301 will

true pumice
#

I found the problem, 'twas the ajax breaking my page

lilac holly
#

who's familiar with js/java? How do games hosted casino on sites work/ and would they be vulnerable to css or leveraged to gain an advantage?

dusk grove
#

Well remember most sites are made with a combination of html css and JavaScript

lilac holly
#

javascript is used on the client side, correct?

dusk grove
#

Html is building the website, css is making buttons and structuring stuff, and JavaScript is used for interactions

#

That's how I look to think of it too

#

As a beginner

lilac holly
#

so in this scenario, lets say a winning number is 10. would that information be stored on a server and called to thru the application?

dusk grove
#

Well I'm also a semi newbie like you so I may not be able to completely answer this but let me give it a try

#

Well it would be stored as data I think

#

If you guessed the correct number

#

It would probably tell the server the number you got

#

And the server responds

#

Also is this a ctf?

#

That you are doing

lilac holly
#

general curiosity, not even thm related...i think

dusk grove
#

Oh ok

#

Yea same

#

Curiosity is what gets you stuff

lilac holly
#

im gonna look into it more, bc the steps from clicking a hyperlink and shit popping up on the screen is still wildly remote to me

#

thx for the help

dusk grove
#

Well if you are getting into web applications

#

I would recommend checking out DVWA

#

And OWASP juice shop

#

Also dude I'm just like you the people on this server are like talking about computer science degrees and stuff and I'm just some guy trying to learn this stuff on a budget and no school education

#

Well right then high school obviously

#

But if you are having trouble learning this stuff then I definitely feel your pain!

lilac holly
#

I’m starting a bs for cyber this year, but I had no experience in this field until my first job

#

Will do

dusk grove
#

yea sorry I know I sound weird Im just happy to finally see someone on this server that is like my skill

#

Im like beginner-intermediate I can do some attacks and wifi stuff

#

but Im not a master

#

in everything

timid dove
autumn plover
#

Hey !
I'm trying to write a script for port scanning with python sockets ...!
I'm done with port scanning . But i want to detect the services name may be i can get service name using this func (socket.getservbyport()). but i'm not able to find their versions plus the OS detection using sockets.
Can i get this info using sockets.?
I've googled but didn't find any clue.
I'll be very grateful if you guys give me any clue.
Thank you

tulip sail
# autumn plover Hey ! I'm trying to write a script for port scanning with python sockets ...! I...

Sometimes.
Fingerprinting ports depends on what the port returns when you connect to it (or, the "fingerprint" if you will).
Try connecting to the ports with netcat to get an idea of what these look like.
Some ports accept the connection but don't return anything -- these are the difficult ones to identify. Most TCP ports will return something, and that can be looked up in a database of stored fingerprints to match it up with a service/version.

#

So, basically, get your hands on a fingerprint database, read off however many bytes from connecting to the port, then look them up in the DB

onyx merlin
tired river
#

Hii can you suggest me a good laptop for programming and some casual gaming a15 😄

dusk grove
#

well

#

for me I use acer nitro 5

#

and I like it

#

if you are willing to fork out ~700 then you get 512gb of memory (for storing games and old programming) 8gm of ram that you can easily upgrade to 16gb (for gaming - you dont need 8gb of ram for programming) A gtx 1650 or sometimes they even put a 1650ti in there (for gaming obviously), 3 usb ports and an hdmi + hdmi mini port

#

I have had the laptop for 6 months and it runs great, Ive ocasionally tested games like CSGO Black Squad, Minecraft (with intense shaders and mods) and Halo

#

it runs like a charm

#

probably the best laptop I have ever owned

magic falcon
dusk grove
#

yea raspberri pi is great ofr hacking

#

for*

#

it even has an inbuilt wifi scanner

#

I got one and I love it

#

but I would recommedn you get the kit

#

recommend*

#

so you have all the pieces to put it together

#

if you want to learn hacking and coding the raspberri pi is the best

#

but of course if you want a more permenant option as a desktop setup or laptop for other purposes you should look into a desktop or laptop

onyx merlin
dusk grove
#

starting there

#

but raspberri pi kit comes with a coding book

#

and it has everything up to and including classes, functions, object oriented programming, and web programming

#

which will help a person learn sockets and stuff

dusk grove
onyx merlin
#

You can do wifi hacking with a literal $1 wifi USB dongle

dusk grove
#

the wifi dongles are hard to set up

surreal bronze
#

It's plug and go

dusk grove
#

and often fail to work\

#

dude Ive tried it for months

#

the raspberri pi has never failed in wfii

surreal bronze
#

I can try and send you the one I use

onyx merlin
#

Then you're buying the wrong hardware ngl.

surreal bronze
#

^

dusk grove
#

its approved for kali

#

it has monitor mode

#

problem is

#

it cant find networks

#

well sometimes it does

onyx merlin
#

A raspberry pi is good, but it's not the best purchase.

#

Also seriously, type a sentence in a single message. Sending 10 messages to make a point just fills up the channel.

surreal bronze
#

Yup you definitely don't need a pi to learn hacking

dusk grove
#

also a raspberri pi can help as an independent computer for hacking as well. if you have a main machine but want a hardware based kali verison

surreal bronze
#

VM?

dusk grove
#

ye

#

those are good

onyx merlin
#

There's a major reason to use VMs. Snapshots.

dusk grove
#

but sometimes they have issues

#

I like virtualbox but

onyx merlin
#

Not if you're doing it right

dusk grove
#

Ive had my points where I like the hardware

onyx merlin
#

Kali designs for VMs because professionals often use VMs with Kali

dusk grove
#

yes i k

surreal bronze
#

What problems have you had?

dusk grove
#

and I get it if you have a windowx 10 desktop with virtualbox its fine

#

well for starters

#

its hard to hook up and transfer files to other pcs on a virtual machine alone

onyx merlin
#

It's not.

dusk grove
#

wheras hardware it was easy for me to tranfer via usb

onyx merlin
#

You can pass through USBs to VMs.

#

All of these problems are trivially solvable.

dusk grove
#

Im just saying the problems I had other ppl might have had no issues. Im just saying I liked the raspberri pi and found it much easier to do things then a vm

surreal bronze
#

You can access VM files thruh windows explorer as a drive

dusk grove
#

but also I think its important to know for anyone interested in the raspberri pi that you cant hook it up to your pc. you have to have to have a separate monitor

#

and keyboard/usb

surreal bronze
#

Can't you setup a Web interface on the pi to control it from there?

dusk grove
#

you can ssh into it

#

but a shell can be intimidating for newbies

surreal bronze
#

Then they should learn how to use it

#

Instead of having to buy another monitor

#

It's not that hard to learn your way around the shell

dusk grove
#

also with raspberri pi you still have to hook it up to wifi

#

to ge tthe shell

surreal bronze
#

This is why a VM can be better

#

Also we should probably move into #general,

dusk grove
#

although you can do many "fun" learning projects with rapsberri pi like make a spy camera with it

#

or make a wifi network or website on it

#

its more hands-on

#

for that stuff

#

and its your own little separate computer

#

yea general

onyx merlin
dusk grove
#

but does raspberri pi take up storage space on your computer?

#

remember you only have so much space for vms

#

escpecially if you have like 4 to 8gb ram

#

escpecially

surreal bronze
#

It doesn't need that much ram

#

Also a rasberpy pi costs money - VM is free

onyx merlin
#

Raspberry Pis are good.
They're very much not the solution to every problem.
They solve some problems well. Treating them like they're the be-all and end-all of learning hacking is to miss the very point of a raspberry pi.

dusk grove
#

I agree

#

they are more of a fun project

#

and if you install kali linux on there it is a separate mobile computer

#

like its small\

#

you can take it around

#

ssh into your pi anywhere with a laptop

onyx merlin
#

Seriously. Please condense your messages. The walls of text are filling the channel up and it's a problem.

dusk grove
#

sorry

#

should we move this stuff to general because this is getting a little broad?

autumn plover
wispy kestrelBOT
#

Gave +1 Rep to @tulip sail

dire vortex
#

I think you might need to pass the command line args to popen as an array

solar hull
#
args
The arguments used to launch the process. This may be a list or a string.```
#

And more to it: If args is a string, the string specifies the command to execute through the shell. This means that the string must be formatted exactly as it would be when typed at the shell prompt. This includes, for example, quoting or backslash escaping filenames with spaces in them. If args is a sequence, the first item specifies the command string, and any additional items will be treated as additional arguments to the shell itself.

lilac holly
#

How to send Json data in python socket

carmine ether
onyx merlin
lilac holly
#

Like this?
data = {“got_you”:tosend}
jd = json.dumps(data)
s.send(jd.encode())

carmine ether
#

no, you don't need to dumps

#

your data is already json data

lilac holly
#

Idk why I can’t send pic...

#

I’m struggling

#

I already did it

#

Btw I need to go thanks for ur help.

carmine ether
#

👍 👍

onyx merlin
carmine ether
#

arh, mb

#

so json.dumps(data) is correct

onyx merlin
#

That'll pop out a JSON string yeah

dusk grove
#

ok questions on programming languages. I have a book called "hacking - the art of explotiation, but the book is entirely based on C. While it teaches you great things and is rated as one of the best hacking books, I have been learning python for months. Do I read the book and learn the C programming language? Or do I continue learning python

brazen eagle
#

depends

#

python is fine for most scripting work

#

assuming it's also on the target

clear lodge
dusk grove
# brazen eagle python is fine for most scripting work

ok but Im having trouble figuring out how to actually learn python. Everywhere I see they tell you to learn one specific niche of python, like "data science" or "machine learning" in this case, Im trying to learn python for hacking, which would be mostly python networking related and python socket programming related Im assuming. Its also not good to learn general language because then you never end up applying it to real life, and most scripts I write, I never need to do things like wrapping or complex classes, I need to know scapy, which I dont know as of right now

#

and on top of that its hard to learn scapy since there are little courses and the ones on youtube are just copying and pasting the developers code

#

not really learning anything at all

dusk grove
#

I don't know if any online python for hacking or socket programming courses does anybody know about courses like these?

scenic gust
#

not a course, but black hat python book is good

dusk grove
#

Black hat python seemed alright

buoyant pecan
#

Hey

night forge
#

Hi

dusk grove
#

but would anyone know of a place where I can learn scapy directly? since most of the python hacking seems to be in scapy

sly breach
#

THM is working on pushing scapy material as we speak but I can't give an ETA (:

dusk grove
#

thats awesome! I cant wait for the tryhackme on scapy to come out!

#

the scapy docs is extremely weird

#

likt there is no guide or anything just a bunch of stuff on like TCP packets and they dont explain much what the packets are or anything. I cant wait for that tryhackme to come out 😄 so I can finally learn how to use scapy

onyx merlin
dusk grove
#

I have learned about TCP and basic netowkring. I know what TCP/IP is, what ethernet and wifi is and the difference between IPv4 and IPv6

#

and I get the basic idea of the ODI model but the scapy stuff seems like super complex

#

Im starting at the usage documentation maybe that will help

onyx merlin
#

Ok, that indicates more reading is required

#

Hacking is about understanding how stuff works. That's the first step before breaking stuff.

subtle saffron
dusk grove
#

Ok so what would be a great place to learn more advanced networking? Because most if the youtube tutorials are about basic IP and router stuff like what a router and a switch is

stoic badger
dusk grove
#

Just something for me to learn for future projects I'm not trying to master everything yet

dusk grove
wispy kestrelBOT
#

Gave +1 Rep to @stoic badger

molten scroll
#

Just finished listening to the "zero day exploit brokers" episode of darknet diaries. I got a question. Does the field of exploit development and also finding zero days require a decent level of penetration knowledge?

dusk grove
#

I mean I'm not like a professional in this stuff but before learning this advanced stuff I'd learn the more intermediate skills. Do you know how metasploit works? Can you write basic scripts in a programming language of your choice (or just understand language syntax in general) do you know what a database is or can you preform a BASIC SQL attack? Now notice I said basic because if your just warning computers like me and you just want to learn this, then have fun and don't stress but make sure you know this kind of stuff before learning exploit development and zero day attacks.

molten scroll
dusk grove
#

Yes sure man no problem

#

6 months ago I was where you are

magic falcon
dusk grove
#

But I recommend one thing: don't stress out, you shouldn't be worrying about taking the Pentest+ exam or whatever when you won't be doing that for years anyway probably. You joined computer science for fun right? Then make it fun, learn the stuff you want and be proud when you hack a computer. There's many people who can't do that

dusk grove
#

I've been learning hakcing for fun but I'm getting serious and wanting to earn extra money and prepare for jobs

magic falcon
#

Learn the basics, keep doing CTFs, and start figuring out how network services work.

dusk grove
#

Frankly I've never done it before so I don't have much idea on it other then watching some YouTube videos on it. What level CTFs do you recommend I get to before I start bug bounty? Are there different skills you should know? I notice you pointed out network services

magic falcon
#

Servers run all kinds of stuff. I recommend you start with the recommendations in #start-here

#

As you've been told repeatedly.

dusk grove
#

THM has bug bounty I never knew that

molten scroll
alpine marsh
#

Ah nvm, they scraped the idea.

final juniper
alpine marsh
#

Don't know why they prefer files over structures but we're reverting back to structures 👍

final juniper
#

I know I was trying to replicate the code and something was off

#

you should try to getline only once and then work on the string

#

files are gonna hunt you forever 😄 might aswell find out what was wrong

#

I might paste you a solution but that wouldn't be helpful for learning

alpine marsh
alpine marsh
#

Thanks though @final juniper

wispy kestrelBOT
#

Gave +1 Rep to @final juniper

final juniper
#

you just need to think about what it means to grab pieces of a string

alpine marsh
final juniper
#

in java I would use the split() method to do this, but here you need to do it manually

#

python has a split aswell

#

if you know how that works, you just need to figure out how to replicate it

alpine marsh
#

but thats my least priority for now

final juniper
final juniper
final juniper
alpine marsh
#

If I was allowed to use every built-in function, then this would be finished in no time. But then, that defeats the purpose of learning I guess.

autumn plover
#

Hey I'm running a wpscan in a script in loop. But command in on multiline and it is not running properly. How could i run the command on multi-line. I googled and found that adding "" at end of each line. but this solution doesn't work for me.

wpscan --url https://$domain --max-threads 1 --throttle 3000 --random-user-agent --themes-threshold 0 --disable-tls-checks -e vp,vt,u,cb,dbe \
         --detection-mode passive --wp-version-detection mixed --interesting-findings-detection aggressive -o $domain.json -f json --api-token **********************************************************
drowsy gulch
#

Is it possible to save the running output of a python script in Bash? The script is in an infinite loop and I'm trying to put together a second script that analyzes the results as they're generated

#

script only saves when the command executed in bash finishes

#

I did try going down the route of killing the loop to dump results to then analyze, but the API of this Python script grabs the last three results on launch, which is less than ideal

#

Start-up of the script, followed by the loop that runs every 60 seconds for new leaks. As new info comes in, I ideally need it dumped out to a txt that can be manipulated and stored by another script

#

(This is for the purposes of IR, nothing nefarious)

#

The RansoMonitor script does store new links in a log file, but I'm after the info shown. Scraping the links with BS4 is a pain in the butt due to authentication with MFA. I've had no luck passing my cookies to get to the pages

#

In fact, I might just edit the RansoMonitor script to dump it out. I'm still curious about the above though for the sake of learning

fallen monolith
drowsy gulch
#

I did give that a shot, but the output file didn't populate until the Python script was killed

fallen monolith
#

hmm, interesting, you could try to add a logging component to the script?

drowsy gulch
#

That's probably the best way of doing it, to be fair. I'll give it a shot

bright axle
#

or just write a bash script that says for each piece of output do tee -a .txt

brazen eagle
#

should probably be using a logger, be careful with logs and infinite loops though

tepid cargo
#

eyy I joined Amazon as SDE 2. Ppl interested in referrals can dm (ping here pls first before dm) 🥳

solar hull
#

May I ask about your location? (DM is fine as well, or not responding at all 🙂 )

faint sparrow
tepid cargo
wispy kestrelBOT
#

Gave +1 Rep to @grave salmon

brave pulsar
#

leggy blobheart

#

congrats

grave salmon
brazen eagle
#

Grats leggy

tepid cargo
grave salmon
brazen eagle
#

Amazon are a little weird

shy patrol
#

Hi guys
I'm trying to add my tryhackme badge on my next-js website, but i don't get it to work. After couple of days googling around, i thought i give a shot here
Any react experts here?

brazen eagle
#

Should just have to paste the js the site gives you

cursive orchid
#

this code grabs any string with 3 or more letters in a row:

console.log(new RegExp('[a-z]{3,}').exec(password_clear.toLowerCase()));

so if password_clear was 123TryHackMe123, the output would be tryhackme.

however, i also wanna convert leetspeak, so 1 can be i or l for example, can that be done within that regex? or would i have to have to do something like:

password_clear = password_clear.replace('4', 'a') // etc
console.log(new RegExp('[a-z]{3,}').exec(password_clear.toLowerCase()));
#

but then in my proposed solution, i'm not sure how to handle a 1, where it could be an i or an l

magic falcon
#

I think the better solution is to take the log and run it through a fuzzer

cursive orchid
#

wait wdym

sullen venture
brazen eagle
#

Eh, you should be able to dump it in the HTML no?

verbal kraken
#

Dear Programmers, Is it relatively easy to pick C# if you know C++ ?

#

I know they are different languages totally but more of transistion question if moving from C++ to C#.

tulip sail
#

Generally, yes 🙂

drifting sinew
#

Yeah C# is pretty easy to pick up if you're already fluent in C++

remote echo
verbal kraken
#

Thanks for your replies on C# .

lilac holly
brazen eagle
#

well...

#

it's a distant cousin at best

tepid cargo
#

if u know any of the c++/c#/java (even Typescript) u can pick others in very short time.

#

cause the syntactical building blocks are same

#

the complexity comes with a stack specific framework. not the language itself.

quartz pasture
#

Can anyone explain to me why when creating a python bytearray as bytearray(b'\x00\x07\x08\x2e\x2f\xa0\xa1') the resulting output is bytearray(b'\x00\x07\x08./\xa0\xa1') ??

solar hull
quartz pasture
wispy kestrelBOT
#

Gave +1 Rep to @solar hull

solar hull
solar hull
dusk grove
#

Can you learn buffer overflow in python? Or it is really C that is the main language for buffer overflow? In asking because I wanted to learn how to develop exploits, but it's hard to do this when C is the main language that is taught to make these

onyx merlin
#

Python is often used to exploit them

dusk grove
magic falcon
autumn whale
#

Can anyone tell y we use return function in cpp?

long ridge
autumn whale
long ridge
#

I think the key word "return" is in cpp sins you can use C code in CPP program. CPP does not restrict the user to program OO, you can program sequential as well (with out the compiler throwing errors and warnings, dont know if there are compiler flags to prevent it)

remote echo
# autumn whale But I got the output without using return 0 aslo

The return EXIT_CODE at the end of main is there for returning exit code, 0 meaning program exited successfully. ( There are other codes like 1 if u wish to exit with error ).

Now a days, compiler have improved and can add that much by themselves even if you don't explicitly write it in ur code.

onyx merlin
final juniper
#

if that's the latter as @remote echo said it's there to indicate a successful execution of the code

#

your program could be called by another program, that needs to know if all went good

#

Anyway some compilers allow you to use void main so that you won't need a return code, but that's not a best practice

vestal carbon
#

I have made a list of resources for programming if anyone needs some resources

onyx merlin
vestal carbon
dusk grove
onyx merlin
#

Did you try searching?

#

There's a search feature on the site

tulip sail
dusk grove
dusk grove
onyx merlin
#

Poke about for it.

magic falcon
tulip sail
dusk grove
#

Yea in a little bottlenecked in getting that string, but once I get the string I just have python decode it and get the data (the decoded password) then it's just a matter of sending it to the port

final juniper
tulip sail
tulip sail
warped blaze
#

I'm working in C and wanted to use getchar() to prompt the user to input the enter key to continue a loop. I tried to make the loop continue if the char is "\n" and i also tried "\r". When I used the former, it just skipped past that condition and printed all the way to the end, and when I used the latter, the loop stopped but I kept pressing enter and the condition was never met

#

Is there something I'm missing

magic falcon
warped blaze
wispy kestrelBOT
#

Gave +1 Rep to @magic falcon

dusk grove
onyx merlin
long ridge
#

Make sens look how u write something to cmd on linux.
looking at how far compilers/assemblers have come that it maybe change things "\n" to "\r\n" based on the systems it is build for, by using standards across the language, like "\n" for a new line etc. even if is not how you do it on set system.
I could be wrong if so pls ignore my comment.

final juniper
#

I used to check against ascii 10 or 13, it usually would catch it

formal bay
#

planned to setup nvim through wsl1
since it isn't like wsl2 will it conflict with virtualbox?

brazen eagle
#

shouldn't

#

wsl1 has other issues though

formal bay
#

I did read of a cmd that disables hyper-v to resolve conflict with vbox idk how that works tho

onyx merlin
midnight glen
formal bay
cedar furnace
#

Hey, can someone help me with sanitizing user input in bash?

#

Google wasn’t much of a help

brazen eagle
brazen eagle
cedar furnace
#

Oh, thanks

midnight glen
south crown
brazen eagle
lilac holly
#

pls tell something my pc is sucking a lot
specs-i5 8gb ram

brazen eagle
#

without more context, it's probably not that terrible. Depends on your use case though

cursive orchid
#

idk if this question makes sense but, is there a way for me to take a file with an unknown character encoding (not sure if that's the right term), and create extra files with different character encodings (eg. utf-16)?

the purpose for this is, i want to check that when someone uploads a file to my flask webserver, my with open() call doesn't shit the bed

magic falcon
#

that sounds like way more trouble than it would be worth, jake.

#

i'd make some assumptions about the file encoding, maybe assume ASCII, UTF-8, or Latin1 and if it's anything else, junk it.

cursive orchid
#

the reason i ask though is in a previous version of this tool (which was running on ubuntu) fucked up because the uploaded file was made on windows

magic falcon
#

yeah, windows tends to encode files with latin1 by default

#

it might also be a problem with end of line; that's pretty unlikely, but i have seen it happen

cursive orchid
#

potentially, i scrapped that code so i can't test what exactly the problem was there lol

magic falcon
#

latin1 tends to cause things to obreak

cursive orchid
#

but i will try latin1 since most of the time the file should be created on windows

#

oh

magic falcon
#

best bet, imo, is to make an assumption about the encoding and if it doesn't match ascii, utf8 or latin1, throw it out

cursive orchid
#

okay i will look into methods for that, thank you x

magic falcon
#

if you are going to allow latin1, i would re-encode to utf before putting it on disk

cursive orchid
#

sweet, thanks for the recs

magic falcon
#

i haven't used flask, but i had a similar problem in django when 3.0 was brand new

lilac holly
#

Is there a way to use python to send POST request to html input form ?

solar hull
lilac holly
#

That's my plan, just wondering if it is possible to do that. I don't want to end in the rabbit hole of documentation if that is not possible

solar hull
#

It definitely is possible to send form data with requests.

brazen eagle
#

Yup

covert stirrup
#

i want to get this inside my js code, how would I ?

onyx merlin
covert stirrup
onyx merlin
#

We're not going to help you cheat at a game. That's unethical.

covert stirrup
#

thats not the point

onyx merlin
#

It is the point - it's explicitly against the rules here.

covert stirrup
#

i dont actually cheat at it, I play it correctly everydday

#

I just want to see how it would be done

#

but fair

magic falcon
#

what do you mean by 'project isolation'. That has a very different answer if you want more than dependency segregation

#

then venv is the basic standard to keep your project dependencies from cluttering the system pip manager

#

yeah

#

you could also throw your py dev env into a container and back it with a volume mount

#

venv is the most 'pythonic' way of doing it

#

that said, systems engineers have a different perspective than developers

#

it depends on what your aim is, and what your role in the process is

#

arguably the container is the less bloaty version 🙃

#

but.... implementation should be based on your use case

#

if all you want is a simple dev environment, containerisation is premature

#

yeah, venv is the way to go for now

#

when you get to the point where it stands up on its own, then providing a dockerfile or k8s YAML for a Deployment is going to be the thing

#

look at CRI-O standards for deployment

#

yeah, it really isn't

#

writing a dockerfile or k8s Deploy is dummy simple compared to installing a wheel with setup.py and requirements.txt

#

yep

#

never

#

the complicated part of a python lifecycle is the dependency management

#

because different python programs may want conflicting versions of packages

#

so you section stuff off with venv whenever you do a non-package manager install

#

not really

#

not really at all

#

requirements.txt is usually a slightly cleaned up dump of packages installed on the venv

#

a makefile is a set of arbitrary recipe steps that may or may not have dependencies

#

a requirements.txt is a list of required packages

covert stirrup
#

Traceback (most recent call last):
  File "main.py", line 669, in <module>
    adafruitw()
  File "main.py", line 165, in adafruitw
    automatic_email(model, url)
  File "main.py", line 20, in automatic_email
    s = smtplib.SMTP('smpt.gmail.com', 587)
  File "/usr/lib/python3.8/smtplib.py", line 255, in __init__
    (code, msg) = self.connect(host, port)
  File "/usr/lib/python3.8/smtplib.py", line 339, in connect
    self.sock = self._get_socket(host, port, self.timeout)
  File "/usr/lib/python3.8/smtplib.py", line 310, in _get_socket
    return socket.create_connection((host, port), timeout,
  File "/usr/lib/python3.8/socket.py", line 787, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
  File "/usr/lib/python3.8/socket.py", line 918, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known```
#

not sure why its doing this tbh

onyx merlin
#

You're specifying something incorrectly

#

I can see the error. Did you research what I told you to research?

covert stirrup
#

not entirely

#

give me a second

#

hmph

#

i know what it is, not sure hwo to fix it

#

found my issue

#

thank you james

covert stirrup
#

i am sending the emails but nothing is showing up

#

999999999999999999999999999999999999% sure im not doing anything wrong

wraith latch
#

Do you get any error messages?

half snow
#

what was the issue? I was guessing at something the sendmail() usage based on the smtplib doc, but wasn't sure//didn't take the time to test it

covert stirrup
#

the emails just send and nothing else

#
    s = smtplib.SMTP('smtp.gmail.com', 587)
    s.ehlo()
    s.starttls()
    s.login(email, password)
    subject = f"{model} IN STOCK !!"
    message = f"The {model} is in stock right now! Buy it at {url}"
    print(url)
    print(message)
    print(subject)
    for i in db.keys():
        recipient = i
        s.sendmail(subject, recipient, message)
    s.quit()
    print("Email sent!")
  server.sendmail(email, sendemail, finalmess)
  server.quit()```
wraith latch
covert stirrup
#

yes

#

subject and message

wraith latch
#

What does the message say?

covert stirrup
#
    s = smtplib.SMTP('smtp.gmail.com', 587)
    s.ehlo()
    s.starttls()
    s.login(email, password)
    subject = f"{model} IN STOCK !!"
    message = f"The {model} is in stock right now! Buy it at {url}"
    print(url)
    print(message)
    print(subject)
    for i in db.keys():
        recipient = i
        s.sendmail(subject, recipient, message)
    s.quit()
    print("Email sent!")```
#

message = f"The {model} is in stock right now! Buy it at {url}"

#

the _ model is in stock right now! buy it at "url"

wraith latch
#

So that's literally what it says? Then the issue is with your code. You are using an F string to refer to parameters such as model which you didnt define anywhere in the snippet you shared

covert stirrup
#

i did lol

#

in the function

#

def automatic_email(model, url):

wraith latch
#

Yes but where do you want it to pull that from?

#

They're args you are defining no?

covert stirrup
#
model = "Raspberry Pi 0"
url = 'https://vilros.com/collections/official-raspberry-pi-accessories/products/raspberry-pi-zero'

automatic_email(model, url)```
#

this is just for this example as of now

wraith latch
#

Are you expecting this script to check the URL for you?

covert stirrup
#

i just want to send an email

wraith latch
#

I don't see the point of the script in that case if it's not checking stock or anything other than sending an email with the output of those 2

covert stirrup
#

i want to send an email

#

it wont seend

#

why is that?

wraith latch
#

You said it does send

covert stirrup
#

i have specified subjects and mroe

#

no data

#

why is that?

wraith latch
#

I'll try and take a look when I'm at my machine

#

For now I'd suggest adding some "try:" blocks to catch if it fails anywhere

wraith latch
#

I'm at my machine now @covert stirrup which libraries are you using in Python?

covert stirrup
#

Smptlib

#

No errors

#

literally just doesn’t send anything

wraith latch
#

Did you configure Gmail to allow for this to be sent?

#

your prints are fine

#

so it's the email function itself I recon if nothing is sending

#

either wrong port, wrong server, wrong credentials etc.

plucky helm
# covert stirrup why is that?

Shouldn't the message be as follows:

message = f"""
From: {sender}
To: {recipient}
Subject: {subject}

{message}
"""

Here's a reference tutorial - https://www.youtube.com/watch?v=JRCJ6RtE3xU

In this Python Programming Tutorial, we will be learning how to send emails. We'll start with simple plain text emails and then learn how to construct more advanced messages. We will learn how to attach images, PDFs, create HTML messages, and more. Let's get started...

The code from this video can be found at:
http://bit.ly/python-emails

Googl...

▶ Play video
#

Also, look at the RFCs for the same if you want some documentation

wraith latch
#

I think you're right @plucky helm , or at the very least the issue is with the function

covert stirrup
#

okay! Thank you!

brazen eagle
#

Email is terrible

brazen eagle
#

Also RFC 822

cursive orchid
#

i've grabbed some css boilerplate, but i'm not using all of it. is there a tool that i can give my html and css that will return only the css i'm using?

magic falcon
#

beautiful soup maybe? but that's more of a content scaper

dawn hare
#

Does anyone have experience digging through the glibc library?

I find this function a lot and I can’t make sense of what it actually does:

__libc_once (once, __gconv_read_conf);

Gconv_read_conf is a function defined in the same .c file as this function call

gilded igloo
#

the installer 👆

magic falcon
#

One of the vendors on VirusTotal flags that file as malicious.

gilded igloo
#

really all it is is a rickroll

#

i saw it was allowed

#

so ..

#

pls don't ban

magic falcon
#

Maybe uploading a .exe isn't the best way to gain trust on a cybersecurity discord

#

just a thought

stoic badger
#

I got more hits than that now lmao

gilded igloo
#

lol

#

apparently rick astely is malisious now

stoic badger
#

yep 17 vendors total flagged it

gilded igloo
#

is py2 exe flagged lol

stoic badger
#

Probably some API calls that the code was invoking

#

Yeah py2exe will do it

gilded igloo
stoic badger
#

But like juun said, don't upload random exe's to an infosec discord

gilded igloo
#

ok

gilded igloo
magic falcon
#

just from the virustotal report, i deleted your .exe file

gilded igloo
magic falcon
#

please don't try to spread another compiled binary, 'just a rick roll' or not

gilded igloo
#

yah thats cools with me ii read the rules

#

i saw rick was allowed so

magic falcon
#

rickrolling is fine, but in my mind, compiled stuff is more intensive than most of us want to investigate

gilded igloo
#

i decided to be stupid pendeho

craggy quail
#

'''
Traceback (most recent call last):
File "main.py", line 27, in <module>
s11 = symbols[random.randint(0,nr_symbols) -1 ]
IndexError: list index out of range
""

#

i am new to python - i have tried everything couldnt fix this error

#

i am ware of the index out range error

#

but not sure where i am wrong in my code

#

if i print 27 line it gives vaule though

#

any here to help me pls ?

#

am i allowed to paste the code here ?

solar hull
#

As long as it’s reasonably compact. And include it in triple backticks (```)

#

And the issue is that you’re referencing to outside the array symbols

lilac holly
#
--[----->+<]>-----.+++++++++++++.[--->+<]>-.--.-[->+++<]>-.+[--->+<]>+++.-[-->+++++<]>.------------.++++[->++<]>+.-[->++++<]>.[->+++<]>+.++++++++++++.[->+++++<]>-.+[----->+<]>+.+.+++++.[---->+<]>+++.---[->++++<]>-.---.[----->++<]>+.++++++++++++..----.+++++.-------.--[->+++<]>-.
``` um I spent time of my life for this.
cursive orchid
plucky bone
#

It's brainfuck I think

lilac holly
#

Yeah, it's brainfuck

hot ingot
#

it is brainfuck

dense forge
#

Hi

#

Again hhh

#

Any one here know a bout python

#

?

dusky stratus
#

Yeah I am doing a course on it, but don't know that much

dense forge
#

Where ?

#

Web page ?

true pumice
#

Udemy, YouTube, Blog Posts, Python Docs

dense forge
#

Thx

dusky stratus
#

Course

dense forge
#

Something else

#

How know a bout kali or use ?

dusky stratus
#

Knowledge

dense forge
#

Ok

cobalt kelp
#

why do I get this error in this code:

#
#!/bin/bash

# -b <num>
sizes=(1 256 512 1024 2048 4096 8192 16384)
files=("256b.txt" "512b.txt" "1kb.txt" "256kb.txt" "512kb.txt" "1mb.txt" "256mb.txt")


for i in {0..${#files[@]}}; do
    echo -n "${files[i]} \nmmap: "
    ./build/task05 -t mmap /home/alex/Documents/Letnik02/OS/tasks/task05/${files[i]} >> res.txt

    for s in {0..${#sizes[@]}}; do
        echo -n "read -b ${sizes[s]}: "
        ./build/task05 -b ${sizes[i]} -t _read /home/alex/Documents/Letnik02/OS/tasks/task05/${files[i]} >> res.txt
        echo -n "ifstream_read -b ${sizes[s]}: "
        ./build/task05 -b ${sizes[i]} -t ifstream_read /home/alex/Documents/Letnik02/OS/tasks/task05/${files[i]} >> res.txt
    done

    echo ""
done

Error: ./test.sh: line 9: {0..7}: syntax error: operand expected (error token is "{0..7}")

#

nvm just figured it out

gilded igloo
#

which algorithm should i use to acccount for accuracy paradox

rigid thunder
#

can anybody help me with a sublime text license ?

#

i dont have anywhere to learn coding and programming

rigid thunder
#

i dont have that much , its $99

onyx merlin
rigid thunder
#

lol.

#

maybe someone can share a license key with me to help me , i will buy when i can afford to

onyx merlin
#

-ban @rigid thunder Asking for help pirating/evading licensing for sublime text. Ban appeals are bans@tryhackme.com

wispy kestrelBOT
#

🔨 Banned viruk3#9182 indefinitely

bright axle
#

he got baited😂

heavy rampart
wispy kestrelBOT
#

Gave +1 Rep to @heavy rampart

sullen venture
wispy kestrelBOT
#

Gave +1 Rep to @sullen venture

deft pumice
#

hello, I have a problem with one program, and I don't know how edit the code. I need it to tell me how many numbers are left to enter after every i<5

#include <iostream>
#include <stdio.h>
using namespace std;

int main()
{
int num;
int sum, i;
float average;

printf("Enter five numbers: ");

for(i=0; i<5; i++)

{
scanf("%d", &num);
sum = sum + num;
}

average = sum/(float)5;

printf("Average = %f", average);

return 0;

}

long ridge
# deft pumice hello, I have a problem with one program, and I don't know how edit the code. I ...

i would add a print statement in the for loop with a text like "give the ... number" so the user know on what number he/she is on.
check sites like https://www.w3schools.com/cpp/ for help
greate website https://en.cppreference.com/w/ for al lot of mimum working examples

brazen eagle
#

it's always been very generous with the trial terms

onyx merlin
brazen eagle
#

well yeah

#

still surprises me

#

not the ban

#

asking to skirt the license

craggy jasper
pallid yacht
#

What's up fellas hope all yall good I just started doing programming in college but I got a project to code a popular game and I was asking for your possible help as I don't know much about coding and it's graded

half snow
#

not gonna do your project or hw for you, but if you end up having specific questions/running into errors that you get stumped on happy to point you in the right direction 🤷‍♀️

lucid zenith
#

hello,,, someone to show me an easier way of creating a get and post method for webprogramming in c++

crystal light
#

Just a random question to see if any programmers can help me out, what is Turing completeness? And how can it be explained simply?

long ridge
# crystal light Just a random question to see if any programmers can help me out, what is Turing...

What does it mean for something to be Turing Complete? Professor Brailsford explains.

Turing Machine Primer: https://youtu.be/DILF8usqp7M
Turing Machines Explained: https://youtu.be/dNRDvLACg5Q
Chomsky Hierarchy: https://youtu.be/224plb3bCog
What on Earth is Recursion?: https://youtu.be/Mv9NEXX1VHc

http://www.facebook.com/computerphile
https...

▶ Play video
long ridge
#

no problem

main belfry
#

Hey guys, I like cybersecurity and I would like to learn programming too. What would you suggest for learning C. Are there any good youtubers/videos or websites?

visual lintel
#

Hey guys, does anyone have any suggestions for where I can learn python?

visual lintel
teal kraken
#

hey there, im new to the coding/programming world. anyone know what i download to start my journey?

#

i want to do web development

plucky vigil
#

Hey everyone. Currently learning pwntools and getting some inconsistencies. Working with a vuln bin called inventory. Locally the exploit works. It does not work going through ssh and selecting the proccess. Any insight?
Locally: WORKS

from pwn import *
context.update(arch='i386', os='linux')
payload  = cyclic(cyclic_find('taaa')) 
payload += p32(0xffffd460 + 200 ) 
payload += b"\x90" * 100
payload += asm(shellcraft.sh())
p = process("./inventory.exe")
p.sendline(payload)
p.interactive()

Through ssh: UNEXPECTED EOF

from pwn import *
context.update(arch='i386', os='linux')
s = ssh(user='user',host='192.168.28.111',port=2222,password='Password')
p = s.process("/.hidden/inventory.exe")
payload = cyclic(cyclic_find('taaa'))
payload += p32(0xffffd5f0 + 200) #<-- changed to reflect local ESP
payload += b"\x90" * 100
payload += asm(shellcraft.sh())
p.sendline(payload)
p.interactive()
naive tartan
tropic minnow
#

That pretty easy, like x%100 would give you the date, the last two digits that is

#

Then divide the number by 100 and save it as integer to remove the last digits

#

Not integer - day

#

Use `` to put text in code blocks

#

integer = int(integer/100)

#

Try following a video tutorial on YouTube
This stuffs pretty well documented

gilded igloo
#

this broke me i was inspired by codebullet's video and an mit github post to make my own but i ama broken man today

stone kayak
#

I have a signed Ethereum transaction signed using the persons private key:

{
  "address": "0xA1707c82aa2866955991c7f2C6F431d6619B8b4c",
  "msg": "gmaen witches <3",
  "sig": "0xdabc00b91919c1d931c8378f2b4f693c6a915b4f4bdbd1107c5d4b5232b750db4a95a877cc572f36bad664f91264666a3528f96328d2b5c024e77ca89c067ed91c",
  "version": "2"
}

I have their public key 0x9a338e1c7d6c28ab018d2ae8170148a9dd93e7ca4446c7dc1abac32c4f58d32697407b20f1e3d65e537e822e6ce652994e5f0a87e7b56433a76c1188c1182249, can someone show me Python code that verifies the signed message?

I have spent ~2 hours trying to Google this and have failed all my copy-paste attempts 🙏

true pumice
lilac holly
#

can anybody explain the << in this:

x = 13
print(bin(x << 1)[2:].rjust(4, "0"))
tight island
#

as far as I remember, it shifts the binaries to left

#

say you have 0001 1000
and you do << 1 to it, it becomes:
0011 0000

tulip sail
#

.... Must we?

languid halo
#

Printing the sender blockchain address, the output from test.py matches with your address on the initially question

astral raptor
#

why is it telling me bad substitution for this? I'm trying to take the name of the file (break0 to begin with) and make a copy named break1, break2, etc...

        arp -a > /dev/null & cp ${0} "${${0%/*}/break$(( ${ ${0}: -4: 1}+1))}.sh"
#
        arp -a > /dev/null & cp ${0} "${0%/*}/break$( ${ ${0}:-4:1} + 1).sh"
#

did that fix it?????

#

tf

#

why is it not workiiinnnggg

#

can someone help me with this i cant get it

#!/bin/bash

while :
do
    for i in {1..5}
    do
        echo test > /dev/null
        cp ${0} "${0%/*}/break$( ${ ${0}:-4:1}+1).sh"
        
    done
done```
#

it isnt running properly

covert stirrup
#

hello

#
import requests
import os

def checkflights(flightcode):
    url = "https://www.flightstats.com/v2/api/search/structured-search?rqid=qswma4k1ixn"

    headers = {
        "Accept": "application/json, text/plain, */*",
        "Accept-Encoding": "gzip, deflate, br",
        "Accept-Language": "en-US,en;q=0.9",
        "Authorization": "f",
        "Connection": "keep-alive",
        "Content-Type": "application/json;charset=UTF-8",
        "Host": "www.flightstats.com",
        "Origin": "https://www.flightstats.com",
        "Referer": "https://www.flightstats.com/v2",
        "sec-ch-ua-platform": "Windows",
        "Sec-Fetch-Dest": "empty",
        "Sec-Fetch-Mode": "cors",
        "Sec-Fetch-Site": "same-origin",
        "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36",
}
    data = requests.post(url, headers=headers, data=flightcode)
    return data.text

print(checkflights("SWA3314"))```
#

so i send this request

#

and it comes back with

#

{"error":true,"message":"An unexpected error occurred"}

cedar furnace
#

hmm

sullen venture
#

i hope that bearer-token is not something you should keep private

covert stirrup
#

it returns a request when the site does it

#

I DID IT

#

LETS GOOOOOOO

#

it was with the json

covert stirrup
#

um

#

how would I python webscrape and use the js path

cedar furnace
#

why are you doing it?

covert stirrup
#

how do i select just that one

cedar furnace
#

1 sec

#

this should help out

covert stirrup
#

the id isnt different

#

it has no css selector

#

only way is xpath

#

but that just gives me an empty list

covert stirrup
#

no

cedar furnace
#

can you share the code?

covert stirrup
#
import requests
page = requests.get('https://www.airnav.com/fuel/report.html')
tree = html.fromstring(page.content)  
price = tree.xpath('/html/body/center/table/tbody/tr[5]/td[7]')
cedar furnace
#

yeah, what do you want it to do?

covert stirrup
#

grab this

cedar furnace
#

hmm

#

does it have an ID?

covert stirrup
#

no

cedar furnace
#

hmm

#

I don't know how to proceed.

#

lemme think

slate iris
#

i wanna learn programming

#

i dont know where to start!

sullen venture
slate iris
#

people tell me to learn a language

#

i need to build a career

#

can u suggest me which is the career that is booming r8 now ?

jolly wigeon
slate iris
#

i love drones, Robotics, Artificial Intelligence and stuff

sullen venture
sullen venture
slate iris
jolly wigeon
#

but I'm retired now lol

sullen venture
sullen venture
slate iris
jolly wigeon
jolly wigeon
sullen venture
#

there are a lot of free resources for python. just go to youtube, google or freecodecamp, etc. at least for the basics

slate iris
#

so i wanna self study learning through a book

jolly wigeon
#

damn then course irl is the chosen one

jolly wigeon
sullen venture
slate iris
#

that is the reason i dont wanna spend all my time on screen

#

its not possible for me to simultaneously follow classes and work

#

i wanna thank you guys for clearing my head

sullen venture
#

might want to try codecademy, the basic stuff is free and you learn interactively

slate iris
#

does anybody hear know hacking ?

jolly wigeon
jolly wigeon
slate iris
#

General Hacking

#

Ethical Hacking

jolly wigeon
#

ohh got what you mean, I'm not into this but learn python and operating systems

#

then move to tryhackme

#

you'll learn about operating systems and networking already in tryhackme I guess

verbal talon
#

im sorry that i copy paste my question - but i saw this programming channel to late ^^

#

general question to people who are good in C++: can you recommend me a book that covers everything in C++

so no superficial knowledge to quickly code a few programs, but a very deep technical book
i want to understand this language... but i cant find any good resources that are also valid ^^
sometimes i read stuff in the internet, but its not covered in full detail to completely understand it

magic falcon
#

Is there a newer edition than the 4th? TC++PL 4th ed doesn't cover anything past C++11

fleet vortex
#

Not one that I'm aware of

magic falcon
#

cppreference.com is probably the best reference I've seen for all the major C++ releases

#

C++03 through C++20 and the various TS specs

fervent kraken
#

https://www.baeldung.com/ imho, when it comes to java, this site is 👑
now my question is, what's the 👑 site for python? 😄

magic falcon
#

the official docs have a LOT of sample code and the references are, quite honestly, the i've seen for any programming language

solar hull
#

What the official docs lack is proper indexing.

fervent kraken
#

honestly it's the only one I have bookmarked, but the thing is when I'm looking for something specific and go to the docs, I usually get a little overwhelmed

#

but yeah, I agree about the code samples

fervent kraken
solar hull
#

organising, pagination, proper table of contents and whatelse wouldn't hurt. The same goes for Go docs.

fervent kraken
#

I think if someone checks out the site I sent they'll understand why I speak so highly of it. now I don't know if something similar exists for python, but I thought I'd ask

solar hull
#

I know baeldung, but can't say i'd be a fan of it.

fervent kraken
#

oh, how come? It has been a godsent for me when I was doing homework

solar hull
#

Let's just say it's not helpful when looking for anything more advanced.

magic falcon
#

Agree with that

fervent kraken
#

Alright, fair, especially since most of the stuff I was looking up was beginner stuff

magic falcon
#

the Springboot stuff they have was nice when i needed the intro

drowsy gulch
#

Any advice on how to make this code output more aesthetically pleasing? It's pushed out via the Telegram API, so Unicode emojis can be used without any issues

clear needle
#

A table could be nice

#

One of our community members makes very pleasing CLIs. You could check out their GitHub for inspiration -- https://github.com/bee-san

drowsy gulch
#

I'm quite new to that kind of formatting. Am I right in thinking Pandas would be the best resource for that?

#

This is very true, Bee makes some pretty awesome scripts! I'll have a gander 😄

clear needle
#

Something like one of these two could be cool,

drowsy gulch
#

Tables definitely seem like the way to go

stoic badger
#

But yeah, Bee’s projects are good examples

drowsy gulch
#

PrettyTable to the rescue! It's far from done but it's definitely an improvement!

#

(these statistics are bogus, BlackCat hasn't been THAT active lol)

covert stirrup
#

could someone help me with js?

#
function getregurl() {
  let registration = document.getElementById('textbox_id');
  let url = "https://globe.adsbexchange.com/?reg=" + registration.value;
  document.getElementById('textbox_id').innerHTML = "";
  document.getElementById("finallink").href=url;
  document.getElemntById("finallink").value=url;
}```
faint sparrow
faint sparrow
#

well it's not defined in the page's context

#

is the script with the function being loaded?

covert stirrup
#
<body>
    <center>
    <script src="js/script.js"></script>
        <div class="topnav">
            <a href="{{url_for("homepage")}}">Home</a>
            <!--<a href="#news">ElonJet</a>-->
            <a class="active" href="{{url_for("aircraftdata")}}">Aircraft Database</a>
            <!--<a href="#about">About</a>-->
        </div>
    <iframe src="https://docs.google.com/spreadsheets/d/e/2PACX-1vRN4mL0eeUjLB4HA3ScE_edMtnyI6vtxCa10MuLkd4t7iTpJAyA2fOtaICEfgHb2f3ekjYFqr-oHpKX/pubhtml?widget=true&amp;headers=false" height="600" width="1200"></iframe>
    <br>
    <input class='input' id="reginput" placeholder="Enter registration(s)"input>
      <p>&nbsp;</p>
      <button type="submit" onclick="getregurl()" id="button1">Submit</button>
      <p>&nbsp;</p>
      <a href="" id="finallink"></a>```
faint sparrow
#

and i presume the function is in js/script.js

#

?

covert stirrup
#

yes

faint sparrow
#

do ctrl+shift+r

covert stirrup
#

where

faint sparrow
#

might be the cache playing with oyu

#

in the browser

#

well there's your answer lol

covert stirrup
#

smh

#

how fix??

faint sparrow
#

well the file wasn't there lmao

#

i saw the screen

#

make sure the file is on the webserver pepega

magic falcon
#

+rep @faint sparrow 🙂

wispy kestrelBOT
#

Gave +1 Rep to @faint sparrow

covert stirrup
#

thanks @faint sparrow

wispy kestrelBOT
#

Gave +1 Rep to @faint sparrow

covert stirrup
#

W

winged magnet
#

anyone know how to get text from another site like this https://15.rs/ and and assign in a variable a using java 1 liner

magic falcon
#

Do you own that site?

winged magnet
#

nope

#

but i can create one

#

and after that i want to fit it in alert(a)

magic falcon
#

Is there a reason you are trying to store text from a really bad XSS attempt?

winged magnet
#

there is limit for words so i have to get payload from other site and insert it in alert(a)

#

or like onload= variable a from site 15.rs

tropic minnow
#

anybody else do a loop to get 10 values(custom ports) which could be written in less time

covert stirrup
#

hey im back again with for coding issues...

stoic badger
#

Just read the error message 🤷‍♂️, you have a character encoding issue

covert stirrup
#

How fix?

true pumice
#

Have you tried copying and pasting the error into google? :)

#

Usually a great place to start if you haven’t already

covert stirrup
#

i did @true pumice

#

ive been looking it up all day

#

no luck

#

it talked alot about utf 8 encoding

#

i tried encoding

#

decoding

#

ectc

solar hull
#

you're trying to decode something into ascii. The data is not ascii.

#

note the name of the function you're calling.

true pumice
tranquil stirrup
#

Does anyone know if either OwnCloud or NextCloud would natively support HTTP/HTTPS blob storage the way that S3 does?

I have a dev who's app only uses S3 currently, but they have a use-case scenario coming up that will require on-prem storage.

If there's a simple turn-key server solution that I can spin up that the app will be oblivious of other than needing a new end-point URL selection, I'd like to provide that option forward.

placid oxide
#

give me star and feedback 🙂

tranquil stirrup
wispy kestrelBOT
#

Gave +1 Rep to @magic falcon

nocturne dagger
#

Hey, Does anyone have any site recommendations for learning Java?

tropic minnow
wispy kestrelBOT
#

Gave +1 Rep to @plucky helm

tropic minnow
#
from math import *
print(pi * pow(float(input("radius\n")),2))

This Works

#

All good 🙂

brazen eagle
brazen eagle
#

Playing code golf is pointless if no one can read your code

tropic minnow
brazen eagle
#

Also a straight multiplication is faster than pow

tropic minnow
brazen eagle
#

At least for squares

tropic minnow
#

also, I believe that efficiency only comes into play for pretty long scripts doing multiple tasks, for simple things there shouldn't be that much of a difference

brazen eagle
#

True as well

#

You'll save a few dozen microseconds

#

Well over a million operations it adds up :)

tropic minnow
brazen eagle
#

that's a different problem

#

You'll have storage issues there

tropic minnow
#

takes notes

brazen eagle
#

Your in the order of 2e35639

tropic minnow
brazen eagle
#

Well this is more that it won't fit in a long or even quad

tropic minnow
brazen eagle
#

Def not a floating point

#

They only go up to 1e308 ish

tropic minnow
#

I see, my college had an intro to C course in freshman year so only know the basics of C

#

found python to be more efficient and easy to learn

brazen eagle
#

C still uses ieee-754 for floating point math iirc

#

Well so does everyone else

#

C can be more efficient

#

Python has more understandable syntax though

tropic minnow
#

and the blessed modules too

brazen eagle
#

Sure

lilac holly
plucky helm
tawny sparrow
#
print("Welcome to the Python Store!!!!! ")

print("Hi, whats your name? \n")

costumer_name= input("Name:")


print("""\nWe have on today´s menu:
bread 
Cofe
cake """)

print("\nWhat you want today " + costumer_name + "?")
order = input ("Order:")
foods = ["bread","Cofe","cake"]

if order == foods:
    print("Your order will be ready in 5 minutes, thank you " + costumer_name )
else:
    print("That´s not on the menu sorry " + costumer_name)
#

hey guys

#

im new to python, can anyone explain me why this is the output?

#
Hi, whats your name? 

Name:nuno

We have on today´s menu:
bread 
Cofe
cake 

What you want today nuno?
Order:bread
That´s not on the menu sorry nuno````
onyx merlin
#

foods is a list

#

order is a string

#

== doesn't check if the item is in the list, it's checking if the order is the same as the list of foods which it's not

tawny sparrow
#

so if put just one = it will check all the items?

onyx merlin
#

No.

tawny sparrow
#

no it gives me error ahhaha newbie mistake

onyx merlin
#

= is for assignment.

#

It's for setting variables

tawny sparrow
#

i used

#

if order in foods