1 Corinthians 2:6-8
Here is what I get from the Greek:
6But, we are talking of the wisdom of perfect things ‒ wisdom, though, not of this age, nor of the rulers of this age, about things that will pass away.
7 No, we are talking of the wisdom of God! About a mystery ‒ hidden wisdom ordained by God before the ages, for our glory. 8 Wisdom none of the rulers of this age has understood. For had they understood, by no means would they have crucified the Lord of glory.
In verse 6, Paul is contrasting wisdom of "perfect things" (τοῖς τελείοις) with wisdom of "passing away things" (τῶν καταργουμένων), as he did in 1 Corinthians 13:10, i.e. "that which is perfect" (τὸ τέλειον) with "that which is ... done away" (τὸ ... καταργηθήσεται)
But when that which is perfect τὸ τέλειον is come, then that which isτὸ is in part shall be *done away καταργηθήσεται**.
-- 1 Corinthians 13:10 (KJV)
In regard to who these "rulers" might be, Paul here uses ἀρχόντων (from ἄρχων : Strong's G758 - archōn), which is the standard Greek word for rulers/princes of this world, whereas in Ephesians 6:12 (which you cite), he uses the word κοσμοκράτορας (from κοσμοκράτωρ: Strong's G2888 - kosmokratōr).
κοσμοκράτωρ only occurs once in the New Testament, in Ephesians 6:12. If Paul wanted to inform his readers that the rulers in 1 Corinthians 2:6 were "spiritual beings in heavenly places", then he would have used κοσμοκράτωρ rather than ἄρχων.
###Conclusion In 1 Corinthians 2:6-8, Paul is talking about the rulers of the people, i.e. those to whom Pilate spoke:
13And Pilate, when he had called together the chief priests and the rulers τοὺς ἄρχοντας and the people,
14Said unto them, Ye have brought this man unto me, as one that perverteth the people: and, behold, I, having examined him before you, have found no fault in this man touching those things whereof ye accuse him:
-- Luke 23:13-14 (KJV)
The very ones who later stood taunting Jesus as he hung on the cross:
35And the people stood beholding. And the rulers οἱ ἄρχοντες also with them derided him, saying, He saved others; let him save himself, if he be Christ, the chosen of God.
-- Luke 23:35 (KJV)